The basic scene graph node interface. More...

#include "murl_graph_i_node.h"

Inheritance diagram for Murl::Graph::INode:

Public Member Functions

virtual INodeGetNodeInterface ()=0
 Get the mutable INode interface. More...
 
virtual const INodeGetNodeInterface () const =0
 Get the constant INode interface. More...
 
virtual Bool DeserializeNode (IDeserializeAttributeTracker *tracker)=0
 Deserialize the node. More...
 
virtual Bool DeserializeAttribute (IDeserializeAttributeTracker *tracker)=0
 Deserialize a node attribute. More...
 
virtual Bool AddChild (INode *child)=0
 Add a child node. More...
 
virtual Bool InsertChild (INode *child, UInt32 index)=0
 Insert a child node at a given position. More...
 
virtual INodeRemoveChild (INode *child)=0
 Remove a child. More...
 
virtual INodeRemoveChild (UInt32 index)=0
 Remove a child from a given position. More...
 
virtual const INodeArrayGetChildren () const =0
 Get this node's children. More...
 
virtual INodeGetChild (UInt32 index)=0
 Return the child at a given position. More...
 
virtual INodeGetChild (const String &id)=0
 Return the first child with a given ID. More...
 
virtual const INodeGetChild (UInt32 index) const =0
 Return the child at a given position. More...
 
virtual const INodeGetChild (const String &id) const =0
 Return the first child with a given ID. More...
 
virtual SInt32 GetChildIndex (const INode *node) const =0
 Return the index of a given child. More...
 
virtual SInt32 GetChildIndex (const String &id) const =0
 Return the index of a child with a given ID. More...
 
virtual UInt32 GetNumberOfChildren () const =0
 Return the number of this node's children. More...
 
virtual Bool AddParent (INode *parent)=0
 Add a node parent at the end of the array of current parents. More...
 
virtual Bool InsertParent (INode *parent, UInt32 index)=0
 Insert a node parent at a given index. More...
 
virtual INodeRemoveParent (INode *parent)=0
 Remove a given parent. More...
 
virtual INodeRemoveParent (UInt32 index)=0
 Remove the parent from a given index. More...
 
virtual const INodeArrayGetParents () const =0
 Get a constant array of the node's parents. More...
 
virtual INodeGetParent (UInt32 index)=0
 Get a mutable pointer to the node's parent at a given index. More...
 
virtual INodeGetParent (const String &id)=0
 Get a mutable pointer to the node's parent with the given node ID. More...
 
virtual const INodeGetParent (UInt32 index) const =0
 Get a constant pointer to the node's parent at a given index. More...
 
virtual const INodeGetParent (const String &id) const =0
 Get a constant pointer to the node's parent with the given node ID. More...
 
virtual SInt32 GetParentIndex (const INode *node) const =0
 Return the index of a given parent. More...
 
virtual SInt32 GetParentIndex (const String &id) const =0
 Return the index of a parent with a given ID. More...
 
virtual UInt32 GetNumberOfParents () const =0
 Return the number of this node's parents. More...
 
virtual Bool AddController (IController *controller)=0
 Add a node controller. More...
 
virtual Bool InsertController (IController *controller, UInt32 index)=0
 Insert a node controller at a given position. More...
 
virtual IControllerRemoveController (IController *controller)=0
 Remove a node controller. More...
 
virtual IControllerRemoveController (UInt32 index)=0
 Remove a node controller from a given position. More...
 
virtual const IControllerArrayGetControllers () const =0
 Get a constant array of the node's controllers. More...
 
virtual IControllerGetController (UInt32 index)=0
 Get a mutable pointer to the node's controller at a given index. More...
 
virtual const IControllerGetController (UInt32 index) const =0
 Get a constant pointer to the node's controller at a given index. More...
 
virtual SInt32 GetControllerIndex (const IController *controller) const =0
 Return the index of a given controller. More...
 
virtual UInt32 GetNumberOfControllers () const =0
 Return the number of this node's controllers. More...
 
virtual INamespaceGetCurrentNamespace ()=0
 Get a mutable pointer to the namespace node this node belongs to. More...
 
virtual const INamespaceGetCurrentNamespace () const =0
 Get a constant pointer to the namespace node this node belongs to. More...
 
virtual INamespaceGetParentNamespace ()=0
 Get a mutable pointer to the namespace node this node's parent belongs to. More...
 
virtual const INamespaceGetParentNamespace () const =0
 Get a constant pointer to the namespace node this node's parent belongs to. More...
 
virtual INamespaceGetRootNamespace ()=0
 Get a mutable pointer to the root namespace node. More...
 
virtual const INamespaceGetRootNamespace () const =0
 Get a constant pointer to the root namespace node. More...
 
virtual Bool SetId (const String &id)=0
 Set the node ID. More...
 
virtual const StringGetId () const =0
 Get the node ID. More...
 
virtual String GetPath () const =0
 Calculate the absolute path to the node. More...
 
virtual Bool IsPrivate () const =0
 Check if this node is considered private. More...
 
virtual Bool SetHead (Bool isHead)=0
 Define whether this node represents the head of a sub-graph. More...
 
virtual Bool IsHead () const =0
 Check whether this node represents the head of a sub-graph. More...
 
virtual Bool SetLocked (Bool isLocked)=0
 Lock/unlock the node. More...
 
virtual Bool IsLocked () const =0
 Check if this node is locked for regular traversals. More...
 
virtual Bool SetSwapped (Bool isSwapped)=0
 Set/clear the node's initial swap state. More...
 
virtual Bool IsSwapped () const =0
 Check if this node is initially in the swapped state. More...
 
virtual Bool SetAutomaticSwappingEnabled (Bool enabled)=0
 Enable/disable auto-swapping for this node. More...
 
virtual Bool IsAutomaticSwappingEnabled () const =0
 Check if auto-swapping is enabled for this node. More...
 
virtual Bool SetManualSwappingEnabled (Bool enabled)=0
 Enable/disable manual swapping for this node. More...
 
