The ISubState graph node interface. More...

#include "murl_graph_i_sub_state.h"

Inheritance diagram for Murl::Graph::ISubState:

Public Member Functions

virtual INodeGetNodeInterface ()=0
 Get the mutable Graph::INode interface. More...
 
virtual const INodeGetNodeInterface () const =0
 Get the constant Graph::INode interface. More...
 
virtual Bool SetPreservedStatesIncludeMask (UInt32 mask)=0
 Set the traversal states to be preserved. More...
 
virtual UInt32 GetPreservedStatesIncludeMask () const =0
 Get the traversal states to be preserved. More...
 
virtual Bool SetPreservedStatesExcludeMask (UInt32 mask)=0
 Set the traversal states to be explicitly not preserved. More...
 
virtual UInt32 GetPreservedStatesExcludeMask () const =0
 Get the traversal states to be explicitly not preserved. More...
 

Detailed Description

The ISubState graph node interface.

Graph::ISubState nodes can be used to encapsulate scene graph traversal state changes, so that the user does not have to track all changes to e.g. material states, texture states etc.

By default, when it gets initialized, a sub state node determines the states that get actually changed during traversal of its sub-graph. When the scene graph gets traversed, only those states are preserved. It is possible to manually override this behavior by setting a state bit mask via SetPreservedStatesIncludeMask() and SetPreservedStatesExcludeMask(), to either include additional preserved states or force the node to not include specific ones.

State preserving is not free; the more states are changing within the sub-graph, the more information must be kept at each traversal. Especially when a lot of texture and/or material state slots are involved, this can be a costly operation.

Member Function Documentation

◆ GetNodeInterface() [1/2]

virtual INode* Murl::Graph::ISubState::GetNodeInterface ( )
pure virtual

Get the mutable Graph::INode interface.

This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.

Returns
The mutable Graph::INode interface, or null if not available

◆ GetNodeInterface() [2/2]

virtual const INode* Murl::Graph::ISubState::GetNodeInterface ( ) const
pure virtual

Get the constant Graph::INode interface.

This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.

Returns
The constant Graph::INode interface, or null if not available

◆ SetPreservedStatesIncludeMask()

virtual Bool Murl::Graph::ISubState::SetPreservedStatesIncludeMask ( UInt32  mask)
pure virtual

Set the traversal states to be preserved.

Parameters
maskA bit mask of individual traversal states. See IEnums::TraversalState.
Returns
true if successful.

◆ GetPreservedStatesIncludeMask()

virtual UInt32 Murl::Graph::ISubState::GetPreservedStatesIncludeMask ( ) const
pure virtual

Get the traversal states to be preserved.

Returns
A bit mask of individual traversal states. See IEnums::TraversalState.

◆ SetPreservedStatesExcludeMask()

virtual Bool Murl::Graph::ISubState::SetPreservedStatesExcludeMask ( UInt32  mask)
pure virtual

Set the traversal states to be explicitly not preserved.

Parameters
maskA bit mask of individual traversal states. See IEnums::TraversalState.
Returns
true if successful.

◆ GetPreservedStatesExcludeMask()

virtual UInt32 Murl::Graph::ISubState::GetPreservedStatesExcludeMask ( ) const
pure virtual

Get the traversal states to be explicitly not preserved.

Returns
A bit mask of individual traversal states. See IEnums::TraversalState.

The documentation for this interface was generated from the following file:
  • murl_graph_i_sub_state.h


Copyright © 2011-2024 Spraylight GmbH.