A node is used for hierarchical construction of a scene graph. More...
Functions | |
EOAPI void | evas_canvas3d_node_position_inherit_set (Eo *obj, Eina_Bool inherit) |
Set the position inheritance flag of the given node. More... | |
EOAPI Eina_Bool | evas_canvas3d_node_position_inherit_get (const Eo *obj) |
Get the position inheritance flag of the given node. More... | |
EOAPI void | evas_canvas3d_node_orientation_inherit_set (Eo *obj, Eina_Bool inherit) |
Set the orientation inheritance flag of the given node. More... | |
EOAPI Eina_Bool | evas_canvas3d_node_orientation_inherit_get (const Eo *obj) |
Get the orientation inheritance flag of the given node. More... | |
EOAPI void | evas_canvas3d_node_scale_inherit_set (Eo *obj, Eina_Bool inherit) |
Set the scale inheritance flag of the given node. More... | |
EOAPI Eina_Bool | evas_canvas3d_node_scale_inherit_get (const Eo *obj) |
Get the scale inheritance flag of the given node. More... | |
EOAPI void | evas_canvas3d_node_camera_set (Eo *obj, Evas_Canvas3D_Object *camera) |
Set a camera to the given node. More... | |
EOAPI Evas_Canvas3D_Object * | evas_canvas3d_node_camera_get (const Eo *obj) |
Get the camera of the given node. More... | |
EOAPI void | evas_canvas3d_node_light_set (Eo *obj, Evas_Canvas3D_Light *light) |
Set the light of the given node. More... | |
EOAPI Evas_Canvas3D_Light * | evas_canvas3d_node_light_get (const Eo *obj) |
Get the light of the given node. More... | |
EOAPI void | evas_canvas3d_node_mesh_frame_set (Eo *obj, Evas_Canvas3D_Mesh *mesh, int frame) |
Set 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) |
Set 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) |
Get the target node for 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) |
Get(check) status of node does node is LOD object. More... | |
EOAPI void | evas_canvas3d_node_constructor (Eo *obj, Evas_Canvas3D_Node_Type type) |
Constructor. 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... | |
EOAPI const Eina_List * | evas_canvas3d_node_member_list_get (const Eo *obj) |
Get the list of member nodes of the given node. More... | |
EOAPI Eina_Hash * | evas_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... | |
EOAPI const Eina_List * | evas_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... | |
A node is used for hierarchical construction of a scene graph.
Evas 3D provides n-ary tree structure for the scene graph construction. A node has its position, orientation and scale. Other objects, like camera, light and mesh can be contained in a node to be located in a 3D space.
Set 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.
[in] | inherit | Whether to inherit parent position. |
Get the position inheritance flag of the given node.
See also evas_canvas3d_node_position_inherit_set.
Set 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.
[in] | inherit | Whether to inherit parent orientation. |
Get the orientation inheritance flag of the given node.
See also evas_canvas3d_node_orientation_inherit_set.
Set 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.
[in] | inherit | Whether to inherit parent scale. |
Get the scale inheritance flag of the given node.
See also evas_canvas3d_node_scale_inherit_set.
EOAPI void evas_canvas3d_node_camera_set | ( | Eo * | obj, |
Evas_Canvas3D_Object * | camera | ||
) |
Set a camera 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.
[in] | camera | The camera of the given node if any, or null if there're none. |
EOAPI Evas_Canvas3D_Object* evas_canvas3d_node_camera_get | ( | const Eo * | obj | ) |
Get the camera of the given node.
See also evas_canvas3d_node_camera_set.
null
if there're none. EOAPI void evas_canvas3d_node_light_set | ( | Eo * | obj, |
Evas_Canvas3D_Light * | light | ||
) |
Set the light of 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.
[in] | light | The light of the given node if any, or null if there're none. |
EOAPI Evas_Canvas3D_Light* evas_canvas3d_node_light_get | ( | const Eo * | obj | ) |
Get the light of the given node.
See also evas_canvas3d_node_light_set.
null
if there're none. EOAPI void evas_canvas3d_node_mesh_frame_set | ( | Eo * | obj, |
Evas_Canvas3D_Mesh * | mesh, | ||
int | frame | ||
) |
Set 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.
[in] | mesh | The given mesh. |
[in] | frame | The animation frame number. |
EOAPI int evas_canvas3d_node_mesh_frame_get | ( | const Eo * | obj, |
Evas_Canvas3D_Mesh * | mesh | ||
) |
Set 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.
See also evas_canvas3d_node_mesh_add.
[in] | mesh | The given mesh. |
EOAPI void evas_canvas3d_node_billboard_target_set | ( | Eo * | obj, |
Evas_Canvas3D_Node * | target | ||
) |
Set behavior of node like billboard object.
[in] | target | The pointer to target node for billboard object, or null if there're none. |
EOAPI Evas_Canvas3D_Node* evas_canvas3d_node_billboard_target_get | ( | const Eo * | obj | ) |
Get the target node for billboard object.
See also evas_canvas3d_node_billboard_target_set.
null
if there're none. Enable behavior of node like LOD object.
[in] | enable | status property (true/false) |
Get(check) status of node does node is LOD object.
See also evas_canvas3d_node_lod_enable_set.
EOAPI void evas_canvas3d_node_constructor | ( | Eo * | obj, |
Evas_Canvas3D_Node_Type | type | ||
) |
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.
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 graph. Basically a node inherit transforms from its parent.
See also evas_canvas3d_node_parent_get.
[in] | member | Node object to be added. |
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.
[in] | member | Member node to be deleted from the given node. |
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.
Get the list of member nodes of the given node.
See also evas_canvas3d_node_member_add.
null
if there are none. Get hash table of scenes using this node as root.
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.
[in] | x | X coordinate of the position. |
[in] | y | Y coordinate of the position. |
[in] | z | Z coordinate of the position. |
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.
[in] | x | X term of the orientation quaternion (w, x, y, z. |
[in] | y | Y term of the orientation quaternion (w, x, y, z. |
[in] | z | Z term of the orientation quaternion (w, x, y, z. |
[in] | w | W term of the orientation quaternion (w, x, y, z. |
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.
[in] | angle | Rotation angle. |
[in] | x | X term of the rotation axis. |
[in] | y | Y term of the rotation axis. |
[in] | z | Z term of the rotation axis. |
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.
[in] | x | Scale factor along X-axis. |
[in] | y | Scale factor along Y-axis. |
[in] | z | Scale factor along Z-axis. |
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.
[in] | space | The given node. |
[out] | x | Pointer to receive X coordinate of the position. |
[out] | y | Pointer to receive Y coordinate of the position. |
[out] | z | Pointer to receive Z coordinate of the position. |
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.
[in] | space | The given node. |
[out] | x | Pointer to receive X term of the orientation quaternion. |
[out] | y | Pointer to receive Y term of the orientation quaternion. |
[out] | z | Pointer to receive Z term of the orientation quaternion. |
[out] | w | Pointer to receive W term of the orientation quaternion. |
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.
[in] | space | The given node. |
[out] | x | Pointer to receive Scale factor along X-axis. |
[out] | y | Pointer to receive Scale factor along X-axis. |
[out] | z | Pointer to receive Scale factor along X-axis. |
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.
[in] | target_space | Space where the target position belongs to. |
[in] | x | X coordinate of the target position. |
[in] | y | Y coordinate of the target position. |
[in] | z | Z coordinate of the target position. |
[in] | up_space | Space where the up vector belongs to. |
[in] | ux | X term of the up vector. |
[in] | uy | Y term of the up vector. |
[in] | uz | Z term of the up vector. |
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.
[in] | mesh | The mesh to be added. |
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.
[in] | mesh | The mesh to be deleted. |
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.
null
if there're none. 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.
[in] | x | Pointer to receive X coordinate of the first point of AABB. |
[in] | y | Pointer to receive Y coordinate of the first point of AABB. |
[in] | z | Pointer to receive Z coordinate of the first point of AABB. |
[in] | x2 | Pointer to receive X coordinate of the second point of AABB. |
[in] | y2 | Pointer to receive Y coordinate of the second point of AABB. |
[in] | z2 | Pointer to receive Z coordinate of the second point of AABB. |
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.
[in] | x | Pointer to receive X coordinate of the center of sphere. |
[in] | y | Pointer to receive Y coordinate of the center of sphere. |
[in] | z | Pointer to receive Z coordinate of center of sphere. |
[in] | r | Pointer to receive radius of center of sphere. |