virtual Bool IsManualSwappingEnabled () const =0
 Check if manual swapping is enabled for this node. More...
 
virtual Bool SetStateRecordingEnabled (Bool enabled)=0
 Enable/disable state recording for this node. More...
 
virtual Bool IsStateRecordingEnabled () const =0
 Check if state recording is enabled for this node. More...
 
virtual Bool SetInitialized (Bool isInitialized)=0
 Set/reset the initialized state of the node. More...
 
virtual Bool IsInitialized () const =0
 Check if this node is initialized. More...
 
virtual Bool SetBoundingVolumeModified (Bool isModified)=0
 Set/reset the "bounding volume modified" state of the node. More...
 
virtual Bool IsBoundingVolumeModified () const =0
 Check if the overall bounding volume was modified. More...
 
virtual Bool SetActiveModified ()=0
 Set the "active modified" state of the node. More...
 
virtual Bool SetVisibleModified ()=0
 Set the "visible modified" state of the node. More...
 
virtual Bool SetModifiedFlags (UInt32 flags)=0
 Set a combination of "modified" flags. More...
 
virtual Bool ClearModifiedFlags (UInt32 flags)=0
 Clear a combination of "modified" flags. More...
 
virtual Bool SetNodeFlags (UInt32 flags)=0
 set current flags. More...
 
virtual UInt32 GetNodeFlags () const =0
 Get current flags. More...
 
virtual UInt32 GetModifiedTraversalStates () const =0
 Get the traversal states that are modified by the node and its sub-graph. More...
 
virtual Bool AddReference ()=0
 Increment the node's internal reference counter by 1. More...
 
virtual Bool RemoveReference ()=0
 Increment the node's internal reference counter by 1. More...
 
virtual Bool Init (IInitTracker *tracker)=0
 Initialize the node and its sub-graph. More...
 
virtual Bool DeInit (IDeInitTracker *tracker)=0
 Deinitialize the node and its sub-graph. More...
 
virtual Bool Suspend (IDeInitTracker *tracker)=0
 Suspend the node and its sub-graph. More...
 
virtual Bool Resume (IInitTracker *tracker)=0
 Resume the node and its sub-graph. More...
 
virtual Bool ConfigChangedLogic (IConfigChangedTracker *tracker)=0
 Signal a configuration change relevant for the node's logic traversal. More...
 
virtual Bool ConfigChangedOutput (IConfigChangedTracker *tracker)=0
 Signal a configuration change relevant for the node's output traversal. More...
 
virtual Bool ProcessLogic (IProcessLogicTracker *tracker)=0
 Perform a logic traversal on the node and its sub-graph. More...
 
virtual Bool ProcessInput (IProcessInputTracker *tracker)=0
 Perform an input traversal on the node and its sub-graph. More...
 
virtual Bool ProcessOutput (IProcessOutputTracker *tracker)=0
 Perform an output traversal on the node and its sub-graph. More...
 
virtual Bool FinishLogic (IFinishLogicTracker *tracker)=0
 Finalize the logic traversal if requested by the node. More...
 
virtual Bool FinishInput (IFinishInputTracker *tracker)=0
 Finalize the input traversal if requested by the node. More...
 
virtual Bool FinishOutput (IFinishOutputTracker *tracker)=0
 Finalize the output traversal if requested by the node. More...
 
virtual Bool WasParentActiveSet (IProcessLogicTracker *tracker) const =0
 Check if a parent was recently activated. More...
 
virtual Bool WasParentVisibleSet (IProcessOutputTracker *tracker) const =0
 Check if a parent was recently set visible. More...
 
virtual Bool SetHandle (IHandle *handle)=0
 Set the node handle used to store unique information during traversal. More...
 
virtual IHandleGetHandle ()=0
 Get the node handle used during traversal, or null if not used. More...
 
virtual const IHandleGetHandle () const =0
 Get the node handle used during traversal, or null if not used. More...
 
virtual Bool SetUserData (void *userData)=0
 Set a custom user data object. More...
 
virtual void * GetUserData ()=0
 Get the node's user data object, or null if not set. More...
 
virtual const void * GetUserData () const =0
 Get the node's user data object, or null if not set. More...
 
virtual IBoundingVolumeCreateBoundingVolume () const =0
 Create a bounding volume. More...
 
virtual Bool DestroyBoundingVolume (IBoundingVolume *&boundingVolume) const =0
 Destroy a given bounding volume. More...
 
virtual IBoundingVolumeGetBoundingVolume ()=0
 Get the node's bounding volume, if present. More...
 
virtual const IBoundingVolumeGetBoundingVolume () const =0
 Get the node's bounding volume, if present. More...
 
virtual UInt32 GetConfigChangedTriggers (UInt32 mask) const =0
 Get the node's active triggers for config change traversal. More...
 
virtual UInt32 GetProcessLogicTriggers (UInt32 mask) const =0
 Get the node's active triggers for logic traversal. More...
 
virtual UInt32 GetProcessInputTriggers (UInt32 mask) const =0
 Get the node's active triggers for input traversal. More...
 
virtual UInt32 GetProcessOutputTriggers (UInt32 mask) const =0
 Get the node's active triggers for output traversal. More...
 
virtual UInt32 GetConfigChangedResponse () const =0
 Get the node's active response for config change traversal. More...
 
virtual UInt32 GetProcessLogicResponse () const =0
 Get the node's active response for logic traversal. More...
 
virtual UInt32 GetProcessInputResponse () const =0
 Get the node's active response for input traversal. More...
 
virtual UInt32 GetProcessOutputResponse () const =0
 Get the node's active response for output traversal. More...
 
virtual Bool AddChildConfigChangedResponse (UInt32 mask)=0
 Add the response of a node's child to a config change traversal. More...
 
virtual Bool AddChildProcessLogicResponse (UInt32 mask)=0
 Add the response of a node's child to a logic traversal. More...
 
