Macros | Functions
Scene Object

The Evas_Canvas3D_Scene structure represents a captured image of a scene graph through its viewing camera. More...

Macros

#define EVAS_CANVAS3D_SCENE_CLASS   evas_canvas3d_scene_class_get()
 Efl 3D canvas scene class.
 

Functions

EOAPI void evas_canvas3d_scene_size_set (Eo *obj, int w, int h)
 Set the resolution of a scene. More...
 
EOAPI void evas_canvas3d_scene_size_get (const Eo *obj, int *w, int *h)
 Get the internal resolution of a scene. More...
 
EOAPI void evas_canvas3d_scene_background_color_set (Eo *obj, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
 Set the background color of a scene. More...
 
EOAPI void evas_canvas3d_scene_background_color_get (const Eo *obj, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a)
 Get the background color of a scene. More...
 
EOAPI Eina_Bool evas_canvas3d_scene_pick (const Eo *obj, Evas_Real x, Evas_Real y, Evas_Canvas3D_Node **node, Evas_Canvas3D_Mesh **mesh, Evas_Real *s, Evas_Real *t)
 Get information on the most front visible mesh for the given position. More...
 
EOAPI Evas_Canvas3D_Node * evas_canvas3d_scene_exist (const Eo *obj, Evas_Real x, Evas_Real y, Evas_Canvas3D_Node *node)
 Search given node in the given position. More...
 
EOAPI Eina_Listevas_canvas3d_scene_pick_member_list_get (const Eo *obj, Evas_Real x, Evas_Real y)
 Get list of the all root members from scene in the given position. More...
 
EOAPI void evas_canvas3d_scene_shadows_enable_set (Eo *obj, Eina_Bool shadows_enabled)
 Enable or disable shadows on given scene. More...
 
EOAPI Eina_Bool evas_canvas3d_scene_shadows_enable_get (const Eo *obj)
 Get shadows enabled status for given scene. More...
 
EOAPI Eina_Bool evas_canvas3d_scene_color_pick_enable_get (const Eo *obj)
 Get status of color picking of the scene. More...
 
EOAPI Eina_Bool evas_canvas3d_scene_color_pick_enable_set (Eo *obj, Eina_Bool color_pick)
 Set possibility color picking. More...
 
EOAPI void evas_canvas3d_scene_root_node_set (Eo *obj, Evas_Canvas3D_Node *node)
 The root node of a scene. More...
 
EOAPI Evas_Canvas3D_Node * evas_canvas3d_scene_root_node_get (const Eo *obj)
 The root node of a scene. More...
 
EOAPI void evas_canvas3d_scene_camera_node_set (Eo *obj, Evas_Canvas3D_Node *node)
 The camera node of a scene. More...
 
EOAPI Evas_Canvas3D_Node * evas_canvas3d_scene_camera_node_get (const Eo *obj)
 The camera node of a scene. More...
 
EOAPI void evas_canvas3d_scene_shadows_depth_set (Eo *obj, Evas_Real depth_offset, Evas_Real depth_constant)
 Scale and units used to calculate depth values. More...
 
EOAPI void evas_canvas3d_scene_shadows_depth_get (const Eo *obj, Evas_Real *depth_offset, Evas_Real *depth_constant)
 Scale and units used to calculate depth values. More...
 

Detailed Description

The Evas_Canvas3D_Scene structure represents a captured image of a scene graph through its viewing camera.

A scene can be associated with an image object for canvas display via the evas_object_image_scene_set() function.

Function Documentation

◆ evas_canvas3d_scene_size_set()

EOAPI void evas_canvas3d_scene_size_set ( Eo obj,
int  w,
int  h 
)

Set the resolution of a scene.

A scene should be rendered to be displayed through image objects. The resolution defines the size of the internal surface holding the rendered result.

Parameters
[in]objThe object.
[in]wWidth of the resolution.
[in]hHeight of the resolution.

◆ evas_canvas3d_scene_size_get()

EOAPI void evas_canvas3d_scene_size_get ( const Eo obj,
int *  w,
int *  h 
)

Get the internal resolution of a scene.

Parameters
[in]objThe object.
[out]wPointer to receive width of the resolution.
[out]hPointer to receive height of the resolution.

◆ evas_canvas3d_scene_background_color_set()

EOAPI void evas_canvas3d_scene_background_color_set ( Eo obj,
Evas_Real  r,
Evas_Real  g,
Evas_Real  b,
Evas_Real  a 
)

Set the background color of a scene.

Background color defines the initial color of pixels before a scene is rendered. If you want to display a scene with background evas objects as if they're part of the background, set the alpha term to 0.0.

Default background color is (0.0, 0.0, 0.0, 0.0).

Parameters
[in]objThe object.
[in]rRed component of the background color.
[in]gGreen component of the background color.
[in]bBlue component of the background color.
[in]aAlpha component of the background color.

◆ evas_canvas3d_scene_background_color_get()

EOAPI void evas_canvas3d_scene_background_color_get ( const Eo obj,
Evas_Real r,
Evas_Real g,
Evas_Real b,
Evas_Real a 
)

Get the background color of a scene.

Parameters
[in]objThe object.
[out]rPointer to receive red component of the background color.
[out]gPointer to receive green component of the background color.
[out]bPointer to receive blue component of the background color.
[out]aPointer to receive alpha component of the background color.

◆ evas_canvas3d_scene_pick()

EOAPI Eina_Bool evas_canvas3d_scene_pick ( const Eo obj,
Evas_Real  x,
Evas_Real  y,
Evas_Canvas3D_Node **  node,
Evas_Canvas3D_Mesh **  mesh,
Evas_Real s,
Evas_Real t 
)

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.

Parameters
[in]objThe object.
[in]xX coordinate of the picking position.
[in]yY coordinate of the picking position.
[out]nodePointer to receive the node contains the picked mesh.
[out]meshPointer to receive the picked mesh.
[out]sPointer to receive the texture "s" coordinate.
[out]tPointer to receive the texture "t" coordinate.
Returns
true on success, false otherwise

◆ evas_canvas3d_scene_exist()

EOAPI Evas_Canvas3D_Node* evas_canvas3d_scene_exist ( const Eo obj,
Evas_Real  x,
Evas_Real  y,
Evas_Canvas3D_Node *  node 
)

Search given node in the given position.

Parameters
[in]objThe object.
[in]xX coordinate of the picking position.
[in]yY coordinate of the picking position.
[in]nodeNode for search.
Returns
Node at the given position

◆ evas_canvas3d_scene_pick_member_list_get()

EOAPI Eina_List* evas_canvas3d_scene_pick_member_list_get ( const Eo obj,
Evas_Real  x,
Evas_Real  y 
)

Get list of the all root members from scene in the given position.

Parameters
[in]objThe object.
[in]xX coordinate of the picking position.
[in]yY coordinate of the picking position.
Returns
List of all root members from scene

◆ evas_canvas3d_scene_shadows_enable_set()

EOAPI void evas_canvas3d_scene_shadows_enable_set ( Eo obj,
Eina_Bool  shadows_enabled 
)

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.

Parameters
[in]objThe object.
[in]shadows_enabledShadows enabled status.

◆ evas_canvas3d_scene_shadows_enable_get()

EOAPI Eina_Bool evas_canvas3d_scene_shadows_enable_get ( const Eo obj)

Get shadows enabled status for given scene.

Parameters
[in]objThe object.
Returns
The shadows enabled status.

◆ evas_canvas3d_scene_color_pick_enable_get()

EOAPI Eina_Bool evas_canvas3d_scene_color_pick_enable_get ( const Eo obj)

Get status of color picking of the scene.

Parameters
[in]objThe object.
Returns
The pick enabled status

◆ evas_canvas3d_scene_color_pick_enable_set()

EOAPI Eina_Bool evas_canvas3d_scene_color_pick_enable_set ( Eo obj,
Eina_Bool  color_pick 
)

Set possibility color picking.

Parameters
[in]objThe object.
[in]color_pickPossibility flag
Returns
true on success, false otherwise

◆ evas_canvas3d_scene_root_node_set()

EOAPI void evas_canvas3d_scene_root_node_set ( Eo obj,
Evas_Canvas3D_Node *  node 
)

The root node of a scene.

Parameters
[in]objThe object.
[in]nodeA node which will be used as a root node for the scene.

◆ evas_canvas3d_scene_root_node_get()

EOAPI Evas_Canvas3D_Node* evas_canvas3d_scene_root_node_get ( const Eo obj)

The root node of a scene.

Parameters
[in]objThe object.
Returns
A node which will be used as a root node for the scene.

◆ evas_canvas3d_scene_camera_node_set()

EOAPI void evas_canvas3d_scene_camera_node_set ( Eo obj,
Evas_Canvas3D_Node *  node 
)

The camera node of a scene.

Parameters
[in]objThe object.
[in]nodeA node which will be used as a camera node for the scene.

◆ evas_canvas3d_scene_camera_node_get()

EOAPI Evas_Canvas3D_Node* evas_canvas3d_scene_camera_node_get ( const Eo obj)

The camera node of a scene.

Parameters
[in]objThe object.
Returns
A node which will be used as a camera node for the scene.

◆ evas_canvas3d_scene_shadows_depth_set()

EOAPI void evas_canvas3d_scene_shadows_depth_set ( Eo obj,
Evas_Real  depth_offset,
Evas_Real  depth_constant 
)

Scale and units used to calculate depth values.

Parameters
[in]objThe object.
[in]depth_offsetScale factor that is used to create a variable depth offset for each polygon.
[in]depth_constantValue to create a constant depth offset

◆ evas_canvas3d_scene_shadows_depth_get()

EOAPI void evas_canvas3d_scene_shadows_depth_get ( const Eo obj,
Evas_Real depth_offset,
Evas_Real depth_constant 
)

Scale and units used to calculate depth values.

Parameters
[in]objThe object.
[out]depth_offsetScale factor that is used to create a variable depth offset for each polygon.
[out]depth_constantValue to create a constant depth offset