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

                
                                         
 



                                                                       
                 

                                                     


          
                       
                                                    
                 

                                                                          



                            
                                               
 



                                                                           

                                                            
           
                 



                                                                          


          
                                   
                                                 
                 



                                                                                              


          
                   







                                                                        
                                                             
                 





                                                                                                    


          
                    
                                                     
                                                                   
                 

                                                                       
                                                              


          
                                   
                                                                               
                                                                                  
                 

                                                                       

          
                          
                                                   
 



                                                                            
                 
                                                                  



                                 

                                                        
       
                                    
                                                      
                                                  

                             

                                                             
                 
                                                      

          
 
                           
              
                                             

              
                                             

                 

                                                                      


          
                             
              
                                               

              
                                               

                 

                                                                      

          














                                                                     
 
               
                             

                                         
    
 
import evas_canvas3d_types;

class Evas.Canvas3D.Scene (Evas.Canvas3D.Object)
{
   [[Efl 3D canvas scene class]]
   data: Evas_Canvas3D_Scene_Data;
   methods {
      size_set {
         [[Set the resolution of a scene.

           A scene should be rendered to be displayed through an image
           objects. The resolution defines size of the internal surface
           holding the rendered result.
         ]]
         params {
            @in w: int; [[Width of the resolution.]]
            @in h: int; [[Height of the resolution.]]
         }
      }

      size_get @const {
         [[Get the internal resolution of a scene.]]
         params {
            @out w: int;  [[Pointer to receive width of the resolution.]]
            @out h: int;  [[Pointer to receive height of the resolution.]]
         }
      }

      background_color_set {
         [[Set the background color of a scene.

           Background color defines initial color of pixels before a scene
           is rendered. If you want to display a scene with background evas
           objects are still  remaining as if it was the background, set
           the alpha term to 0.0.

           Default background color is (0.0, 0.0, 0.0, 0.0).
         ]]
         params {
            @in r: Evas.Real; [[Red component of the background color.]]
            @in g: Evas.Real; [[Green component of the background color.]]
            @in b: Evas.Real; [[Blue component of the background color.]]
            @in a: Evas.Real; [[Alpha component of the background color.]]
         }
      }

      background_color_get @const {
         [[Get the background color of a scene.]]
         params {
            @out r: Evas.Real; [[Pointer to receive red component of the background color.]]
            @out g: Evas.Real; [[Pointer to receive green component of the background color.]]
            @out b: Evas.Real; [[Pointer to receive blue component of the background color.]]
            @out a: Evas.Real; [[Pointer to receive alpha component of the background color.]]
         }
      }

      pick @const {
         [[Get information on the most front visible mesh for the given
           position.

           (x, y) is the screen coordinate of the given scene. That is,
           left-top is (0, 0) and right-bottom is (w, h) where (w, h) is
           the size of the scene. The texture coordinate is useful when
           using proxy texture source.
         ]]
         return: bool; [[$true on success, $false otherwise]]
         params {
            @in x: Evas.Real;              [[X coordinate of the picking position.]]
            @in y: Evas.Real;              [[Y coordinate of the picking position.]]
            @out node: Evas.Canvas3D.Node; [[Pointer to receive the node contains the picked mesh.]]
            @out mesh: Evas.Canvas3D.Mesh; [[Pointer to receive the picked mesh.]]
            @out s: Evas.Real;             [[Pointer to receive the texture "s" coordinate.]]
            @out t: Evas.Real;             [[Pointer to receive the texture "t" coordinate.]]
         }
      }

      exist @const {
         [[Search given node in the given position.]]
         return: Evas.Canvas3D.Node; [[Node at the given position]]
         params {
            @in x: Evas.Real; [[X coordinate of the picking position.]]
            @in y: Evas.Real; [[Y coordinate of the picking position.]]
            @in node: Evas.Canvas3D.Node; [[Node for search.]]
         }
      }

      pick_member_list_get @const {
         [[Get list of the all root members from scene in the given position.]]
         return: list<Evas.Canvas3D.Node>; [[List of all root members from scene]]
         params {
            @in x: Evas.Real; [[X coordinate of the picking position.]]
            @in y: Evas.Real; [[Y coordinate of the picking position.]]
         }
      }
      shadows_enable_set {
         [[Enable or disable shadows on given scene

           If shadows_enabled is $true, the objects in the scene can throw
           shadow to another objects located behind them. The depth map used
           for shading. Directed and projective light sources are supported.
         ]]
         params {
            @in shadows_enabled: bool; [[Shadows enabled status.]]
         }
      }

      shadows_enable_get @const {
         [[Get shadows enabled status for given scene.]]
         return: bool; [[The shadows enabled status.]]
      }
      color_pick_enable_get @const {
         [[Get status of color picking of the scene.]]
         return: bool; [[The pick enabled status]]
      }
      color_pick_enable_set {
         [[Set possibility color picking.]]
         return: bool; [[$true on success, $false otherwise]]
         params {
            @in color_pick: bool; [[Possibility flag]]
         }
      }

      @property root_node {
         set {
            [[Set the root node of a scene.]]
         }
         get {
            [[Get the root node of a scene.]]
         }
         values {
            node: Evas.Canvas3D.Node; [[A node which will be used as a
                                        root node for the scene.]]
         }
      }

      @property camera_node {
         set {
            [[Set the camera node of a scene.]]
         }
         get {
            [[Get the camera node of a scene.]]
         }
         values {
            node: Evas.Canvas3D.Node; [[A node which will be used as a
                                        camera node for the scene.]]
         }
      }
      @property shadows_depth {
         set {
            [[Set scale and units used to calculate depth values.]]
         }
         get {
            [[Get scale and units used to calculate depth values.]]
         }
         values {
            depth_offset: Evas.Real; [[Scale factor that is used to
                                       create a variable depth offset
                                       for each polygon.]]
            depth_constant: Evas.Real; [[Value to create a constant
                                         depth offset]]
         }
      }
}
   implements {
      Efl.Object.constructor;
      Evas.Canvas3D.Object.update_notify;
      Evas.Canvas3D.Object.change_notify;
   }
}