virtual Bool AddChildProcessInputResponse (UInt32 mask)=0
 Add the response of a node's child to a input traversal. More...
 
virtual Bool AddChildProcessOutputResponse (UInt32 mask)=0
 Add the response of a node's child to a output traversal. More...
 
virtual const IController::ClassInfo & GetDefaultControllerClassInfo () const =0
 Get the class info structure of the default controller for this node. More...
 
virtual Bool PrintTree (UInt32 indent=0, UInt32 includeNodeFlags=UInt32(~0), UInt32 excludeNodeFlags=0) const =0
 Print the node and its sub-graph to the system console. More...
 
- Public Member Functions inherited from Murl::IFactoryObject< INode >
virtual ~IFactoryObject ()
 The destructor. More...
 
virtual const ClassInfo * GetObjectClassInfo () const=0
 Get the object instance's class info, if present. More...
 
virtual void ResetObjectProperties ()=0
 Reset the object instance's properties to their default values.
 
- Public Member Functions inherited from Murl::Graph::ITraversable
virtual Bool SetActive (Bool isActive)=0
 Enable/disable logic traversals. More...
 
virtual Bool IsActive () const =0
 Check if logic traversals are enabled. More...
 
virtual Bool SetVisible (Bool isVisible)=0
 Enable/disable output traversals. More...
 
virtual Bool IsVisible () const =0
 Check if output traversals are enabled. More...
 
virtual Bool SetActiveAndVisible (Bool enabled)=0
 Enable/disable both logic and output traversals. More...
 
virtual Bool IsActiveAndVisible () const =0
 Check if both logic and output traversals are enabled. More...
 

Additional Inherited Members

- Public Types inherited from Murl::IFactoryObject< INode >
typedef Array< const ClassInfo *> ClassInfoArray
 Definition of an array of ClassInfo objects. More...
 
- Static Public Member Functions inherited from Murl::IFactoryObject< INode >
static const PropertyInfoGetPropertyInfo ()
 Get the class' property info struct. More...
 
static const AttributeInfoGetAttributeInfo ()
 Get the class' attribute info struct. More...
 
static void ResetProperties (IFactoryObject< INode > *object)
 Reset an object instance's properties to their default values. More...
 

Detailed Description

The basic scene graph node interface.

Any class that is supposed to be part of a scene graph hierarchy must implement this interface.

See SetId() for a description of valid node IDs.
See Graph::INamespace for details about the hierarchical organization of node IDs.

Member Function Documentation

◆ GetNodeInterface() [1/2]

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

Get the mutable INode interface.

Returns
The mutable INode interface.

◆ GetNodeInterface() [2/2]

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

Get the constant INode interface.

Returns
The constant INode interface.

◆ DeserializeNode()

virtual Bool Murl::Graph::INode::DeserializeNode ( IDeserializeAttributeTracker tracker)
pure virtual

Deserialize the node.

If a node is created from a read-only Resource::IGraph object, the factory calls this method once so that the newly created node can obtain the respective Resource::IGraphNode it was created from via the given tracker.

Parameters
trackerThe tracker used.
Returns
true if successful.

◆ DeserializeAttribute()

virtual Bool Murl::Graph::INode::DeserializeAttribute ( IDeserializeAttributeTracker tracker)
pure virtual

Deserialize a node attribute.

A scene graph (or actually its individual nodes) may be created and initialized from e.g. a read-only Resource::IGraph object that can be retrieved from a Resource::ICollection instance. Setting all relevant node attributes from this resource object can be done by iterating over all given attributes and calling this method on the newly created node.

Parameters
trackerThe tracker used.
Returns
true if the given attribute was recognized.

◆ AddChild()

virtual Bool Murl::Graph::INode::AddChild ( INode child)
pure virtual

Add a child node.

Add a given node as the next child of the current node.

Parameters
childThe child node to add.
Returns
true if successful.

◆ InsertChild()

virtual Bool Murl::Graph::INode::InsertChild ( INode child,
UInt32  index 
)
pure virtual

Insert a child node at a given position.

Insert a given node at a given position of the current node's children.

Parameters
childThe child node to add.
indexThe zero-based index where to insert the node.
Returns
true if successful.

◆ RemoveChild() [1/2]

virtual INode* Murl::Graph::INode::RemoveChild ( INode child)
pure virtual

Remove a child.

Remove the first instance of a given child node from this node's children.

Parameters
childThe child node to remove.
Returns
The input node if successful, or null if the given node is not a child.

◆ RemoveChild() [2/2]

virtual INode* Murl::Graph::INode::RemoveChild ( UInt32  index)
pure virtual

Remove a child from a given position.

Remove the child node specified by a given index.

Parameters
indexThe zero-based index of the child to remove.
Returns
The removed child node if successful, or null if the index was out of range.

◆ GetChildren()

virtual const INodeArray& Murl::Graph::INode::GetChildren ( ) const
pure virtual

Get this node's children.

This returns a constant reference to this node's internal array of child nodes.

Returns
A reference to the child array.

◆ GetChild() [1/4]

virtual INode* Murl::Graph::INode::GetChild ( UInt32  index)
pure virtual

Return the child at a given position.

This returns a mutable pointer to this node's child at a given index.

Parameters
indexThe zero-based index of the child.
Returns
A pointer to the child node, or null if the index was out of range.

Referenced by Murl::Logic::GraphNodeT< Graph::IButton >::GetChild().

◆ GetChild() [2/4]

virtual INode* Murl::Graph::INode::GetChild ( const String id)
pure virtual

Return the first child with a given ID.

This returns a mutable pointer to this node's child that has a given ID.

Parameters
idThe ID of the child to search for.
Returns
A pointer to the child node, or null if the ID was not found among the children.

◆ GetChild() [3/4]

virtual const INode* Murl::Graph::INode::GetChild ( UInt32  index) const
pure virtual

Return the child at a given position.

This returns a constant pointer to this node's child at a given index.

Parameters
indexThe zero-based index of the child.
Returns
A pointer to the child node, or null if the index was out of range.

