RAMSES Documentation  27.0.130
Information for RAMSES users and developers
Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
ramses::MeshNode Class Reference

The MeshNode holds all information which is needed to render an object to the screen. More...

#include <MeshNode.h>

Inheritance diagram for ramses::MeshNode:
[legend]
Collaboration diagram for ramses::MeshNode:
[legend]

Public Member Functions

status_t setAppearance (Appearance &appearance)
 Sets the Appearance of the MeshNode. More...
 
status_t setGeometryBinding (GeometryBinding &geometry)
 Sets the GeometryBinding of the MeshNode. More...
 
status_t setStartIndex (uint32_t startIndex)
 Sets the first index of indices array that will be used for rendering. More...
 
uint32_t getStartIndex () const
 Gets the first index of indices array that will be used for rendering. More...
 
status_t setStartVertex (uint32_t startVertex)
 Sets the offset of the first vertex to use from each vertex array that will be used for rendering the mesh. More...
 
uint32_t getStartVertex () const
 Gets the first vertex of vertex arrays that will be used for rendering. More...
 
status_t setIndexCount (uint32_t indexCount)
 Sets the number of indices that will be used for rendering. More...
 
uint32_t getIndexCount () const
 Gets the number of indices that will be used for rendering. More...
 
const AppearancegetAppearance () const
 Returns the appearance. More...
 
status_t removeAppearanceAndGeometry ()
 Removes the Appearance and GeometryBinding previously set to the MeshNode. More...
 
AppearancegetAppearance ()
 Returns the appearance. More...
 
const GeometryBindinggetGeometryBinding () const
 Returns the geometry binding. More...
 
GeometryBindinggetGeometryBinding ()
 Returns the geometry binding. More...
 
status_t setInstanceCount (uint32_t instanceCount)
 Sets the number of instances that will be drawn for this mesh by the renderer. More...
 
uint32_t getInstanceCount () const
 Gets the number of instance that will be drawn for this mesh by the renderer. More...
 
- Public Member Functions inherited from ramses::Node
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...
 
NodegetChild (uint32_t index)
 Gets child node at provided index. More...
 
