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::RenderGroup Class Reference

The RenderGroup is a container used to collect renderables which are supposed to be rendered together. Renderables added to it can be ordered within the RenderGroup so that they will be rendered in given order. RenderGroup can then be added to a RenderPass (again with optional order of RenderGroup within the RenderPass) so a hierarchical ordering of renderables can be achieved. The RenderGroup can also contain other nested RenderGroups ordered together with the renderables. If a RenderGroup with nested RenderGroups is added to a RenderPass, all renderables in all nested RenderGroups will be rendered within the RenderPass as well. The order inside a nested RenderGroup is local, i.e. all its renderables/RenderGroups are rendered before the next renderable/RenderGroup of its parent RenderGroup. More...

#include <RenderGroup.h>

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

Public Member Functions

status_t addMeshNode (const MeshNode &mesh, int32_t orderWithinGroup=0)
 Add a mesh to this RenderGroup. If a mesh is already contained in this RenderGroup only its render order is updated. Mesh can be added to multiple RenderGroup instances. More...
 
status_t removeMeshNode (const MeshNode &mesh)
 Remove a mesh from this RenderGroup. More...
 
bool containsMeshNode (const MeshNode &mesh) const
 Checks whether a mesh was added to this RenderGroup. More...
 
status_t getMeshNodeOrder (const MeshNode &mesh, int32_t &orderWithinGroup) const
 Gets a render order of given MeshNode within this RenderGroup. More...
 
status_t addRenderGroup (const RenderGroup &renderGroup, int32_t orderWithinGroup=0)
 Add a RenderGroup to this RenderGroup. If a RenderGroup is already contained in this RenderGroup only its render order is updated. RenderGroup can be added to multiple RenderGroup instances. More...
 
status_t removeRenderGroup (const RenderGroup &renderGroup)
 Remove a RenderGroup from this RenderGroup. More...
 
bool containsRenderGroup (const RenderGroup &renderGroup) const
 Checks whether a RenderGroup was added to this RenderGroup. More...
 
status_t getRenderGroupOrder (const RenderGroup &renderGroup, int32_t &orderWithinGroup) const
 Gets a render order of given RenderGroup within this RenderGroup. More...
 
status_t removeAllRenderables ()
 Will remove all renderables from this RenderGroup. Renderables in nested RenderGroups will stay. More...
 
status_t removeAllRenderGroups ()
 Will remove all RenderGroups from this RenderGroup. This is done NON-recursively, i.e. the RenderGroups themselves stay untouched. 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 RenderGroupImpl & 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

 RenderGroup (RenderGroupImpl &pimpl)
 Constructor for RenderGroup. More...
 
virtual ~RenderGroup ()
 Destructor of the RenderGroup. 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 RenderGroup instances. More...
 

Detailed Description

The RenderGroup is a container used to collect renderables which are supposed to be rendered together. Renderables added to it can be ordered within the RenderGroup so that they will be rendered in given order. RenderGroup can then be added to a RenderPass (again with optional order of RenderGroup within the RenderPass) so a hierarchical ordering of renderables can be achieved. The RenderGroup can also contain other nested RenderGroups ordered together with the renderables. If a RenderGroup with nested RenderGroups is added to a RenderPass, all renderables in all nested RenderGroups will be rendered within the RenderPass as well. The order inside a nested RenderGroup is local, i.e. all its renderables/RenderGroups are rendered before the next renderable/RenderGroup of its parent RenderGroup.

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, ramses-example-renderonce/src/main.cpp, ramses-example-text-basic/src/main.cpp, and ramses-example-text-languages/src/main.cpp.

Constructor & Destructor Documentation

◆ RenderGroup()

ramses::RenderGroup::RenderGroup ( RenderGroupImpl &  pimpl)
explicitprotected

Constructor for RenderGroup.

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

◆ ~RenderGroup()

virtual ramses::RenderGroup::~RenderGroup ( )
protectedvirtual