◆ GetChild() [4/4]

virtual const INode* Murl::Graph::INode::GetChild ( const String id) const
pure virtual

Return the first child with a given ID.

This returns a constant pointer to this node's child that has a given ID.

Parameters
idThe ID of the child to search for.
Returns
A pointer to the child node, or null if the ID was not found among the children.

◆ GetChildIndex() [1/2]

virtual SInt32 Murl::Graph::INode::GetChildIndex ( const INode node) const
pure virtual

Return the index of a given child.

Parameters
nodeThe child node to query.
Returns
The zero-based index of the child, or -1 if not present.

◆ GetChildIndex() [2/2]

virtual SInt32 Murl::Graph::INode::GetChildIndex ( const String id) const
pure virtual

Return the index of a child with a given ID.

Parameters
idThe ID of the child node to query.
Returns
The zero-based index of the child, or -1 if not present.

◆ GetNumberOfChildren()

virtual UInt32 Murl::Graph::INode::GetNumberOfChildren ( ) const
pure virtual

Return the number of this node's children.

Returns
The number of this node's children.

Referenced by Murl::Logic::GraphNodeT< Graph::IButton >::GetNumberOfChildren().

◆ AddParent()

virtual Bool Murl::Graph::INode::AddParent ( INode parent)
pure virtual

Add a node parent at the end of the array of current parents.

By convention, the node's parent at index 0 represents the "real" parent, which is defined during scene graph creation. Any parents at an index greater than 0 are considered "virtual" parents, which result from a node being referenced multiple times by e.g. a Graph::IReference node.

Parameters
parentThe parent to add.
Returns
true if successful.

◆ InsertParent()

virtual Bool Murl::Graph::INode::InsertParent ( INode parent,
UInt32  index 
)
pure virtual

Insert a node parent at a given index.

Parameters
parentThe parent to add.
indexThe zero-based index into the array of parents.
Returns
true if successful.

◆ RemoveParent() [1/2]

virtual INode* Murl::Graph::INode::RemoveParent ( INode parent)
pure virtual

Remove a given parent.

Parameters
parentThe parent to remove from the node's array of parents.
Returns
The removed node, or a null pointer if failed.

◆ RemoveParent() [2/2]

virtual INode* Murl::Graph::INode::RemoveParent ( UInt32  index)
pure virtual

Remove the parent from a given index.

Parameters
indexThe index into the node's array of parents.
Returns
The removed node, or a null pointer if failed.

◆ GetParents()

virtual const INodeArray& Murl::Graph::INode::GetParents ( ) const
pure virtual

Get a constant array of the node's parents.

Returns
The array of parents.

◆ GetParent() [1/4]

virtual INode* Murl::Graph::INode::GetParent ( UInt32  index)
pure virtual

Get a mutable pointer to the node's parent at a given index.

Parameters
indexThe index into the node's array of parents.
Returns
The parent at the given index.

Referenced by Murl::Logic::GraphNodeT< Graph::IButton >::GetParent().

◆ GetParent() [2/4]

virtual INode* Murl::Graph::INode::GetParent ( const String id)
pure virtual

Get a mutable pointer to the node's parent with the given node ID.

Parameters
idThe node ID of the parent to retrieve.
Returns
The parent with the given ID, or a null pointer if not found.

◆ GetParent() [3/4]

virtual const INode* Murl::Graph::INode::GetParent ( UInt32  index) const
pure virtual

Get a constant pointer to the node's parent at a given index.

Parameters
indexThe index into the node's array of parents.
Returns
The parent at the given index.

◆ GetParent() [4/4]

virtual const INode* Murl::Graph::INode::GetParent ( const String id) const
pure virtual

Get a constant pointer to the node's parent with the given node ID.

Parameters
idThe node ID of the parent to retrieve.
Returns
The parent with the given ID, or a null pointer if not found.

◆ GetParentIndex() [1/2]

virtual SInt32 Murl::Graph::INode::GetParentIndex ( const INode node) const
pure virtual

Return the index of a given parent.

Parameters
nodeThe parent node to query.
Returns
The zero-based index of the parent, or -1 if not present.

◆ GetParentIndex() [2/2]

virtual SInt32 Murl::Graph::INode::GetParentIndex ( const String id) const
pure virtual

Return the index of a parent with a given ID.

Parameters
idThe ID of the parent node to query.
Returns
The zero-based index of the parent, or -1 if not present.

◆ GetNumberOfParents()

virtual UInt32 Murl::Graph::INode::GetNumberOfParents ( ) const
pure virtual

Return the number of this node's parents.

Returns
The number of this node's parents.

Referenced by Murl::Logic::GraphNodeT< Graph::IButton >::GetNumberOfParents().

◆ AddController()

virtual Bool Murl::Graph::INode::AddController ( IController controller)
pure virtual

Add a node controller.

Parameters
controllerThe controller to add
Returns
true if successful.

◆ InsertController()

virtual Bool Murl::Graph::INode::InsertController ( IController controller,
UInt32  index 
)
pure virtual

Insert a node controller at a given position.

Insert a given controller at a given position of the current node's controller array.

Parameters
controllerThe controller to insert.
indexThe zero-based index where to insert the controller.
Returns
true if successful.

◆ RemoveController() [1/2]

virtual IController* Murl::Graph::INode::RemoveController ( IController controller)
pure virtual

Remove a node controller.

Remove the first instance of a given controller from this node's controller array.

Parameters
controllerThe controller to remove.
Returns
The input controller if successful, or null if the given controller is not present.

◆ RemoveController() [2/2]

virtual IController* Murl::Graph::INode::RemoveController ( UInt32  index)
pure virtual

Remove a node controller from a given position.

Remove the controller specified by a given index.

Parameters
indexThe zero-based index of the controller to remove.
Returns
The removed controller if successful, or null if the index was out of range.

◆ GetControllers()

virtual const IControllerArray& Murl::Graph::INode::GetControllers ( ) const
pure virtual

