Macros | Functions
Node Object

Macros

#define EVAS_CANVAS3D_NODE_CLASS   evas_canvas3d_node_class_get()
 Evas 3D canvas node class.
 

Functions

EOAPI void evas_canvas3d_node_type_set (Eo *obj, Evas_Canvas3D_Node_Type type)
 Get the type of the given node. More...
 
EOAPI Evas_Canvas3D_Node_Type evas_canvas3d_node_type_get (const Eo *obj)
 Get the type of the given node. More...
 
EOAPI void evas_canvas3d_node_member_add (Eo *obj, Evas_Canvas3D_Node *member)
 Add a member node to the given node. More...
 
EOAPI void evas_canvas3d_node_member_del (Eo *obj, Evas_Canvas3D_Node *member)
 Delete a member node from the given node. More...
 
EOAPI Evas_Canvas3D_Node * evas_canvas3d_node_parent_get (const Eo *obj)
 Get the parent node of the given node. More...
 
const EOAPI Eina_Listevas_canvas3d_node_member_list_get (const Eo *obj)
 Get the list of member nodes of the given node. More...
 
EOAPI Eina_Hashevas_canvas3d_node_scene_root_get (Eo *obj)
 Get hash table of scenes using this node as root. More...
 
EOAPI void evas_canvas3d_node_position_set (Eo *obj, Evas_Real x, Evas_Real y, Evas_Real z)
 Set the position of the given node. More...
 
EOAPI void evas_canvas3d_node_orientation_set (Eo *obj, Evas_Real x, Evas_Real y, Evas_Real z, Evas_Real w)
 Set the orientation of the given node using quaternion. More...
 
EOAPI void evas_canvas3d_node_orientation_angle_axis_set (Eo *obj, Evas_Real angle, Evas_Real x, Evas_Real y, Evas_Real z)
 Set the orientation of the given node using axis-angle. More...
 
EOAPI void evas_canvas3d_node_scale_set (Eo *obj, Evas_Real x, Evas_Real y, Evas_Real z)
 Set the scale of the given node. More...
 
EOAPI void evas_canvas3d_node_position_get (const Eo *obj, Evas_Canvas3D_Space space, Evas_Real *x, Evas_Real *y, Evas_Real *z)
 Get the position of the given node. More...
 
EOAPI void evas_canvas3d_node_orientation_get (const Eo *obj, Evas_Canvas3D_Space space, Evas_Real *x, Evas_Real *y, Evas_Real *z, Evas_Real *w)
 Get the orientation of the given node as quaternion. More...
 
EOAPI void evas_canvas3d_node_scale_get (const Eo *obj, Evas_Canvas3D_Space space, Evas_Real *x, Evas_Real *y, Evas_Real *z)
 Get the scale of the given node. More...
 
EOAPI void evas_canvas3d_node_look_at_set (Eo *obj, Evas_Canvas3D_Space target_space, Evas_Real x, Evas_Real y, Evas_Real z, Evas_Canvas3D_Space up_space, Evas_Real ux, Evas_Real uy, Evas_Real uz)
 Rotate the given node to look at desired position. More...
 
EOAPI void evas_canvas3d_node_mesh_add (Eo *obj, Evas_Canvas3D_Mesh *mesh)
 Add a mesh to the given node. More...
 
EOAPI void evas_canvas3d_node_mesh_del (Eo *obj, Evas_Canvas3D_Mesh *mesh)
 Delete a mesh from the given node. More...
 
const EOAPI Eina_Listevas_canvas3d_node_mesh_list_get (const Eo *obj)
 Get the list of meshes of the given node. More...
 
EOAPI void evas_canvas3d_node_bounding_box_get (Eo *obj, Evas_Real *x, Evas_Real *y, Evas_Real *z, Evas_Real *x2, Evas_Real *y2, Evas_Real *z2)
 Get axis-aligned bounding box (AABB) of the given node. More...
 
EOAPI void evas_canvas3d_node_bounding_sphere_get (Eo *obj, Evas_Real *x, Evas_Real *y, Evas_Real *z, Evas_Real *r)
 Get bounding sphere of the given node. More...
 