Destructor of the RenderGroup.

Member Function Documentation

◆ addMeshNode()

status_t ramses::RenderGroup::addMeshNode ( const MeshNode mesh,
int32_t  orderWithinGroup = 0 
)

Add a mesh to this RenderGroup. If a mesh is already contained in this RenderGroup only its render order is updated. Mesh can be added to multiple RenderGroup instances.

Parameters
[in]meshThe mesh to add to this RenderGroup.
[in]orderWithinGroupOrder within the RenderGroup that will be used for rendering. Mesh with lower number will be rendered before a mesh with higher number.
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, ramses-example-renderonce/src/main.cpp, ramses-example-text-basic/src/main.cpp, and ramses-example-text-languages/src/main.cpp.

◆ addRenderGroup()

status_t ramses::RenderGroup::addRenderGroup ( const RenderGroup renderGroup,
int32_t  orderWithinGroup = 0 
)

Add a RenderGroup to this RenderGroup. If a RenderGroup is already contained in this RenderGroup only its render order is updated. RenderGroup can be added to multiple RenderGroup instances.

Parameters
[in]renderGroupThe RenderGroup to add to this RenderGroup.
[in]orderWithinGroupOrder within the RenderGroup that will be used for rendering. RenderGroup with lower number will be rendered before a RenderGroup with higher number.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-basic-rendergroups/src/main.cpp.

◆ containsMeshNode()

bool ramses::RenderGroup::containsMeshNode ( const MeshNode mesh) const

Checks whether a mesh was added to this RenderGroup.

Parameters
[in]meshThe mesh to query
Returns
true if the mesh is contained in this RenderGroup false otherwise

◆ containsRenderGroup()

bool ramses::RenderGroup::containsRenderGroup ( const RenderGroup renderGroup) const

Checks whether a RenderGroup was added to this RenderGroup.

Parameters
[in]renderGroupThe RenderGroup to query
Returns
true if the RenderGroup is contained in this RenderGroup false otherwise

◆ getMeshNodeOrder()

status_t ramses::RenderGroup::getMeshNodeOrder ( const MeshNode mesh,
int32_t &  orderWithinGroup 
) const

Gets a render order of given MeshNode within this RenderGroup.

Parameters
[in]meshThe MeshNode to query order for
[out]orderWithinGroupOrder of the MeshNode within this RenderGroup
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ getRenderGroupOrder()

status_t ramses::RenderGroup::getRenderGroupOrder ( const RenderGroup renderGroup,
int32_t &  orderWithinGroup 
) const

Gets a render order of given RenderGroup within this RenderGroup.

Parameters
[in]renderGroupThe RenderGroup to query order for
[out]orderWithinGroupOrder of the RenderGroup within this RenderGroup
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ removeAllRenderables()

status_t ramses::RenderGroup::removeAllRenderables ( )

Will remove all renderables from this RenderGroup. Renderables in nested RenderGroups will stay.

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

◆ removeAllRenderGroups()

status_t ramses::RenderGroup::removeAllRenderGroups ( )

Will remove all RenderGroups from this RenderGroup. This is done NON-recursively, i.e. the RenderGroups themselves stay untouched.

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

◆ removeMeshNode()

status_t ramses::RenderGroup::removeMeshNode ( const MeshNode mesh)

Remove a mesh from this RenderGroup.

Parameters
[in]meshThe mesh to remove from this RenderGroup.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ removeRenderGroup()

status_t ramses::RenderGroup::removeRenderGroup ( const RenderGroup renderGroup)

Remove a RenderGroup from this RenderGroup.

Parameters
[in]renderGroupThe RenderGroup to remove from this RenderGroup.
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 RenderGroup instances.

Member Data Documentation

◆ impl

class RenderGroupImpl& ramses::RenderGroup::impl

Stores internal data for implementation specifics of RenderGroup.


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