Get a constant array of the node's controllers.

Returns
The array of controllers.

◆ GetController() [1/2]

virtual IController* Murl::Graph::INode::GetController ( UInt32  index)
pure virtual

Get a mutable pointer to the node's controller at a given index.

Parameters
indexThe index into the node's array of controllers.
Returns
The controller at the given index, or null if the index is out of range.

Referenced by Murl::Logic::GraphNodeT< Graph::IButton >::GetController().

◆ GetController() [2/2]

virtual const IController* Murl::Graph::INode::GetController ( UInt32  index) const
pure virtual

Get a constant pointer to the node's controller at a given index.

Parameters
indexThe index into the node's array of controllers.
Returns
The controller at the given index, or null if the index is out of range.

◆ GetControllerIndex()

virtual SInt32 Murl::Graph::INode::GetControllerIndex ( const IController controller) const
pure virtual

Return the index of a given controller.

Parameters
controllerThe controller to query.
Returns
The zero-based index of the controller, or -1 if not present.

◆ GetNumberOfControllers()

virtual UInt32 Murl::Graph::INode::GetNumberOfControllers ( ) const
pure virtual

Return the number of this node's controllers.

Returns
The number of this node's controllers.

Referenced by Murl::Logic::GraphNodeT< Graph::IButton >::GetNumberOfControllers().

◆ GetCurrentNamespace() [1/2]

virtual INamespace* Murl::Graph::INode::GetCurrentNamespace ( )
pure virtual

Get a mutable pointer to the namespace node this node belongs to.

Returns
A pointer to the current namespace node.

◆ GetCurrentNamespace() [2/2]

virtual const INamespace* Murl::Graph::INode::GetCurrentNamespace ( ) const
pure virtual

Get a constant pointer to the namespace node this node belongs to.

Returns
A pointer to the current namespace node.

◆ GetParentNamespace() [1/2]

virtual INamespace* Murl::Graph::INode::GetParentNamespace ( )
pure virtual

Get a mutable pointer to the namespace node this node's parent belongs to.

Returns
A pointer to the parent namespace node.

◆ GetParentNamespace() [2/2]

virtual const INamespace* Murl::Graph::INode::GetParentNamespace ( ) const
pure virtual

Get a constant pointer to the namespace node this node's parent belongs to.

Returns
A pointer to the parent namespace node.

◆ GetRootNamespace() [1/2]

virtual INamespace* Murl::Graph::INode::GetRootNamespace ( )
pure virtual

Get a mutable pointer to the root namespace node.

Returns
A pointer to the root namespace node.

◆ GetRootNamespace() [2/2]

virtual const INamespace* Murl::Graph::INode::GetRootNamespace ( ) const
pure virtual

Get a constant pointer to the root namespace node.

Returns
A pointer to the root namespace node.

◆ SetId()

virtual Bool Murl::Graph::INode::SetId ( const String id)
pure virtual

Set the node ID.

A node may have an optional ID, by which it can later be referenced from another node in the scene graph, or from a Logic::IProcessor to directly manipulate the node's properties from code. A valid node ID can only contain underscores ('_'), digits ('0'..'9') and/or alphabetic characters ('a'..'z' and 'A'..'Z'), and must not begin with a digit. In addition, node IDs must be unique within a common namespace.
See Graph::INamespace for examples of how to refer to individual nodes by their ID.

Parameters
idThe node ID to set.
Returns
true if successful.

◆ GetId()

◆ GetPath()

virtual String Murl::Graph::INode::GetPath ( ) const
pure virtual

Calculate the absolute path to the node.

Returns
The node path.

◆ IsPrivate()

virtual Bool Murl::Graph::INode::IsPrivate ( ) const
pure virtual

Check if this node is considered private.

If a node is marked private, it is not possible to reference that node or any of its children from outside the sub-graph beneath that node.

Returns
true if private.

◆ SetHead()

virtual Bool Murl::Graph::INode::SetHead ( Bool  isHead)
pure virtual

Define whether this node represents the head of a sub-graph.

When a sub-graph is created and added as a child of an existing scene graph node, this method must be called on the sub-graph's top node with isHead set to true. This must be done in order to detect any sub-graphs that were not correctly detached and destroyed before their respective parent graph is destroyed. Failing to do so may result in memory leaks or invalid node pointers.

Parameters
isHeadIf true, the node is set to be a head node.
Returns
true if successful.

◆ IsHead()

virtual Bool Murl::Graph::INode::IsHead ( ) const
pure virtual

Check whether this node represents the head of a sub-graph.

Returns
true if the node is a head node.

◆ SetLocked()

virtual Bool Murl::Graph::INode::SetLocked ( Bool  isLocked)
pure virtual

Lock/unlock the node.

Creating and destroying sub-graphs is usually an asynchronous task that is carried out in multiple stages. To prevent interference with regular graph traversals, it is necessary to have a sub-graph locked whenever it being initialized or deinitialized while it is linked to another scene graph node. Therefore, this method must be called with isLocked set to true prior to inserting it into the scene graph or prior to deinitializing it. The sub-graph may only be safely unlocked after it has been fully initialized, or detached from its parent.

Parameters
isLockedIf true, the node gets locked for regular traversals.
Returns
true if successful.

◆ IsLocked()

virtual Bool Murl::Graph::INode::IsLocked ( ) const
pure virtual

Check if this node is locked for regular traversals.

See SetLocked().

Returns
true if locked.

◆ SetSwapped()

virtual Bool Murl::Graph::INode::SetSwapped ( Bool  isSwapped)
pure virtual

Set/clear the node's initial swap state.

The node's swapped state is used as a hint to the engine, so that the node may decide to delay creation of any internal objects until they are actually used. This is usually the case for e.g. textures, which consume a large amount of video memory. Here, setting the node's swapped state results in not creating the video memory resources until the texture is referenced for the first time. By default, the swapped state is disabled. Note that this property can only be set before the node is initialized, after that the method returns false.

