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_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... | |
const EOAPI 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... | |
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... | |
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.
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.
[in] | obj | The object. |
[in] | type | Node type |
Referenced by edje_3d_object_add().
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
.
[in] | obj | The object. |
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.
[in] | obj | The object. |
[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] | obj | The object. |
[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.
[in] | obj | The object. |
Get the list of member nodes of the given node.
See also evas_canvas3d_node_member_add.
[in] | obj | The object. |
null
if there are none. Get hash table of scenes using this node as root.
[in] | obj | The object. |
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] | obj | The object. |
[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] | obj | The object. |
[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] | obj | The object. |
[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] | obj | The object. |
[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] | obj | The object. |
[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] | obj | The object. |
[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] | obj | The object. |
[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] | obj | The object. |
[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] | obj | The object. |
[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] | obj | The object. |
[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.
[in] | obj | The object. |
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] | obj | The object. |
[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] | obj | The object. |
[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. |
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] | obj | The object. |
[in] | inherit | Whether to inherit parent position. |
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] | obj | The object. |
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] | obj | The object. |
[in] | inherit | Whether to inherit parent orientation. |
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] | obj | The object. |
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] | obj | The object. |
[in] | inherit | Whether to inherit parent scale. |
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] | obj | The object. |
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.
[in] | obj | The object. |
[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 | ) |
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.
[in] | obj | The object. |
null
if there're none. 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.
[in] | obj | The object. |
[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 | ) |
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.
[in] | obj | The object. |
null
if there're none. 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.
[in] | obj | The object. |
[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 | ||
) |
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] | obj | The object. |
[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] | obj | The 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 | ) |
Set behavior of node like billboard object.
[in] | obj | The object. |
null
if there're none. Enable behavior of node like LOD object.
[in] | obj | The object. |
[in] | enable | status property (true/false) |