![]() |
RAMSES Documentation
27.0.130
Information for RAMSES users and developers
|
The Node is the base class of all nodes and provides scene graph functionality which propagates to its children. More...
#include <Node.h>
Public Member Functions | |
bool | hasChild () const |
Returns if node has at least one child Node. More... | |
uint32_t | getChildCount () const |
Gets the number of child Nodes of this node. More... | |
Node * | getChild (uint32_t index) |
Gets child node at provided index. More... | |
const Node * | getChild (uint32_t index) const |
Gets child node at provided index. More... | |
status_t | addChild (Node &node) |
Adds child Node to this node. More... | |
status_t | removeChild (Node &node) |
Removes a child Node from this node. More... | |
status_t | removeAllChildren () |
Removes all child Nodes from this node. More... | |
bool | hasParent () const |
Returns if Node has a parent Node. More... | |
Node * | getParent () |
Gets parent Node of this Node. More... | |
const Node * | getParent () const |
Gets parent Node of this Node. More... | |
status_t | setParent (Node &node) |
Sets parent Node for this node. More... | |
status_t | removeParent () |
Removes the parent Node from this Node. More... | |
status_t | getModelMatrix (float(&modelMatrix)[16]) const |
Gets model (world in scene space) matrix computed from the scene graph. Performance note: this call will cause computation of a transformation chain, however the result is cached therefore subsequent calls will have little to none performance overhead as long as topology or transformation in the chain does not change. More... | |
status_t | getInverseModelMatrix (float(&inverseModelMatrix)[16]) const |
Gets inverse model (world in scene space) matrix computed from the scene graph. Performance note: this call will cause computation of a transformation chain, however the result is cached therefore subsequent calls will have little to none performance overhead as long as topology or transformation in the chain does not change. More... | |
status_t | rotate (float x, float y, float z) |
Rotates in all three directions with the given values without affecting the currently set rotation convention. More... | |
status_t | setRotation (float x, float y, float z) |
Sets the absolute rotation in all three directions for left-handed rotation using Euler ZYX rotation convention. If this function is used to set, then only ramses::Node::getRotation(float&,float&,float&)const can be used to get node rotation, which implicitly uses left-handed Euler ZYX rotation convention. More... | |
status_t | setRotation (float x, float y, float z, ERotationConvention rotationConvention) |
Sets the absolute rotation in all three directions for right-handed rotation using the chosen Euler angles rotation convention. If this function is used to set, then only ramses::Node::getRotation(float&,float&,float&,ERotationConvention&)const can be used to get node rotation. More... | |
status_t | getRotation (float &x, float &y, float &z) const |
Retrieves the absolute rotation for left-handed rotation using Euler ZYX rotation convention. More... | |
status_t | getRotation (float &x, float &y, float &z, ERotationConvention &rotationConvention) const |
Retrieves the absolute rotation for right-handed rotation in all three directions and the used Euler angles rotation convention. This function can be used only if ramses::Node::setRotation(float,float,float,ERotationConvention) is used to set node rotation. More... | |
status_t | translate (float x, float y, float z) |
Translates in all three directions with the given values. More... | |
status_t | setTranslation (float x, float y, float z) |
Sets the absolute translation the absolute values. More... | |
status_t | getTranslation (float &x, float &y, float &z) const |
Retrieves the current absolute translation. More... | |
status_t | scale (float x, float y, float z) |
Scales in all three directions with the given values. More... | |
status_t | setScaling (float x, float y, float z) |
Sets the absolute scale in all three dimensions. More... | |
status_t | getScaling (float &x, float &y, float &z) const |
Retrieves the current absolute scale in all three dimensions. More... | |
status_t | setVisibility (EVisibilityMode mode) |
Sets the visibility of the Node. Visibility of a node determines if a renderable is rendered or not and if its resources are loaded. See EVisibilityMode for more details. Those attributes are propagated down to the node's children recursively. A node can only be rendered, if none of its parents are Invisible or Off, the node's resources are only loaded if none of its parents are Off. More... | |
EVisibilityMode | getVisibility () const |
Gets the visibility property of the Node. This is just the visibility state of this node object, NOT the hierarchically accumulated visibility of its parents. More... | |
![]() | |
sceneObjectId_t | getSceneObjectId () const |
Returns scene object id which is automatically assigned at creation time of object and is unique within scope of one scene. More... | |
sceneId_t | getSceneId () const |
Returns sceneid to which this object belongs to. More... | |
![]() | |
const char * | getName () const |
Returns the name of the object. More... | |
status_t | setName (const char *name) |
Changes the name of the object. More... | |
ERamsesObjectType | getType () const |
Gets type of the object. More... | |
bool | isOfType (ERamsesObjectType type) const |
Checks if the object is of given type. More... | |
![]() | |
status_t | validate () const |
Generates verbose validation of the object. More... | |
const char * | getValidationReport (EValidationSeverity minSeverity=EValidationSeverity_Info) const |
Provides verbose report in human readable form generated by validate. More... | |
const char * | getStatusMessage (status_t status) const |
Get the string description for a status provided by a RAMSES API function. More... | |
StatusObject (const StatusObject &other)=delete | |
Deleted copy constructor. More... | |
StatusObject & | operator= (const StatusObject &other)=delete |
Deleted copy assignment. More... | |
Public Attributes | |
class NodeImpl & | impl |
![]() | |
class SceneObjectImpl & | impl |
![]() | |
class ClientObjectImpl & | impl |
![]() | |
class RamsesObjectImpl & | impl |
![]() | |
class StatusObjectImpl & | impl |
Protected Member Functions | |
Node (NodeImpl &pimpl) | |
Constructor for Node. More... | |
virtual | ~Node () |
Destructor of the Node. More... | |
![]() | |
SceneObject (SceneObjectImpl &pimpl) | |
Constructor for SceneObject. More... | |
virtual | ~SceneObject () |
Destructor of the SceneObject. More... | |
![]() | |
ClientObject (ClientObjectImpl &pimpl) | |
Constructor for ClientObject. More... | |
virtual | ~ClientObject () |
Destructor of the ClientObject. More... | |
![]() | |
RamsesObject (RamsesObjectImpl &pimpl) | |
Constructor for RamsesObject. More... | |
virtual | ~RamsesObject () |
Destructor of the RamsesObject. More... | |
![]() | |
StatusObject (StatusObjectImpl &pimpl) | |
Constructor for StatusObject. More... | |
virtual | ~StatusObject () |
Destructor of the StatusObject. More... | |
Friends | |
class | SceneImpl |
Scene is the factory for creating Node instances. More... | |
The Node is the base class of all nodes and provides scene graph functionality which propagates to its children.
|
explicitprotected |
|
protectedvirtual |
Destructor of the Node.
Adds child Node to this node.
Node* ramses::Node::getChild | ( | uint32_t | index | ) |
Gets child node at provided index.
[in] | index | Index of the child Node to be returned. Index range is [0..getChildCount()-1]. |
const Node* ramses::Node::getChild | ( | uint32_t | index | ) | const |
Gets child node at provided index.
[in] | index | Index of the child Node to be returned. Index range is [0..getChildCount()-1]. |
uint32_t ramses::Node::getChildCount | ( | ) | const |
Gets the number of child Nodes of this node.
status_t ramses::Node::getInverseModelMatrix | ( | float(&) | inverseModelMatrix[16] | ) | const |
Gets inverse model (world in scene space) matrix computed from the scene graph. Performance note: this call will cause computation of a transformation chain, however the result is cached therefore subsequent calls will have little to none performance overhead as long as topology or transformation in the chain does not change.
[out] | inverseModelMatrix | Will be filled with the inverse model matrix 4x4 column-major |
status_t ramses::Node::getModelMatrix | ( | float(&) | modelMatrix[16] | ) | const |
Gets model (world in scene space) matrix computed from the scene graph. Performance note: this call will cause computation of a transformation chain, however the result is cached therefore subsequent calls will have little to none performance overhead as long as topology or transformation in the chain does not change.
[out] | modelMatrix | Will be filled with the model matrix 4x4 column-major |
Node* ramses::Node::getParent | ( | ) |
const Node* ramses::Node::getParent | ( | ) | const |
status_t ramses::Node::getRotation | ( | float & | x, |
float & | y, | ||
float & | z | ||
) | const |
Retrieves the absolute rotation for left-handed rotation using Euler ZYX rotation convention.
This function can be used only if ramses::Node::setRotation(float,float,float) is used to set node rotation, which implicitly uses left-handed Euler ZYX rotation convention, otherwise it will fail.
Default value is 0 for all components.
[out] | x | Current value in degrees on x-axis. |
[out] | y | Current value in degrees on y-axis. |
[out] | z | Current value in degrees on z-axis. |
status_t ramses::Node::getRotation | ( | float & | x, |
float & | y, | ||
float & | z, | ||
ERotationConvention & | rotationConvention | ||
) | const |
Retrieves the absolute rotation for right-handed rotation in all three directions and the used Euler angles rotation convention. This function can be used only if ramses::Node::setRotation(float,float,float,ERotationConvention) is used to set node rotation.
Default value is 0 for all components and ERotationConvention::XYZ.
It is possible to use different rotation conventions on different nodes within the same scene. However, it is strongly advised not to mix this function with set/get rotation with legacy convention within same scene.
[out] | x | Current value in degrees for rotation around x-axis in case of Tait-Bryan conventions, in case of Proper Euler conventions gets the rotation angle for the first angle in the convention name. |
[out] | y | Current value in degrees for rotation around y-axis in case of Tait-Bryan conventions, in case of Proper Euler conventions gets the rotation angle for the second angle in the convention name. |
[out] | z | Current value in degrees for rotation around z-axis in case of Tait-Bryan conventions, in case of Proper Euler conventions gets the rotation angle for the third angle in the convention name. |
[out] | rotationConvention | The rotation convention to use for calculation of rotation matrix. |
status_t ramses::Node::getScaling | ( | float & | x, |
float & | y, | ||
float & | z | ||
) | const |
Retrieves the current absolute scale in all three dimensions.
[out] | x | The current scaling in x-dimension. |
[out] | y | The current scaling in y-dimension. |
[out] | z | The current scaling in z-dimension. |
status_t ramses::Node::getTranslation | ( | float & | x, |
float & | y, | ||
float & | z | ||
) | const |
Retrieves the current absolute translation.
[out] | x | Current translation on x-axis. |
[out] | y | Current translation on y-axis. |
[out] | z | Current translation on z-axis. |
EVisibilityMode ramses::Node::getVisibility | ( | ) | const |
Gets the visibility property of the Node. This is just the visibility state of this node object, NOT the hierarchically accumulated visibility of its parents.
bool ramses::Node::hasChild | ( | ) | const |
bool ramses::Node::hasParent | ( | ) | const |
status_t ramses::Node::removeAllChildren | ( | ) |
Removes all child Nodes from this node.
Removes a child Node from this node.
status_t ramses::Node::removeParent | ( | ) |
Removes the parent Node from this Node.
status_t ramses::Node::rotate | ( | float | x, |
float | y, | ||
float | z | ||
) |
Rotates in all three directions with the given values without affecting the currently set rotation convention.
This function can be used only if ramses::Node::setRotation(float,float,float) is used to set node rotation, which implicitly uses left-handed Euler ZYX rotation convention, otherwise it will fail.
[in] | x | Value in degrees which is added to the current rotation around x-axis |
[in] | y | Value in degrees which is added to the current rotation around y-axis |
[in] | z | Value in degrees which is added to the current rotation around z-axis |
status_t ramses::Node::scale | ( | float | x, |
float | y, | ||
float | z | ||
) |
Scales in all three directions with the given values.
[in] | x | The relative scaling factor which in x-dimension. |
[in] | y | The relative scaling factor which in y-dimension. |
[in] | z | The relative scaling factor which in z-dimension. |
Sets parent Node for this node.
status_t ramses::Node::setRotation | ( | float | x, |
float | y, | ||
float | z | ||
) |
Sets the absolute rotation in all three directions for left-handed rotation using Euler ZYX rotation convention. If this function is used to set, then only ramses::Node::getRotation(float&,float&,float&)const can be used to get node rotation, which implicitly uses left-handed Euler ZYX rotation convention.
[in] | x | The value in degrees for the rotation around x-axis. |
[in] | y | The value in degrees for the rotation around y-axis. |
[in] | z | The value in degrees for the rotation around z-axis. |
status_t ramses::Node::setRotation | ( | float | x, |
float | y, | ||
float | z, | ||
ERotationConvention | rotationConvention | ||
) |
Sets the absolute rotation in all three directions for right-handed rotation using the chosen Euler angles rotation convention. If this function is used to set, then only ramses::Node::getRotation(float&,float&,float&,ERotationConvention&)const can be used to get node rotation.
It is possible to use different rotation conventions on different nodes within the same scene. However, it is strongly advised not to mix this function with set/get rotation with legacy convention within same scene.
[in] | x | The value in degrees for the rotation around x-axis in case of Tait-Bryan conventions, for Proper Euler conventions specifies the rotation angle for the first angle in the convention name. |
[in] | y | The value in degrees for the rotation around y-axis in case of Tait-Bryan conventions, for Proper Euler conventions specifies the rotation angle for the second angle in the convention name. |
[in] | z | The value in degrees for the rotation around z-axis in case of Tait-Bryan conventions, for Proper Euler conventions specifies the rotation angle for the third angle in the convention name. |
[in] | rotationConvention | The rotation convention to use for calculation of rotation matrix. |
status_t ramses::Node::setScaling | ( | float | x, |
float | y, | ||
float | z | ||
) |
Sets the absolute scale in all three dimensions.
[in] | x | The scaling factor in x-dimension. |
[in] | y | The scaling factor in y-dimension. |
[in] | z | The scaling factor in z-dimension. |
status_t ramses::Node::setTranslation | ( | float | x, |
float | y, | ||
float | z | ||
) |
Sets the absolute translation the absolute values.
[in] | x | Float with absolute translation value in x-axis. |
[in] | y | Float with absolute translation value in y-axis. |
[in] | z | Float with absolute translation value in z-axis. |
status_t ramses::Node::setVisibility | ( | EVisibilityMode | mode | ) |
Sets the visibility of the Node. Visibility of a node determines if a renderable is rendered or not and if its resources are loaded. See EVisibilityMode for more details. Those attributes are propagated down to the node's children recursively. A node can only be rendered, if none of its parents are Invisible or Off, the node's resources are only loaded if none of its parents are Off.
[in] | mode | Visibility mode for this node (default is Visible) |
status_t ramses::Node::translate | ( | float | x, |
float | y, | ||
float | z | ||
) |
Translates in all three directions with the given values.
[in] | x | Float with relative translation from origin on x-axis. |
[in] | y | Float with relative translation from origin on y-axis. |
[in] | z | Float with relative translation from origin on z-axis. |
class NodeImpl& ramses::Node::impl |
Stores internal data for implementation specifics of Node.