Parameters
isSwappedThe swap state of the node.
Returns
true if successful.

◆ IsSwapped()

virtual Bool Murl::Graph::INode::IsSwapped ( ) const
pure virtual

Check if this node is initially in the swapped state.

See SetSwapped().

Returns
true if in the swapped state.

◆ SetAutomaticSwappingEnabled()

virtual Bool Murl::Graph::INode::SetAutomaticSwappingEnabled ( Bool  enabled)
pure virtual

Enable/disable auto-swapping for this node.

When enabled, the engine may decide to swap-out any node-specific resources when they have not been used during the last frame. Like the initial swap state set via SetSwapped(), this is only a hint and applies to certain nodes only, such as textures. By default, this feature is disabled. Note also that auto-swapping can only be set before the node is initialized. When auto-swapping is enabled, it is usually a good idea to also set the initial swap state to true (via SetSwapped()), as otherwise the node's resources are created at initialization and possibly immediately swapped out when the node is not being used in the following frame.

Parameters
enabledIf true, auto swapping is enabled.
Returns
true if successful.

◆ IsAutomaticSwappingEnabled()

virtual Bool Murl::Graph::INode::IsAutomaticSwappingEnabled ( ) const
pure virtual

Check if auto-swapping is enabled for this node.

See SetSwappable().

Returns
true if enabled.

◆ SetManualSwappingEnabled()

virtual Bool Murl::Graph::INode::SetManualSwappingEnabled ( Bool  enabled)
pure virtual

Enable/disable manual swapping for this node.

When enabled, the user can trigger a swap-out of any node-specific resources when they have not been used during the last frame, by calling the TriggerSwapping() method on the Graph::IRoot object that can be accessed e.g. via the Logic::IState object. See SetAutomaticSwappingEnabled().

Parameters
enabledIf true, manual swapping is enabled.
Returns
true if successful.

◆ IsManualSwappingEnabled()

virtual Bool Murl::Graph::INode::IsManualSwappingEnabled ( ) const
pure virtual

Check if manual swapping is enabled for this node.

See SetManualSwappingEnabled().

Returns
true if enabled.

◆ SetStateRecordingEnabled()

virtual Bool Murl::Graph::INode::SetStateRecordingEnabled ( Bool  enabled)
pure virtual

Enable/disable state recording for this node.

Parameters
enabledIf true, state recording is enabled.
Returns
true if successful.

◆ IsStateRecordingEnabled()

virtual Bool Murl::Graph::INode::IsStateRecordingEnabled ( ) const
pure virtual

Check if state recording is enabled for this node.

See SetStateRecordingEnabled().

Returns
true if enabled.

◆ SetInitialized()

virtual Bool Murl::Graph::INode::SetInitialized ( Bool  isInitialized)
pure virtual

Set/reset the initialized state of the node.

Parameters
isInitializedIf true, the node is set to the initialized state.
Returns
true if successful.

◆ IsInitialized()

virtual Bool Murl::Graph::INode::IsInitialized ( ) const
pure virtual

Check if this node is initialized.

Returns
true if initialized.

◆ SetBoundingVolumeModified()

virtual Bool Murl::Graph::INode::SetBoundingVolumeModified ( Bool  isModified)
pure virtual

Set/reset the "bounding volume modified" state of the node.

The "bounding volume modified" state signals that there was some modification of one or more of the nodes within this node's sub-graph which affects this node's overall bounding volume. If isModified is true, the change is propagated to all of the node's parents, whereas a value of false clears this state in all of the node's child sub-graphs. This propagation is only done when the node is not locked. See SetModifiedFlags() and ClearModifiedFlags(), together with NODE_FLAG_IS_BOUNDING_VOLUME_MODIFIED.

Parameters
isModifiedIf true, the bounding volume is flagged as modified.
Returns
true if successful.

◆ IsBoundingVolumeModified()

virtual Bool Murl::Graph::INode::IsBoundingVolumeModified ( ) const
pure virtual

Check if the overall bounding volume was modified.

Returns
true if modified.

◆ SetActiveModified()

virtual Bool Murl::Graph::INode::SetActiveModified ( )
pure virtual

Set the "active modified" state of the node.

Returns
true if successful.

◆ SetVisibleModified()

virtual Bool Murl::Graph::INode::SetVisibleModified ( )
pure virtual

Set the "visible modified" state of the node.

Returns
true if successful.

◆ SetModifiedFlags()

virtual Bool Murl::Graph::INode::SetModifiedFlags ( UInt32  flags)
pure virtual

Set a combination of "modified" flags.

This method sets the given flag bits in the node's internal state. The change is propagated to all of the node's parents when the node is unlocked. See SetBoundingVolumeModified().

Parameters
flagsThe bit mask of flags to set.
Returns
true if successful.

◆ ClearModifiedFlags()

virtual Bool Murl::Graph::INode::ClearModifiedFlags ( UInt32  flags)
pure virtual

Clear a combination of "modified" flags.

This method clears the given flag bits in the node's internal state. The change is propagated to all of the node's child sub-graphs when the node is unlocked. See SetBoundingVolumeModified().

Parameters
flagsThe bit mask of flags to clear.
Returns
true if successful.

◆ SetNodeFlags()

virtual Bool Murl::Graph::INode::SetNodeFlags ( UInt32  flags)
pure virtual

set current flags.

(!) Use with caution! Messing around with node flags may cause undefined behavior.

Parameters
flagsThe flags bit mask.
Returns
true if successful.

◆ GetNodeFlags()

virtual UInt32 Murl::Graph::INode::GetNodeFlags ( ) const
pure virtual

Get current flags.

Returns
A bit mask made up from individual NodeFlags values.

◆ GetModifiedTraversalStates()

virtual UInt32 Murl::Graph::INode::GetModifiedTraversalStates ( ) const
pure virtual

Get the traversal states that are modified by the node and its sub-graph.

Returns
A bit mask of individual IEnums::TraversalState values.

◆ AddReference()

