aboutsummaryrefslogblamecommitdiffstats
path: root/src/lib/evas/canvas/evas_canvas3d_material.eo
blob: b2d209099d24b7159bf9a68904a845a0a2f49c4a (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                   
 
                                    
                                     

                 
                                                                  
 
                                                                              
                                                                            

                                                                           







                                          
           

                 
                                                                                 



                                                               


          
                        
                                                                  
 
                                
           
                 
                                                                                 



                                                                                   

          
 
                        
              
                                                                           
 



                                                                              

                                                          
              

              
                                                                           
 
                                    
              

               
                                                                             

                 
                                                                     


          
                           
              
                                                      





                                                                                         
                                    
              

              
                                                      
 
                                       
              

                 
                                                      


          
                         
              
                                                    


                                                             
                                    
              

              
                                                    
 
                                     
              


               
                                                                             

                 
                                                                                 



               

                             

                                         


    
class Evas.Canvas3D.Material (Evas.Canvas3D.Object)
{
   [[Evas 3D canvas material class]]
   data: Evas_Canvas3D_Material_Data;
   methods {
      color_set {
         [[Set the material attribute color of the given material.

           Material color is used also when texture map is enabled. The colors
           will be modulated (multiplied). To control the color contribution
           of a material attribute, use gray color. Setting color value for
           normal attribute has no effect.

           Default color is as follows.

           Ambient  : (0.2, 0.2, 0.2, 1.0)
           Diffuse  : (0.8, 0.8, 0.8, 1.0)
           Specular : (1.0, 1.0, 1.0, 1.0)
           Emission : (0.0, 0.0, 0.0, 1.0)
           Normal   : Not used
         ]]

         params {
            @in attrib: Evas.Canvas3D.Material_Attrib; [[Material attribute ID.]]
            @in r: Evas.Real; [[Red component of the color.]]
            @in g: Evas.Real; [[Green component of the color.]]
            @in b: Evas.Real; [[Blue component of the color.]]
            @in a: Evas.Real; [[Alpha component of the color.]]
         }
      }

      color_get @const {
         [[Get the material attribute color of the given material.

           See also @.color_set.
         ]]
         params {
            @in attrib: Evas.Canvas3D.Material_Attrib; [[Material attribute ID.]]
            @out r: Evas.Real; [[Pointer to receive red component of the color.]]
            @out g: Evas.Real; [[Pointer to receive green component of the color.]]
            @out b: Evas.Real; [[Pointer to receive blue component of the color.]]
            @out a: Evas.Real; [[Pointer to receive alpha component of the color.]]
         }
      }

      @property enable {
         set {
            [[Set the material attribute enable flag of the given material.

              You might want to disable some material reflection contribution.
              For example, Emission attribute is rarely used. Disabling unused
              attributes might help the shading less complex so that can get
              speed up.

              By default, diffuse and specular is enabled.
            ]]
         }
         get {
            [[Get the material attribute enable flag of the given material.

              See also @.enable.set.
            ]]
         }
         keys {
            attrib: Evas.Canvas3D.Material_Attrib; [[Material attribute ID.]]
         }
         values {
            enable: bool; [[Whether to enable the attribute or not.]]
         }
      }

      @property shininess {
         set {
            [[Set the shininess of the given material.

              Shininess is only used when specular attribute is enabled. Higher shininess
              value will make the object more shiny.

              Default shininess value is 150.0.

              See also @.enable.set.
            ]]
         }
         get {
            [[Get the shininess of the given material.

              See also @.shininess.set.
            ]]
         }
         values {
            shininess: Evas.Real; [[Shininess value.]]
         }
      }

      @property texture {
         set {
            [[Set the texture of the given material.

              You have to enable the desired attribute first.

              See also @.enable.set.
            ]]
         }
         get {
            [[Get the texture of the given material.

              See also @.texture.set.
            ]]
         }

         keys {
            attrib: Evas.Canvas3D.Material_Attrib; [[Material attribute ID.]]
         }
         values {
            texture: Evas.Canvas3D.Texture; [[The texture set to the attribute.]]
         }
      }
   }
   implements {
      Efl.Object.constructor;
      Efl.Object.destructor;
      Evas.Canvas3D.Object.update_notify;
      Evas.Canvas3D.Object.change_notify;
   }

}