Murl Engine Lua Addon API  Version 1.0 beta
Murl.Graph.ISubState

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.


Table members

Methods


GetNodeInterface()

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.

Murl.Graph.INode GetNodeInterface()

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

SetPreservedStatesIncludeMask(mask)

Set the traversal states to be preserved.

Boolean SetPreservedStatesIncludeMask(Integer mask)

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

GetPreservedStatesIncludeMask()

Get the traversal states to be preserved.

Integer GetPreservedStatesIncludeMask()

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

SetPreservedStatesExcludeMask(mask)

Set the traversal states to be explicitly not preserved.

Boolean SetPreservedStatesExcludeMask(Integer mask)

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

GetPreservedStatesExcludeMask()

Get the traversal states to be explicitly not preserved.

Integer GetPreservedStatesExcludeMask()

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