virtual Bool Murl::Graph::INode::AddReference ( )
pure virtual

Increment the node's internal reference counter by 1.

Whenever a node is persistently referenced from a different location in the application, this method must be called to indicate that it must not be destroyed, to prevent existing pointers to become invalid. Using a Graph::IReference node automatically performs this task together with its counterpart RemoveReference(), as do the individual Logic::GraphNodeT helpers. If a node is directly referenced from user code, it is up to the user to correctly increment/decrement the node's reference counter. A sub-graph can only be correctly destroyed when all of its children have a reference counter of 0.

Returns
true if successful.

Referenced by Murl::Logic::GraphObservableNode< Murl::Graph::INamespace >::CreateTypedNode().

◆ RemoveReference()

virtual Bool Murl::Graph::INode::RemoveReference ( )
pure virtual

Increment the node's internal reference counter by 1.

See AddReference().

Returns
true if successful.

Referenced by Murl::Logic::GraphObservableNode< Murl::Graph::INamespace >::RemoveReference().

◆ Init()

virtual Bool Murl::Graph::INode::Init ( IInitTracker tracker)
pure virtual

Initialize the node and its sub-graph.

Parameters
trackerThe tracker used for initialization.
Returns
true if successful.

◆ DeInit()

virtual Bool Murl::Graph::INode::DeInit ( IDeInitTracker tracker)
pure virtual

Deinitialize the node and its sub-graph.

Parameters
trackerThe tracker used for deinitialization.
Returns
true if successful.

◆ Suspend()

virtual Bool Murl::Graph::INode::Suspend ( IDeInitTracker tracker)
pure virtual

Suspend the node and its sub-graph.

Parameters
trackerThe tracker used for suspension.
Returns
true if successful.

◆ Resume()

virtual Bool Murl::Graph::INode::Resume ( IInitTracker tracker)
pure virtual

Resume the node and its sub-graph.

Parameters
trackerThe tracker used for resumption.
Returns
true if successful.

◆ ConfigChangedLogic()

virtual Bool Murl::Graph::INode::ConfigChangedLogic ( IConfigChangedTracker tracker)
pure virtual

Signal a configuration change relevant for the node's logic traversal.

Parameters
trackerThe tracker used.
Returns
true if successful.

◆ ConfigChangedOutput()

virtual Bool Murl::Graph::INode::ConfigChangedOutput ( IConfigChangedTracker tracker)
pure virtual

Signal a configuration change relevant for the node's output traversal.

Parameters
trackerThe tracker used.
Returns
true if successful.

◆ ProcessLogic()

virtual Bool Murl::Graph::INode::ProcessLogic ( IProcessLogicTracker tracker)
pure virtual

Perform a logic traversal on the node and its sub-graph.

Parameters
trackerThe tracker used for traversal.
Returns
true if successful.

◆ ProcessInput()

virtual Bool Murl::Graph::INode::ProcessInput ( IProcessInputTracker tracker)
pure virtual

Perform an input traversal on the node and its sub-graph.

Parameters
trackerThe tracker used for traversal.
Returns
true if successful.

◆ ProcessOutput()

virtual Bool Murl::Graph::INode::ProcessOutput ( IProcessOutputTracker tracker)
pure virtual

Perform an output traversal on the node and its sub-graph.

Parameters
trackerThe tracker used for traversal.
Returns
true if successful.

◆ FinishLogic()

virtual Bool Murl::Graph::INode::FinishLogic ( IFinishLogicTracker tracker)
pure virtual

Finalize the logic traversal if requested by the node.

Parameters
trackerThe tracker used.
Returns
true if successful.

◆ FinishInput()

virtual Bool Murl::Graph::INode::FinishInput ( IFinishInputTracker tracker)
pure virtual

Finalize the input traversal if requested by the node.

Parameters
trackerThe tracker used.
Returns
true if successful.

◆ FinishOutput()

virtual Bool Murl::Graph::INode::FinishOutput ( IFinishOutputTracker tracker)
pure virtual

Finalize the output traversal if requested by the node.

Parameters
trackerThe tracker used.
Returns
true if successful.

◆ WasParentActiveSet()

virtual Bool Murl::Graph::INode::WasParentActiveSet ( IProcessLogicTracker tracker) const
pure virtual

Check if a parent was recently activated.

Parameters
trackerThe tracker used.
Returns
true if at least one of the node's parents was recently activated.

◆ WasParentVisibleSet()

virtual Bool Murl::Graph::INode::WasParentVisibleSet ( IProcessOutputTracker tracker) const
pure virtual

Check if a parent was recently set visible.

Parameters
trackerThe tracker used.
Returns
true if at least one of the node's parents was recently set visible.

◆ SetHandle()

virtual Bool Murl::Graph::INode::SetHandle ( IHandle handle)
pure virtual

Set the node handle used to store unique information during traversal.

Parameters
handleThe node handle to set.
Returns
true if successful.

◆ GetHandle() [1/2]

virtual IHandle* Murl::Graph::INode::GetHandle ( )
pure virtual

Get the node handle used during traversal, or null if not used.

Returns
A mutable pointer to the optional node handle.

◆ GetHandle() [2/2]

virtual const IHandle* Murl::Graph::INode::GetHandle ( ) const
pure virtual

Get the node handle used during traversal, or null if not used.

Returns
A constant pointer to the optional node handle.

◆ SetUserData()

virtual Bool Murl::Graph::INode::SetUserData ( void *  userData)
pure virtual

Set a custom user data object.

Parameters
userDataThe user data object to set, or null to remove.
Returns
true if successful.

◆ GetUserData() [1/2]

virtual void* Murl::Graph::INode::GetUserData ( )
pure virtual

Get the node's user data object, or null if not set.

Returns
A mutable pointer to the user data object.

◆ GetUserData() [2/2]

virtual const void* Murl::Graph::INode::GetUserData ( ) const
pure virtual

Get the node's user data object, or null if not set.

Returns
A constant pointer to the user data object.

◆ CreateBoundingVolume()