const NodegetChild (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...
 
NodegetParent ()
 Gets parent Node of this Node. More...
 
const NodegetParent () 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...
 
- Public Member Functions inherited from ramses::SceneObject
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...
 
- Public Member Functions inherited from ramses::RamsesObject
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...
 
- Public Member Functions inherited from ramses::StatusObject
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...
 
StatusObjectoperator= (const StatusObject &other)=delete
 Deleted copy assignment. More...
 

Public Attributes

class MeshNodeImpl & impl
 
- Public Attributes inherited from ramses::Node
class NodeImpl & impl
 
- Public Attributes inherited from ramses::SceneObject
class SceneObjectImpl & impl
 
- Public Attributes inherited from ramses::ClientObject
class ClientObjectImpl & impl
 
- Public Attributes inherited from ramses::RamsesObject
class RamsesObjectImpl & impl
 
- Public Attributes inherited from ramses::StatusObject
class StatusObjectImpl & impl
 

Protected Member Functions

 MeshNode (MeshNodeImpl &pimpl)
 Constructor for MeshNode. More...
 
 MeshNode (const MeshNode &other)
 Copy constructor of MeshNode. More...
 
MeshNodeoperator= (const MeshNode &other)
 Assignment operator of MeshNode. More...
 
virtual ~MeshNode ()
 Destructor of the MeshNode. More...
 
- Protected Member Functions inherited from ramses::Node
 Node (NodeImpl &pimpl)
 Constructor for Node. More...
 
virtual ~Node ()
 Destructor of the Node. More...
 
- Protected Member Functions inherited from ramses::SceneObject
 SceneObject (SceneObjectImpl &pimpl)
 Constructor for SceneObject. More...
 
virtual ~SceneObject ()
 Destructor of the SceneObject. More...
 
- Protected Member Functions inherited from ramses::ClientObject
 ClientObject (ClientObjectImpl &pimpl)
 Constructor for ClientObject. More...
 
virtual ~ClientObject ()
 Destructor of the ClientObject. More...
 
- Protected Member Functions inherited from ramses::RamsesObject
 RamsesObject (RamsesObjectImpl &pimpl)
 Constructor for RamsesObject. More...
 
virtual ~RamsesObject ()
 Destructor of the RamsesObject. More...
 
- Protected Member Functions inherited from ramses::StatusObject
 StatusObject (StatusObjectImpl &pimpl)
 Constructor for StatusObject. More...
 
virtual ~StatusObject ()
 Destructor of the StatusObject. More...
 

Friends

class SceneImpl
 Scene is the factory for creating MeshNode instances. More...
 

Detailed Description

The MeshNode holds all information which is needed to render an object to the screen.

Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-basic-animation/src/main.cpp, ramses-example-basic-blending/src/main.cpp, ramses-example-basic-compositing/src/main.cpp, ramses-example-basic-effect-from-glsl/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-geometry/src/main.cpp, ramses-example-basic-rendergroups/src/main.cpp, ramses-example-basic-renderpasses/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-scenegraph/src/main.cpp, ramses-example-basic-texturing/src/main.cpp, ramses-example-data-buffers-texture/src/main.cpp, ramses-example-data-buffers-vertices/src/main.cpp, ramses-example-dcsm-provider/src/main.cpp, ramses-example-geometry-instancing/src/main.cpp, ramses-example-interleaved-vertex-buffers/src/main.cpp, ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-client/src/main.cpp, ramses-example-local-datalink/src/main.cpp, ramses-example-local-displays/src/main.cpp, ramses-example-local-dma-offscreenbuffer/src/main.cpp, ramses-example-local-geometry-shaders/src/main.cpp, ramses-example-local-offscreenbuffer/src/main.cpp, ramses-example-local-pick-handling/src/main.cpp, ramses-example-local-scene-referencing/src/main.cpp, ramses-example-local-viewport-link/src/main.cpp, and ramses-example-renderonce/src/main.cpp.

Constructor & Destructor Documentation

◆ MeshNode() [1/2]

ramses::MeshNode::MeshNode ( MeshNodeImpl &  pimpl)
explicitprotected

Constructor for MeshNode.

Parameters
[in]pimplInternal data for implementation specifics of MeshNode (sink - instance becomes owner)

◆ MeshNode() [2/2]

ramses::MeshNode::MeshNode ( const MeshNode other)
protected

Copy constructor of MeshNode.

Parameters
[in]otherOther instance of MeshNode class

◆ ~MeshNode()

virtual ramses::MeshNode::~MeshNode ( )
protectedvirtual

Destructor of the MeshNode.

Member Function Documentation

◆ getAppearance() [1/2]

Appearance* ramses::MeshNode::getAppearance ( )

Returns the appearance.

Returns
The appearance, null on failure or if none is set.

◆ getAppearance() [2/2]

const Appearance* ramses::MeshNode::getAppearance ( ) const

◆ getGeometryBinding() [1/2]

GeometryBinding* ramses::MeshNode::getGeometryBinding ( )

Returns the geometry binding.

Returns
The geometry binding, null on failure or if none is set.

◆ getGeometryBinding() [2/2]

const GeometryBinding* ramses::MeshNode::getGeometryBinding ( ) const

Returns the geometry binding.

Returns
The geometry binding, null on failure or if none is set.

◆ getIndexCount()

uint32_t ramses::MeshNode::getIndexCount ( ) const

Gets the number of indices that will be used for rendering.

Returns
the number of indices that will be used for rendering.

◆ getInstanceCount()

uint32_t ramses::MeshNode::getInstanceCount ( ) const

Gets the number of instance that will be drawn for this mesh by the renderer.

Returns
the number of instances of this mesh drawn on rendering.

◆ getStartIndex()

uint32_t ramses::MeshNode::getStartIndex ( ) const

Gets the first index of indices array that will be used for rendering.

Returns
the first index of indices array that will be used for rendering.

◆ getStartVertex()

uint32_t ramses::MeshNode::getStartVertex ( ) const

Gets the first vertex of vertex arrays that will be used for rendering.

Returns
the first index of indices array that will be used for rendering.

◆ operator=()

MeshNode& ramses::MeshNode::operator= ( const MeshNode other)
protected

Assignment operator of MeshNode.

Parameters
[in]otherOther instance of MeshNode class
Returns
This instance after assignment

◆ removeAppearanceAndGeometry()

status_t ramses::MeshNode::removeAppearanceAndGeometry ( )

Removes the Appearance and GeometryBinding previously set to the MeshNode.

Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setAppearance()

status_t ramses::MeshNode::setAppearance ( Appearance appearance)

Sets the Appearance of the MeshNode.

Parameters
appearanceThe Appearance for the MeshNode.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-basic-animation/src/main.cpp, ramses-example-basic-blending/src/main.cpp, ramses-example-basic-compositing/src/main.cpp, ramses-example-basic-effect-from-glsl/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-geometry/src/main.cpp, ramses-example-basic-rendergroups/src/main.cpp, ramses-example-basic-renderpasses/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-scenegraph/src/main.cpp, ramses-example-basic-texturing/src/main.cpp, ramses-example-data-buffers-texture/src/main.cpp, ramses-example-data-buffers-vertices/src/main.cpp, ramses-example-dcsm-provider/src/main.cpp, ramses-example-geometry-instancing/src/main.cpp, ramses-example-interleaved-vertex-buffers/src/main.cpp, ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-client/src/main.cpp, ramses-example-local-datalink/src/main.cpp, ramses-example-local-displays/src/main.cpp, ramses-example-local-dma-offscreenbuffer/src/main.cpp, ramses-example-local-geometry-shaders/src/main.cpp, ramses-example-local-offscreenbuffer/src/main.cpp, ramses-example-local-pick-handling/src/main.cpp, ramses-example-local-scene-referencing/src/main.cpp, ramses-example-local-viewport-link/src/main.cpp, and ramses-example-renderonce/src/main.cpp.

◆ setGeometryBinding()

status_t ramses::MeshNode::setGeometryBinding ( GeometryBinding geometry)

Sets the GeometryBinding of the MeshNode.

When the given GeometryBinding has indices set, also sets start index to 0 and index count to the number of indices of geometry. When the GeometryBinding does not provide indices, the index count has to be set by setIndexCount in addition.

Parameters
geometryThe GeometryBinding for the MeshNode.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-basic-animation/src/main.cpp, ramses-example-basic-blending/src/main.cpp, ramses-example-basic-compositing/src/main.cpp, ramses-example-basic-effect-from-glsl/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-geometry/src/main.cpp, ramses-example-basic-rendergroups/src/main.cpp, ramses-example-basic-renderpasses/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-scenegraph/src/main.cpp, ramses-example-basic-texturing/src/main.cpp, ramses-example-data-buffers-texture/src/main.cpp, ramses-example-data-buffers-vertices/src/main.cpp, ramses-example-dcsm-provider/src/main.cpp, ramses-example-geometry-instancing/src/main.cpp, ramses-example-interleaved-vertex-buffers/src/main.cpp, ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-client/src/main.cpp, ramses-example-local-datalink/src/main.cpp, ramses-example-local-displays/src/main.cpp, ramses-example-local-dma-offscreenbuffer/src/main.cpp, ramses-example-local-geometry-shaders/src/main.cpp, ramses-example-local-offscreenbuffer/src/main.cpp, ramses-example-local-pick-handling/src/main.cpp, ramses-example-local-scene-referencing/src/main.cpp, ramses-example-local-viewport-link/src/main.cpp, and ramses-example-renderonce/src/main.cpp.

◆ setIndexCount()

status_t ramses::MeshNode::setIndexCount ( uint32_t  indexCount)

Sets the number of indices that will be used for rendering.

Parameters
[in]indexCountNumber of indices to be used.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-basic-geometry/src/main.cpp, and ramses-example-interleaved-vertex-buffers/src/main.cpp.

◆ setInstanceCount()

status_t ramses::MeshNode::setInstanceCount ( uint32_t  instanceCount)

Sets the number of instances that will be drawn for this mesh by the renderer.

Parameters
[in]instanceCountNumber of instances to be drawn (default: 1) Cannot be 0.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-geometry-instancing/src/main.cpp.

◆ setStartIndex()

status_t ramses::MeshNode::setStartIndex ( uint32_t  startIndex)

Sets the first index of indices array that will be used for rendering.

Parameters
[in]startIndexFirst index of indices to be used.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ setStartVertex()

status_t ramses::MeshNode::setStartVertex ( uint32_t  startVertex)

Sets the offset of the first vertex to use from each vertex array that will be used for rendering the mesh.

Parameters
[in]startVertexFirst vertex of vertex arrays to be used.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

Friends And Related Function Documentation

◆ SceneImpl

friend class SceneImpl
friend

Scene is the factory for creating MeshNode instances.

Member Data Documentation

◆ impl

class MeshNodeImpl& ramses::MeshNode::impl

Stores internal data for implementation specifics of MeshNode.


The documentation for this class was generated from the following file: