SceneGraph
Home | About XEngine | Engine API | SceneGraph | Changelog | Programming Guide |
Index| Scene Description Language | camera | directory | eventmessage | geometry | group | input | light | node | primitives | root | spinner | transformation | user | |
Node
Derived from: | - |
Class name: | Node3D |
Description: | This is the generic node, which every other node is subclassed from. It has no functional counterpart in the scene description language, other than define the minimum set of messages all nodes accept and therefore you cannot include it in the XML file. |
Function List
Name | XE_scene_create_node |
Arguments | XE_SCENE_NODE node_type, const char* node_name, unsigned int attachToGroupNodeId |
Return Type | unsigned int |
Description | Creates a node of type XE_SCENE_NODE Parameters: node_type - Currently supported node types are: SN_CAMERA, SN_GEOMETRY, SN_GROUP, SN_INPUT, SN_LIGHT, SN_TRANSFORM, SN_USER node_name - The node's name. If null, an auto-generated name will be assigned. Names must be unique. If an existing name is provided, an auto-generated name will be used instead. attachToGroupNodeId - Nodes can only be attached to group nodes. attachToGroupNodeId - Nodes can only be attached to group nodes. Group nodes are the SN_ROOT, SN_GROUP, SN_USER, SN_SPINNER and SN_TRANSFORM. Providing -1 attaches the node to the Root node. |
Notes: |
Name | XE_scene_destroy_node |
Arguments | int node_id |
Return Type | bool |
Description | Destroys the node and all its children with the associated id Parameters: - node_id, the id of the node to be destroyed Returns true if the node was found and destroyed. The root node cannot be destroyed. |
Notes: |
Name | XE_scene_get_node_id |
Arguments | const char* node_name |
Return Type | unsigned int |
Description | Retrieves the node id for that name. Parameters: - node_name, the name of the node Returns the node id if found, -1 otherwise |
Notes: |
Name | XE_scene_get_node_name |
Arguments | unsigned int node_id |
Return Type | const char* |
Description | Retrieves the node name for that id. Parameters: - node_id, the id of the node Returns the node name if found, null otherwise |
Notes: |
Name | XE_scene_get_node_transform |
Arguments | int node_id, float* mat |
Return Type | bool |
Description | Retrieves the transformation associated with the provided node id Parameters: - node_id, the node's id - mat, a pointer to a 16 float array containing the transformation Returns true if the node id was found |
Notes: |
Name | XE_scene_get_node_previous_transform |
Arguments | int node_id, float* mat |
Return Type | bool |
Description | Retrieves the transformation from the previous update for the provided node id Parameters: - node_id, the node's id - mat, a pointer to a 16 float array containing the transformation Returns true if the node id was found |
Notes: |
Name | XE_scene_get_node_world_position |
Arguments | int node_id, float&x, float& y, float& z |
Return Type | bool |
Description | Retrieves a 3D vector which provides the central position of the node in world coordinates Parameters: - node_id, the node's id - x, the x value of the position vector in world coordinates - y, the y value of the position vector in world coordinates - z, the z value of the position vector in world coordinates Returns true if the node id was found |
Notes: |
Name | XE_scene_set_node_active_status |
Arguments | int node_id, bool status |
Return Type | bool |
Description | Sets whether the node is active (inactive nodes are not getting updated) Parameters: - node_id, the node's id - status, a flag indicating whether the node is active Returns true if the node id was found |
Notes: |
Name | XE_scene_get_node_active_status |
Arguments | int node_id, bool& status |
Return Type | bool |
Description | Retrieves the node's active status Parameters: - node_id, the node's id - status, a flag indicating whether the node is active Returns true if the node id was found |
Notes: |
Name | XE_scene_set_node_visible_status |
Arguments | int node_id, bool status |
Return Type | bool |
Description | Sets whether the node is visible (invisible nodes are not getting rendered) Parameters: - node_id, the node's id - mat, a pointer to a 16 float array containing the transformation Returns true if the node id was found |
Notes: |
Name | XE_scene_get_node_visible_status |
Arguments | int node_id, bool& status |
Return Type | bool |
Description | Retrieves the node's visible status Parameters: - node_id, the node's id - mat, a pointer to a 16 float array containing the transformation Returns true if the node id was found |
Notes: |
Name | XE_scene_get_node_box_bounds |
Arguments | int node_id, int node_id, float& min_x, float& min_y, float& min_z, float& max_x, float& max_y, float& max_z |
Return Type | bool |
Description | Retrieves the node's bounding box min and max values Parameters: - node_id, the node's id - min_x, the value of the minimum x coordinate of the bounding box in world coordinates - min_y, the value of the minimum y coordinate of the bounding box in world coordinates - min_z, the value of the minimum z coordinate of the bounding box in world coordinates - max_x, the value of the maximum x coordinate of the bounding box in world coordinates - max_y, the value of the maximum y coordinate of the bounding box in world coordinates - max_z, the value of the maximum z coordinate of the bounding box in world coordinates Returns true if the node id was found |
Notes: |
Name | XE_scene_get_node_box_size |
Arguments | int node_id, float& x, float& y, float& z |
Return Type | bool |
Description | Retrieves the bounding box's size (max - min) Parameters: - node_id, the node's id - x, the x value of the of the bounding box size - y, the y value of the of the bounding box size - z, the z value of the of the bounding box size Returns true if the node id was found |
Notes: |
Name | XE_scene_get_node_box_center |
Arguments | int node_id, float& x, float& y, float& z |
Return Type | bool |
Description | Retrieves the bounding box's center Parameters: - node_id, the node's id - x, the x value of the of the bounding box center - y, the y value of the of the bounding box center - z, the z value of the of the bounding box center Returns true if the node id was found |
Notes: |
Scene Description Language Declaration
XML node name | - | |||||||||||||||||||||||||||
Placement: | Nowhere | |||||||||||||||||||||||||||
Special notes: | It cannot be declared in the scene file. | |||||||||||||||||||||||||||
Inherited attributes: | - | |||||||||||||||||||||||||||
New attributes: |
|
|||||||||||||||||||||||||||
Events: |
|
|||||||||||||||||||||||||||
Inherited events: | - | |||||||||||||||||||||||||||
New messages: |
|
|||||||||||||||||||||||||||
Inherited messages: | - | |||||||||||||||||||||||||||
Redefined messages: | - | |||||||||||||||||||||||||||
Obsolete messages: | - |
Last updated 3 Jun. 2013