EOAPI void evas_canvas3d_node_position_inherit_set (Eo *obj, Eina_Bool inherit)
 The position inheritance flag of the given node. More...
 
EOAPI Eina_Bool evas_canvas3d_node_position_inherit_get (const Eo *obj)
 The position inheritance flag of the given node. More...
 
EOAPI void evas_canvas3d_node_orientation_inherit_set (Eo *obj, Eina_Bool inherit)
 The orientation inheritance flag of the given node. More...
 
EOAPI Eina_Bool evas_canvas3d_node_orientation_inherit_get (const Eo *obj)
 The orientation inheritance flag of the given node. More...
 
EOAPI void evas_canvas3d_node_scale_inherit_set (Eo *obj, Eina_Bool inherit)
 The scale inheritance flag of the given node. More...
 
EOAPI Eina_Bool evas_canvas3d_node_scale_inherit_get (const Eo *obj)
 The scale inheritance flag of the given node. More...
 
EOAPI void evas_canvas3d_node_camera_set (Eo *obj, Evas_Canvas3D_Object *camera)
 A camera attached to the given node. More...
 
EOAPI Evas_Canvas3D_Object * evas_canvas3d_node_camera_get (const Eo *obj)
 A camera attached to the given node. More...
 
EOAPI void evas_canvas3d_node_light_set (Eo *obj, Evas_Canvas3D_Light *light)
 A light attached to the given node. More...
 
EOAPI Evas_Canvas3D_Light * evas_canvas3d_node_light_get (const Eo *obj)
 A light attached to the given node. More...
 
EOAPI void evas_canvas3d_node_mesh_frame_set (Eo *obj, Evas_Canvas3D_Mesh *mesh, int frame)
 The animation frame number of the given node for the given mesh. More...
 
EOAPI int evas_canvas3d_node_mesh_frame_get (const Eo *obj, Evas_Canvas3D_Mesh *mesh)
 The animation frame number of the given node for the given mesh. More...
 
EOAPI void evas_canvas3d_node_billboard_target_set (Eo *obj, Evas_Canvas3D_Node *target)
 Set behavior of node like billboard object. More...
 
EOAPI Evas_Canvas3D_Node * evas_canvas3d_node_billboard_target_get (const Eo *obj)
 Set behavior of node like billboard object. More...
 
EOAPI void evas_canvas3d_node_lod_enable_set (Eo *obj, Eina_Bool enable)
 Enable behavior of node like LOD object. More...
 
EOAPI Eina_Bool evas_canvas3d_node_lod_enable_get (const Eo *obj)
 Enable behavior of node like LOD object. More...
 

Detailed Description

The Evas_Canvas3D_Node structure defines the position, orientation, and scale of canvas objects (cameras, lights, meshes, etc.) in a 3D space. These nodes can be organized into a hierarchical n-ary tree structure to construct a scene graph.

Function Documentation

◆ evas_canvas3d_node_type_set()

EOAPI void evas_canvas3d_node_type_set ( Eo obj,
Evas_Canvas3D_Node_Type  type 
)

Get the type of the given node.

See also evas_canvas3d_node_member_add.

Type can only be set before finalize.

Parameters
[in]objThe object.
[in]typeNode type

Referenced by edje_3d_object_add().

◆ evas_canvas3d_node_type_get()

EOAPI Evas_Canvas3D_Node_Type evas_canvas3d_node_type_get ( const Eo obj)

Get the type of the given node.

See also evas_canvas3d_node_member_add.

If the object is not node object, returns unknown.

Parameters
[in]objThe object.
Returns
Node type

◆ evas_canvas3d_node_member_add()

EOAPI void evas_canvas3d_node_member_add ( Eo obj,
Evas_Canvas3D_Node *  member 
)

Add a member node to the given node.

Nodes can be constructed into N-ary tree structure like other ordinary scene graphs. A node inherit transforms from its parent.

See also evas_canvas3d_node_parent_get.

Parameters
[in]objThe object.
[in]memberNode object to be added.