virtual IBoundingVolume* Murl::Graph::INode::CreateBoundingVolume ( ) const
pure virtual

Create a bounding volume.

Returns
The bounding volume.

◆ DestroyBoundingVolume()

virtual Bool Murl::Graph::INode::DestroyBoundingVolume ( IBoundingVolume *&  boundingVolume) const
pure virtual

Destroy a given bounding volume.

Parameters
boundingVolumeA reference to the bounding volume pointer. After destruction, the pointer will be set to null.
Returns
true if successful.

◆ GetBoundingVolume() [1/2]

virtual IBoundingVolume* Murl::Graph::INode::GetBoundingVolume ( )
pure virtual

Get the node's bounding volume, if present.

Returns
The bounding volume, or null if the node does not have one.

◆ GetBoundingVolume() [2/2]

virtual const IBoundingVolume* Murl::Graph::INode::GetBoundingVolume ( ) const
pure virtual

Get the node's bounding volume, if present.

Returns
The bounding volume, or null if the node does not have one.

◆ GetConfigChangedTriggers()

virtual UInt32 Murl::Graph::INode::GetConfigChangedTriggers ( UInt32  mask) const
pure virtual

Get the node's active triggers for config change traversal.

Parameters
maskA bit mask of triggers to check, from the ConfigChangedTriggers enumeration.
Returns
A bit mask of traversal triggers initiated by this node with respect to the given mask.

◆ GetProcessLogicTriggers()

virtual UInt32 Murl::Graph::INode::GetProcessLogicTriggers ( UInt32  mask) const
pure virtual

Get the node's active triggers for logic traversal.

Parameters
maskA bit mask of triggers to check, from the ProcessLogicTriggers enumeration.
Returns
A bit mask of traversal triggers initiated by this node with respect to the given mask.

◆ GetProcessInputTriggers()

virtual UInt32 Murl::Graph::INode::GetProcessInputTriggers ( UInt32  mask) const
pure virtual

Get the node's active triggers for input traversal.

Parameters
maskA bit mask of triggers to check, from the ProcessInputTriggers enumeration.
Returns
A bit mask of traversal triggers initiated by this node with respect to the given mask.

◆ GetProcessOutputTriggers()

virtual UInt32 Murl::Graph::INode::GetProcessOutputTriggers ( UInt32  mask) const
pure virtual

Get the node's active triggers for output traversal.

Parameters
maskA bit mask of triggers to check, from the ProcessOutputTriggers enumeration.
Returns
A bit mask of traversal triggers initiated by this node with respect to the given mask.

◆ GetConfigChangedResponse()

virtual UInt32 Murl::Graph::INode::GetConfigChangedResponse ( ) const
pure virtual

Get the node's active response for config change traversal.

Returns
A bit mask of traversal triggers this node will respond to, from the ConfigChangedTriggers enumeration.

◆ GetProcessLogicResponse()

virtual UInt32 Murl::Graph::INode::GetProcessLogicResponse ( ) const
pure virtual

Get the node's active response for logic traversal.

Returns
A bit mask of traversal triggers this node will respond to, from the ProcessLogicTriggers enumeration.

◆ GetProcessInputResponse()

virtual UInt32 Murl::Graph::INode::GetProcessInputResponse ( ) const
pure virtual

Get the node's active response for input traversal.

Returns
A bit mask of traversal triggers this node will respond to, from the ProcessInputTriggers enumeration.

◆ GetProcessOutputResponse()

virtual UInt32 Murl::Graph::INode::GetProcessOutputResponse ( ) const
pure virtual

Get the node's active response for output traversal.

Returns
A bit mask of traversal triggers this node will respond to, from the ProcessOutputTriggers enumeration.

◆ AddChildConfigChangedResponse()

virtual Bool Murl::Graph::INode::AddChildConfigChangedResponse ( UInt32  mask)
pure virtual

Add the response of a node's child to a config change traversal.

Parameters
maskA bit mask of triggers to add to the traversal response, from the ConfigChangedTriggers enumeration.
Returns
true if successful.

◆ AddChildProcessLogicResponse()

virtual Bool Murl::Graph::INode::AddChildProcessLogicResponse ( UInt32  mask)
pure virtual

Add the response of a node's child to a logic traversal.

Parameters
maskA bit mask of triggers to add to the traversal response, from the ProcessLogicTriggers enumeration.
Returns
true if successful.

◆ AddChildProcessInputResponse()

virtual Bool Murl::Graph::INode::AddChildProcessInputResponse ( UInt32  mask)
pure virtual

Add the response of a node's child to a input traversal.

Parameters
maskA bit mask of triggers to add to the traversal response, from the ProcessInputTriggers enumeration.
Returns
true if successful.

◆ AddChildProcessOutputResponse()

virtual Bool Murl::Graph::INode::AddChildProcessOutputResponse ( UInt32  mask)
pure virtual

Add the response of a node's child to a output traversal.

Parameters
maskA bit mask of triggers to add to the traversal response, from the ProcessOutputTriggers enumeration.
Returns
true if successful.

◆ GetDefaultControllerClassInfo()

virtual const IController::ClassInfo& Murl::Graph::INode::GetDefaultControllerClassInfo ( ) const
pure virtual

Get the class info structure of the default controller for this node.

Returns
The default controller class info.

◆ PrintTree()

virtual Bool Murl::Graph::INode::PrintTree ( UInt32  indent = 0,
UInt32  includeNodeFlags = UInt32(~0),
UInt32  excludeNodeFlags = 0 
) const
pure virtual

Print the node and its sub-graph to the system console.

Parameters
indentThe number of spaces to add in front of each output text line.
includeNodeFlagsA bit mask made up from individual NodeFlags values specifying the nodes to include into the output (default is all flags).
excludeNodeFlagsA bit mask made up from individual NodeFlags values specifying the nodes to exclude from the output (default is no flags).
Returns
true if successful.

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


Copyright © 2011-2018 Spraylight GmbH.