◆ evas_canvas3d_node_member_del()

EOAPI void evas_canvas3d_node_member_del ( Eo obj,
Evas_Canvas3D_Node *  member 
)

Delete a member node from the given node.

See also evas_canvas3d_node_member_add.

Parameters
[in]objThe object.
[in]memberMember node to be deleted from the given node.

◆ evas_canvas3d_node_parent_get()

EOAPI Evas_Canvas3D_Node* evas_canvas3d_node_parent_get ( const Eo obj)

Get the parent node of the given node.

See also evas_canvas3d_node_member_add.

Parameters
[in]objThe object.
Returns
The parent node of the given node.

◆ evas_canvas3d_node_member_list_get()

const EOAPI Eina_List* evas_canvas3d_node_member_list_get ( const Eo obj)

Get the list of member nodes of the given node.

See also evas_canvas3d_node_member_add.

Parameters
[in]objThe object.
Returns
The list of member nodes if any or null if there are none.

◆ evas_canvas3d_node_scene_root_get()

EOAPI Eina_Hash* evas_canvas3d_node_scene_root_get ( Eo obj)

Get hash table of scenes using this node as root.

Parameters
[in]objThe object.
Returns
scenes using this node as root. FIXME: Actually a scene, not object.

◆ evas_canvas3d_node_position_set()

EOAPI void evas_canvas3d_node_position_set ( Eo obj,
Evas_Real  x,
Evas_Real  y,
Evas_Real  z 
)

Set the position of the given node.

According to the inheritance flag, (x, y, z) can be a world space position or parent space position.

Default position is (0.0, 0.0, 0.0).

See also evas_canvas3d_node_position_inherit_set.

Parameters
[in]objThe object.
[in]xX coordinate of the position.
[in]yY coordinate of the position.
[in]zZ coordinate of the position.

◆ evas_canvas3d_node_orientation_set()

EOAPI void evas_canvas3d_node_orientation_set ( Eo obj,
Evas_Real  x,
Evas_Real  y,
Evas_Real  z,
Evas_Real  w 
)

Set the orientation of the given node using quaternion.

According the the inheritance flag, (w, x, y, z) can be a world space orientation or parent space orientation.

Default orientation is (1.0, 0.0, 0.0, 0.0) (identity quaternion).

See also evas_canvas3d_node_orientation_inherit_set.

Parameters
[in]objThe object.
[in]xX term of the orientation quaternion (w, x, y, z.
[in]yY term of the orientation quaternion (w, x, y, z.
[in]zZ term of the orientation quaternion (w, x, y, z.
[in]wW term of the orientation quaternion (w, x, y, z.

◆ evas_canvas3d_node_orientation_angle_axis_set()

EOAPI void evas_canvas3d_node_orientation_angle_axis_set ( Eo obj,
Evas_Real  angle,
Evas_Real  x,
Evas_Real  y,
Evas_Real  z 
)

Set the orientation of the given node using axis-angle.

See also evas_canvas3d_node_orientation_set.

Parameters
[in]objThe object.
[in]angleRotation angle.
[in]xX term of the rotation axis.
[in]yY term of the rotation axis.
[in]zZ term of the rotation axis.

◆ evas_canvas3d_node_scale_set()

EOAPI void evas_canvas3d_node_scale_set ( Eo obj,
Evas_Real  x,
Evas_Real  y,
Evas_Real  z 
)

Set the scale of the given node.

According to the inheritance flag, (x, y, z) can be a world space scale or parent space scale. Be careful when using non-uniform scale factor with inheritance, each transform attributes are not affected by other attributes.

Default scale is (1.0, 1.0, 1.0).

See also evas_canvas3d_node_scale_inherit_set.

Parameters
[in]objThe object.
[in]xScale factor along X-axis.
[in]yScale factor along Y-axis.
[in]zScale factor along Z-axis.

◆ evas_canvas3d_node_position_get()

EOAPI void evas_canvas3d_node_position_get ( const Eo obj,
Evas_Canvas3D_Space  space,
Evas_Real x,
Evas_Real y,
Evas_Real z 
)

Get the position of the given node.

See also evas_canvas3d_node_position_set.

Parameters
[in]objThe object.
[in]spaceThe given node.
[out]xPointer to receive X coordinate of the position.
[out]yPointer to receive Y coordinate of the position.
[out]zPointer to receive Z coordinate of the position.

◆ evas_canvas3d_node_orientation_get()

EOAPI void evas_canvas3d_node_orientation_get ( const Eo obj,
Evas_Canvas3D_Space  space,
Evas_Real x,
Evas_Real y,
Evas_Real z,
Evas_Real w 
)

Get the orientation of the given node as quaternion.

See also evas_canvas3d_node_orientation_set.

Parameters
[in]objThe object.
[in]spaceThe given node.
[out]xPointer to receive X term of the orientation quaternion.
[out]yPointer to receive Y term of the orientation quaternion.
[out]zPointer to receive Z term of the orientation quaternion.
[out]wPointer to receive W term of the orientation quaternion.

◆ evas_canvas3d_node_scale_get()

EOAPI void evas_canvas3d_node_scale_get ( const Eo obj,
Evas_Canvas3D_Space  space,
Evas_Real x,
Evas_Real y,
Evas_Real z 
)

Get the scale of the given node.

See also evas_canvas3d_node_scale_get.

Parameters
[in]objThe object.
[in]spaceThe given node.
[out]xPointer to receive Scale factor along X-axis.
[out]yPointer to receive Scale factor along X-axis.
[out]zPointer to receive Scale factor along X-axis.

◆ evas_canvas3d_node_look_at_set()

EOAPI void evas_canvas3d_node_look_at_set ( Eo obj,
Evas_Canvas3D_Space  target_space,
Evas_Real  x,
Evas_Real  y,
Evas_Real  z,
Evas_Canvas3D_Space  up_space,
Evas_Real  ux,
Evas_Real  uy,
Evas_Real  uz 
)

Rotate the given node to look at desired position.

This function rotate the given node so that its forward vector (negative Z-axis) points to the desired position and the up vector coincide with the given up vector.

See also evas_canvas3d_node_orientation_set.

Parameters
[in]objThe object.
[in]target_spaceSpace where the target position belongs to.
[in]xX coordinate of the target position.
[in]yY coordinate of the target position.
[in]zZ coordinate of the target position.
[in]up_spaceSpace where the up vector belongs to.
[in]uxX term of the up vector.
[in]uyY term of the up vector.
[in]uzZ term of the up vector.

◆ evas_canvas3d_node_mesh_add()

EOAPI void evas_canvas3d_node_mesh_add ( Eo obj,
Evas_Canvas3D_Mesh *  mesh 
)

Add a mesh to the given node.

If the node is not of type EVAS_CANVAS3D_NODE_TYPE_MESH, error message will be generated and nothing happens.

See also evas_canvas3d_node_member_add.

Parameters
[in]objThe object.
[in]meshThe mesh to be added.

◆ evas_canvas3d_node_mesh_del()

EOAPI void evas_canvas3d_node_mesh_del ( Eo obj,
Evas_Canvas3D_Mesh *  mesh 
)

Delete a mesh from the given node.

If the node is not of type EVAS_CANVAS3D_NODE_TYPE_MESH or the given mesh does not belong to the given node, error message will be gnerated and nothing happens.

See also evas_canvas3d_node_mesh_add.

Parameters
[in]objThe object.
[in]meshThe mesh to be deleted.

◆ evas_canvas3d_node_mesh_list_get()

const EOAPI Eina_List* evas_canvas3d_node_mesh_list_get ( const Eo obj)

Get the list of meshes of the given node.

If the node is not of type EVAS_CANVAS3D_NODE_TYPE_MESH, error message will be generated and null will be returned. If there're no meshes in the given node, null will be returned.

See also evas_canvas3d_node_mesh_add.

Parameters
[in]objThe object.
Returns
The list of meshes if any, or null if there're none.

◆ evas_canvas3d_node_bounding_box_get()

EOAPI void evas_canvas3d_node_bounding_box_get ( Eo obj,
Evas_Real x,
Evas_Real y,
Evas_Real z,
Evas_Real x2,
Evas_Real y2,
Evas_Real z2 
)

Get axis-aligned bounding box (AABB) of the given node.

Parameters
[in]objThe object.
[in]xPointer to receive X coordinate of the first point of AABB.
[in]yPointer to receive Y coordinate of the first point of AABB.
[in]zPointer to receive Z coordinate of the first point of AABB.
[in]x2Pointer to receive X coordinate of the second point of AABB.
[in]y2Pointer to receive Y coordinate of the second point of AABB.
[in]z2Pointer to receive Z coordinate of the second point of AABB.

◆ evas_canvas3d_node_bounding_sphere_get()

EOAPI void evas_canvas3d_node_bounding_sphere_get ( Eo obj,
Evas_Real x,
Evas_Real y,
Evas_Real z,
Evas_Real r 
)

Get bounding sphere of the given node.

Parameters
[in]objThe object.
[in]xPointer to receive X coordinate of the center of sphere.
[in]yPointer to receive Y coordinate of the center of sphere.
[in]zPointer to receive Z coordinate of center of sphere.
[in]rPointer to receive radius of center of sphere.

◆ evas_canvas3d_node_position_inherit_set()

EOAPI void evas_canvas3d_node_position_inherit_set ( Eo obj,
Eina_Bool  inherit 
)

The position inheritance flag of the given node.

When inheritance is enabled, a node's world space position is determined by adding the parent node's world position and the node's position. Otherwise the node's position will be the world space position.

Parameters
[in]objThe object.
[in]inheritWhether to inherit parent position.

◆ evas_canvas3d_node_position_inherit_get()

EOAPI Eina_Bool evas_canvas3d_node_position_inherit_get ( const Eo obj)

The position inheritance flag of the given node.

When inheritance is enabled, a node's world space position is determined by adding the parent node's world position and the node's position. Otherwise the node's position will be the world space position.

Parameters
[in]objThe object.
Returns
Whether to inherit parent position.

◆ evas_canvas3d_node_orientation_inherit_set()

EOAPI void evas_canvas3d_node_orientation_inherit_set ( Eo obj,
Eina_Bool  inherit 
)

The orientation inheritance flag of the given node.

When inheritance is enabled, a node's world space orientation is determined by multiplying the parent node's world orientation and the node's orientation. Otherwise the node's orientation will be the world space orientation.

Parameters
[in]objThe object.
[in]inheritWhether to inherit parent orientation.

◆ evas_canvas3d_node_orientation_inherit_get()

EOAPI Eina_Bool evas_canvas3d_node_orientation_inherit_get ( const Eo obj)

The orientation inheritance flag of the given node.

When inheritance is enabled, a node's world space orientation is determined by multiplying the parent node's world orientation and the node's orientation. Otherwise the node's orientation will be the world space orientation.

Parameters
[in]objThe object.
Returns
Whether to inherit parent orientation.

◆ evas_canvas3d_node_scale_inherit_set()

EOAPI void evas_canvas3d_node_scale_inherit_set ( Eo obj,
Eina_Bool  inherit 
)

The scale inheritance flag of the given node.

When inheritance is enabled, a node's world space scale is determined by multiplying the parent node's world scale and the node's scale. Otherwise the node's scale will be the world space scale.

Parameters
[in]objThe object.
[in]inheritWhether to inherit parent scale.

◆ evas_canvas3d_node_scale_inherit_get()

EOAPI Eina_Bool evas_canvas3d_node_scale_inherit_get ( const Eo obj)

The scale inheritance flag of the given node.

When inheritance is enabled, a node's world space scale is determined by multiplying the parent node's world scale and the node's scale. Otherwise the node's scale will be the world space scale.

Parameters
[in]objThe object.
Returns
Whether to inherit parent scale.

◆ evas_canvas3d_node_camera_set()

EOAPI void evas_canvas3d_node_camera_set ( Eo obj,
Evas_Canvas3D_Object *  camera 
)

A camera attached to the given node.

If the node is not of type EVAS_CANVAS3D_NODE_TYPE_CAMERA, error message will be generated and nothing happens.

See also evas_canvas3d_node_member_add.

Parameters
[in]objThe object.
[in]cameraThe camera of the given node if any, or null if there're none.

◆ evas_canvas3d_node_camera_get()

EOAPI Evas_Canvas3D_Object* evas_canvas3d_node_camera_get ( const Eo obj)

A camera attached to the given node.

If the node is not of type EVAS_CANVAS3D_NODE_TYPE_CAMERA, error message will be generated and nothing happens.

See also evas_canvas3d_node_member_add.

Parameters
[in]objThe object.
Returns
The camera of the given node if any, or null if there're none.

◆ evas_canvas3d_node_light_set()

EOAPI void evas_canvas3d_node_light_set ( Eo obj,
Evas_Canvas3D_Light *  light 
)

A light attached to the given node.

If the node is not of type EVAS_CANVAS3D_NODE_TYPE_LIGHT, error message will be generated and nothing happens.

See also evas_canvas3d_node_member_add.

Parameters
[in]objThe object.
[in]lightThe light of the given node if any, or null if there're none.

◆ evas_canvas3d_node_light_get()

EOAPI Evas_Canvas3D_Light* evas_canvas3d_node_light_get ( const Eo obj)

A light attached to the given node.

If the node is not of type EVAS_CANVAS3D_NODE_TYPE_LIGHT, error message will be generated and nothing happens.

See also evas_canvas3d_node_member_add.

Parameters
[in]objThe object.
Returns
The light of the given node if any, or null if there're none.

◆ evas_canvas3d_node_mesh_frame_set()

EOAPI void evas_canvas3d_node_mesh_frame_set ( Eo obj,
Evas_Canvas3D_Mesh *  mesh,
int  frame 
)

The animation frame number of the given node for the given mesh.

If the node is not of type EVAS_CANVAS3D_NODE_TYPE_MESH or the given mesh does not belong to the given mesh error mesh will be generated and nothing happens.

Default mesh frame is 0.

See also evas_canvas3d_node_mesh_add.

Parameters
[in]objThe object.
[in]meshThe given mesh.
[in]frameThe animation frame number.

◆ evas_canvas3d_node_mesh_frame_get()

EOAPI int evas_canvas3d_node_mesh_frame_get ( const Eo obj,
Evas_Canvas3D_Mesh *  mesh 
)

The animation frame number of the given node for the given mesh.

If the node is not of type EVAS_CANVAS3D_NODE_TYPE_MESH or the given mesh does not belong to the given mesh error mesh will be generated and nothing happens.

Default mesh frame is 0.

See also evas_canvas3d_node_mesh_add.

Parameters
[in]objThe object.
[in]meshThe given mesh.
Returns
The animation frame number.

◆ evas_canvas3d_node_billboard_target_set()

EOAPI void evas_canvas3d_node_billboard_target_set ( Eo obj,
Evas_Canvas3D_Node *  target 
)

Set behavior of node like billboard object.

Parameters
[in]objThe object.
[in]targetThe pointer to target node for billboard object, or null if there're none.

◆ evas_canvas3d_node_billboard_target_get()

EOAPI Evas_Canvas3D_Node* evas_canvas3d_node_billboard_target_get ( const Eo obj)

Set behavior of node like billboard object.

Parameters
[in]objThe object.
Returns
The pointer to target node for billboard object, or null if there're none.

◆ evas_canvas3d_node_lod_enable_set()

EOAPI void evas_canvas3d_node_lod_enable_set ( Eo obj,
Eina_Bool  enable 
)

Enable behavior of node like LOD object.

Parameters
[in]objThe object.
[in]enablestatus property (true/false)

◆ evas_canvas3d_node_lod_enable_get()

EOAPI Eina_Bool evas_canvas3d_node_lod_enable_get ( const Eo obj)

Enable behavior of node like LOD object.

Parameters
[in]objThe object.
Returns
status property (true/false)