The basic scene graph node interface. More...
#include "murl_graph_i_node.h"
Public Member Functions | |
virtual INode * | GetNodeInterface ()=0 |
Get the mutable INode interface. More... | |
virtual const INode * | GetNodeInterface () 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 INode * | RemoveChild (INode *child)=0 |
Remove a child. More... | |
virtual INode * | RemoveChild (UInt32 index)=0 |
Remove a child from a given position. More... | |
virtual const INodeArray & | GetChildren () const =0 |
Get this node's children. More... | |
virtual INode * | GetChild (UInt32 index)=0 |
Return the child at a given position. More... | |
virtual INode * | GetChild (const String &id)=0 |
Return the first child with a given ID. More... | |
virtual const INode * | GetChild (UInt32 index) const =0 |
Return the child at a given position. More... | |
virtual const INode * | GetChild (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 INode * | RemoveParent (INode *parent)=0 |
Remove a given parent. More... | |
virtual INode * | RemoveParent (UInt32 index)=0 |
Remove the parent from a given index. More... | |
virtual const INodeArray & | GetParents () const =0 |
Get a constant array of the node's parents. More... | |
virtual INode * | GetParent (UInt32 index)=0 |
Get a mutable pointer to the node's parent at a given index. More... | |
virtual INode * | GetParent (const String &id)=0 |
Get a mutable pointer to the node's parent with the given node ID. More... | |
virtual const INode * | GetParent (UInt32 index) const =0 |
Get a constant pointer to the node's parent at a given index. More... | |
virtual const INode * | GetParent (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 IController * | RemoveController (IController *controller)=0 |
Remove a node controller. More... | |
virtual IController * | RemoveController (UInt32 index)=0 |
Remove a node controller from a given position. More... | |
virtual const IControllerArray & | GetControllers () const =0 |
Get a constant array of the node's controllers. More... | |
virtual IController * | GetController (UInt32 index)=0 |
Get a mutable pointer to the node's controller at a given index. More... | |
virtual const IController * | GetController (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 INamespace * | GetCurrentNamespace ()=0 |
Get a mutable pointer to the namespace node this node belongs to. More... | |
virtual const INamespace * | GetCurrentNamespace () const =0 |
Get a constant pointer to the namespace node this node belongs to. More... | |
virtual INamespace * | GetParentNamespace ()=0 |
Get a mutable pointer to the namespace node this node's parent belongs to. More... | |
virtual const INamespace * | GetParentNamespace () const =0 |
Get a constant pointer to the namespace node this node's parent belongs to. More... | |
virtual INamespace * | GetRootNamespace ()=0 |
Get a mutable pointer to the root namespace node. More... | |
virtual const INamespace * | GetRootNamespace () 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 String & | GetId () 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 | SetFinishLogicPending (Bool pending)=0 |
Set/reset whether the finish logic traversal is pending. More... | |
virtual Bool | IsFinishLogicPending () const =0 |
Check whether the finish logic traversal is pending. More... | |
virtual Bool | SetFinishInputPending (Bool pending)=0 |
Set/reset whether the finish input traversal is pending. More... | |
virtual Bool | IsFinishInputPending () const =0 |
Check whether the finish input traversal is pending. More... | |
virtual Bool | SetFinishOutputPending (Bool pending)=0 |
Set/reset whether the finish output traversal is pending. More... | |
virtual Bool | IsFinishOutputPending () const =0 |
Check whether the finish output traversal is pending. 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 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 |
De-initialize 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 | ProcessLazyLogic (IProcessLogicTracker *tracker)=0 |
Perform a lazy 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 | ProcessLazyInput (IProcessInputTracker *tracker)=0 |
Perform an lazy 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 | ProcessLazyOutput (IProcessOutputTracker *tracker)=0 |
Perform an lazy 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 IHandle * | GetHandle ()=0 |
Get the node handle used during traversal, or null if not used. More... | |
virtual const IHandle * | GetHandle () 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 IBoundingVolume * | CreateBoundingVolume () const =0 |
Create a bounding volume. More... | |
virtual Bool | DestroyBoundingVolume (IBoundingVolume *&boundingVolume) const =0 |
Destroy a given bounding volume. More... | |
virtual IBoundingVolume * | GetBoundingVolume ()=0 |
Get the node's bounding volume, if present. More... | |
virtual const IBoundingVolume * | GetBoundingVolume () 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 UInt32 | GetModifiedTraversalStates () const =0 |
Get the traversal states that are modified by the node and its sub-graph. More... | |
virtual Bool | AddChildModifiedTraversalStates (UInt32 mask)=0 |
Add the traversal states that are modified by a node's child. 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=0xFFFFFFFF, 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 > | |
~IFactoryObject () override | |
The destructor. | |
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 > | |
using | ClassInfoArray = Array< const ClassInfo * > |
Definition of an array of ClassInfo objects. | |
Static Public Member Functions inherited from Murl::IFactoryObject< INode > | |
static const PropertyInfo * | GetPropertyInfo () |
Get the class' property info struct. More... | |
static const AttributeInfo * | GetAttributeInfo () |
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]
|
pure virtual |
◆ GetNodeInterface() [2/2]
|
pure virtual |
◆ DeserializeNode()
|
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
-
tracker The tracker used.
- Returns
- true if successful.
◆ DeserializeAttribute()
|
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
-
tracker The tracker used.
- Returns
- true if the given attribute was recognized.
◆ AddChild()
Add a child node.
Add a given node as the next child of the current node.
- Parameters
-
child The child node to add.
- Returns
- true if successful.
◆ InsertChild()
Insert a child node at a given position.
Insert a given node at a given position of the current node's children.
- Parameters
-
child The child node to add. index The zero-based index where to insert the node.
- Returns
- true if successful.
◆ RemoveChild() [1/2]
Remove a child.
Remove the first instance of a given child node from this node's children.
- Parameters
-
child The child node to remove.
- Returns
- The input node if successful, or null if the given node is not a child.
◆ RemoveChild() [2/2]
Remove a child from a given position.
Remove the child node specified by a given index.
- Parameters
-
index The 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()
|
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]
Return the child at a given position.
This returns a mutable pointer to this node's child at a given index.
- Parameters
-
index The 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< NodeType >::GetChild().
◆ GetChild() [2/4]
Return the first child with a given ID.
This returns a mutable pointer to this node's child that has a given ID.
- Parameters
-
id The 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]
Return the child at a given position.
This returns a constant pointer to this node's child at a given index.
- Parameters
-
index The 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]
Return the first child with a given ID.
This returns a constant pointer to this node's child that has a given ID.
- Parameters
-
id The 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]
Return the index of a given child.
- Parameters
-
node The child node to query.
- Returns
- The zero-based index of the child, or -1 if not present.
◆ GetChildIndex() [2/2]
Return the index of a child with a given ID.
- Parameters
-
id The ID of the child node to query.
- Returns
- The zero-based index of the child, or -1 if not present.
◆ GetNumberOfChildren()
|
pure virtual |
Return the number of this node's children.
- Returns
- The number of this node's children.
Referenced by Murl::Logic::GraphNodeT< NodeType >::GetNumberOfChildren().
◆ AddParent()
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
-
parent The parent to add.
- Returns
- true if successful.
◆ InsertParent()
Insert a node parent at a given index.
- Parameters
-
parent The parent to add. index The zero-based index into the array of parents.
- Returns
- true if successful.
◆ RemoveParent() [1/2]
Remove a given parent.
- Parameters
-
parent The parent to remove from the node's array of parents.
- Returns
- The removed node, or a null pointer if failed.
◆ RemoveParent() [2/2]
Remove the parent from a given index.
- Parameters
-
index The index into the node's array of parents.
- Returns
- The removed node, or a null pointer if failed.
◆ GetParents()
|
pure virtual |
Get a constant array of the node's parents.
- Returns
- The array of parents.
◆ GetParent() [1/4]
Get a mutable pointer to the node's parent at a given index.
- Parameters
-
index The index into the node's array of parents.
- Returns
- The parent at the given index.
Referenced by Murl::Logic::GraphNodeT< NodeType >::GetParent().
◆ GetParent() [2/4]
Get a mutable pointer to the node's parent with the given node ID.
- Parameters
-
id The node ID of the parent to retrieve.
- Returns
- The parent with the given ID, or a null pointer if not found.
◆ GetParent() [3/4]
Get a constant pointer to the node's parent at a given index.
- Parameters
-
index The index into the node's array of parents.
- Returns
- The parent at the given index.
◆ GetParent() [4/4]
Get a constant pointer to the node's parent with the given node ID.
- Parameters
-
id The node ID of the parent to retrieve.
- Returns
- The parent with the given ID, or a null pointer if not found.
◆ GetParentIndex() [1/2]
Return the index of a given parent.
- Parameters
-
node The parent node to query.
- Returns
- The zero-based index of the parent, or -1 if not present.
◆ GetParentIndex() [2/2]
Return the index of a parent with a given ID.
- Parameters
-
id The ID of the parent node to query.
- Returns
- The zero-based index of the parent, or -1 if not present.
◆ GetNumberOfParents()
|
pure virtual |
Return the number of this node's parents.
- Returns
- The number of this node's parents.
Referenced by Murl::Logic::GraphNodeT< NodeType >::GetNumberOfParents().
◆ AddController()
|
pure virtual |
Add a node controller.
- Parameters
-
controller The controller to add
- Returns
- true if successful.
◆ InsertController()
|
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
-
controller The controller to insert. index The zero-based index where to insert the controller.
- Returns
- true if successful.
◆ RemoveController() [1/2]
|
pure virtual |
Remove a node controller.
Remove the first instance of a given controller from this node's controller array.
- Parameters
-
controller The controller to remove.
- Returns
- The input controller if successful, or null if the given controller is not present.
◆ RemoveController() [2/2]
|
pure virtual |
Remove a node controller from a given position.
Remove the controller specified by a given index.
- Parameters
-
index The zero-based index of the controller to remove.
- Returns
- The removed controller if successful, or null if the index was out of range.
◆ GetControllers()
|
pure virtual |
Get a constant array of the node's controllers.
- Returns
- The array of controllers.
◆ GetController() [1/2]
|
pure virtual |
Get a mutable pointer to the node's controller at a given index.
- Parameters
-
index The 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< NodeType >::GetController().
◆ GetController() [2/2]
|
pure virtual |
Get a constant pointer to the node's controller at a given index.
- Parameters
-
index The 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()
|
pure virtual |
Return the index of a given controller.
- Parameters
-
controller The controller to query.
- Returns
- The zero-based index of the controller, or -1 if not present.
◆ GetNumberOfControllers()
|
pure virtual |
Return the number of this node's controllers.
- Returns
- The number of this node's controllers.
Referenced by Murl::Logic::GraphNodeT< NodeType >::GetNumberOfControllers().
◆ GetCurrentNamespace() [1/2]
|
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]
|
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]
|
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]
|
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]
|
pure virtual |
Get a mutable pointer to the root namespace node.
- Returns
- A pointer to the root namespace node.
◆ GetRootNamespace() [2/2]
|
pure virtual |
Get a constant pointer to the root namespace node.
- Returns
- A pointer to the root namespace node.
◆ SetId()
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
-
id The node ID to set.
- Returns
- true if successful.
◆ GetId()
|
pure virtual |
Get the node ID.
- Returns
- The node ID.
Referenced by Murl::Logic::GraphObservableNode< NodeType >::CreateTypedNode(), Murl::Logic::GraphObservableNode< NodeType >::FindNode(), Murl::Logic::GraphNodeT< NodeType >::GetId(), and Murl::Logic::GraphObservableNode< NodeType >::TrackReference().
◆ GetPath()
|
pure virtual |
Calculate the absolute path to the node.
- Returns
- The node path.
◆ IsPrivate()
|
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()
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
-
isHead If true, the node is set to be a head node.
- Returns
- true if successful.
◆ IsHead()
|
pure virtual |
Check whether this node represents the head of a sub-graph.
- Returns
- true if the node is a head node.
◆ SetLocked()
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 de-initialized 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 de-initializing it. The sub-graph may only be safely unlocked after it has been fully initialized, or detached from its parent.
- Parameters
-
isLocked If true, the node gets locked for regular traversals.
- Returns
- true if successful.
◆ IsLocked()
|
pure virtual |
◆ SetSwapped()
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
-
isSwapped The swap state of the node.
- Returns
- true if successful.
◆ IsSwapped()
|
pure virtual |
Check if this node is initially in the swapped state.
See SetSwapped().
- Returns
- true if in the swapped state.
◆ SetAutomaticSwappingEnabled()
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
-
enabled If true, auto swapping is enabled.
- Returns
- true if successful.
◆ IsAutomaticSwappingEnabled()
|
pure virtual |
Check if auto-swapping is enabled for this node.
See SetSwappable().
- Returns
- true if enabled.
◆ SetManualSwappingEnabled()
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
-
enabled If true, manual swapping is enabled.
- Returns
- true if successful.
◆ IsManualSwappingEnabled()
|
pure virtual |
Check if manual swapping is enabled for this node.
See SetManualSwappingEnabled().
- Returns
- true if enabled.
◆ SetStateRecordingEnabled()
Enable/disable state recording for this node.
- Parameters
-
enabled If true, state recording is enabled.
- Returns
- true if successful.
◆ IsStateRecordingEnabled()
|
pure virtual |
Check if state recording is enabled for this node.
See SetStateRecordingEnabled().
- Returns
- true if enabled.
◆ SetInitialized()
Set/reset the initialized state of the node.
- Parameters
-
isInitialized If true, the node is set to the initialized state.
- Returns
- true if successful.
◆ IsInitialized()
|
pure virtual |
Check if this node is initialized.
- Returns
- true if initialized.
◆ SetFinishLogicPending()
Set/reset whether the finish logic traversal is pending.
- Parameters
-
pending The pending state.
- Returns
- true if successful.
◆ IsFinishLogicPending()
|
pure virtual |
Check whether the finish logic traversal is pending.
- Returns
- true if pending.
◆ SetFinishInputPending()
Set/reset whether the finish input traversal is pending.
- Parameters
-
pending The pending state.
- Returns
- true if successful.
◆ IsFinishInputPending()
|
pure virtual |
Check whether the finish input traversal is pending.
- Returns
- true if pending.
◆ SetFinishOutputPending()
Set/reset whether the finish output traversal is pending.
- Parameters
-
pending The pending state.
- Returns
- true if successful.
◆ IsFinishOutputPending()
|
pure virtual |
Check whether the finish output traversal is pending.
- Returns
- true if pending.
◆ SetBoundingVolumeModified()
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
-
isModified If true, the bounding volume is flagged as modified.
- Returns
- true if successful.
◆ IsBoundingVolumeModified()
|
pure virtual |
Check if the overall bounding volume was modified.
- Returns
- true if modified.
◆ SetActiveModified()
|
pure virtual |
Set the "active modified" state of the node.
- Returns
- true if successful.
◆ SetVisibleModified()
|
pure virtual |
Set the "visible modified" state of the node.
- Returns
- true if successful.
◆ SetModifiedFlags()
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
-
flags The bit mask of flags to set.
- Returns
- true if successful.
◆ ClearModifiedFlags()
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
-
flags The bit mask of flags to clear.
- Returns
- true if successful.
◆ SetNodeFlags()
set current flags.
(!) Use with caution! Messing around with node flags may cause undefined behavior.
- Parameters
-
flags The flags bit mask.
- Returns
- true if successful.
◆ GetNodeFlags()
|
pure virtual |
Get current flags.
- Returns
- A bit mask made up from individual NodeFlags values.
◆ 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< NodeType >::CreateTypedNode().
◆ RemoveReference()
|
pure virtual |
Increment the node's internal reference counter by 1.
See AddReference().
- Returns
- true if successful.
Referenced by Murl::Logic::GraphObservableNode< NodeType >::RemoveReference().
◆ Init()
|
pure virtual |
Initialize the node and its sub-graph.
- Parameters
-
tracker The tracker used for initialization.
- Returns
- true if successful.
◆ DeInit()
|
pure virtual |
De-initialize the node and its sub-graph.
- Parameters
-
tracker The tracker used for de-initialization.
- Returns
- true if successful.
◆ Suspend()
|
pure virtual |
Suspend the node and its sub-graph.
- Parameters
-
tracker The tracker used for suspension.
- Returns
- true if successful.
◆ Resume()
|
pure virtual |
Resume the node and its sub-graph.
- Parameters
-
tracker The tracker used for resumption.
- Returns
- true if successful.
◆ ConfigChangedLogic()
|
pure virtual |
Signal a configuration change relevant for the node's logic traversal.
- Parameters
-
tracker The tracker used.
- Returns
- true if successful.
◆ ConfigChangedOutput()
|
pure virtual |
Signal a configuration change relevant for the node's output traversal.
- Parameters
-
tracker The tracker used.
- Returns
- true if successful.
◆ ProcessLogic()
|
pure virtual |
Perform a logic traversal on the node and its sub-graph.
- Parameters
-
tracker The tracker used for traversal.
- Returns
- true if successful.
◆ ProcessLazyLogic()
|
pure virtual |
Perform a lazy logic traversal on the node and its sub-graph.
- Parameters
-
tracker The tracker used for traversal.
- Returns
- true if successful.
◆ ProcessInput()
|
pure virtual |
Perform an input traversal on the node and its sub-graph.
- Parameters
-
tracker The tracker used for traversal.
- Returns
- true if successful.
◆ ProcessLazyInput()
|
pure virtual |
Perform an lazy input traversal on the node and its sub-graph.
- Parameters
-
tracker The tracker used for traversal.
- Returns
- true if successful.
◆ ProcessOutput()
|
pure virtual |
Perform an output traversal on the node and its sub-graph.
- Parameters
-
tracker The tracker used for traversal.
- Returns
- true if successful.
◆ ProcessLazyOutput()
|
pure virtual |
Perform an lazy output traversal on the node and its sub-graph.
- Parameters
-
tracker The tracker used for traversal.
- Returns
- true if successful.
◆ FinishLogic()
|
pure virtual |
Finalize the logic traversal if requested by the node.
- Parameters
-
tracker The tracker used.
- Returns
- true if successful.
◆ FinishInput()
|
pure virtual |
Finalize the input traversal if requested by the node.
- Parameters
-
tracker The tracker used.
- Returns
- true if successful.
◆ FinishOutput()
|
pure virtual |
Finalize the output traversal if requested by the node.
- Parameters
-
tracker The tracker used.
- Returns
- true if successful.
◆ WasParentActiveSet()
|
pure virtual |
Check if a parent was recently activated.
- Parameters
-
tracker The tracker used.
- Returns
- true if at least one of the node's parents was recently activated.
◆ WasParentVisibleSet()
|
pure virtual |
Check if a parent was recently set visible.
- Parameters
-
tracker The tracker used.
- Returns
- true if at least one of the node's parents was recently set visible.
◆ SetHandle()
Set the node handle used to store unique information during traversal.
- Parameters
-
handle The node handle to set.
- Returns
- true if successful.
◆ GetHandle() [1/2]
|
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]
|
pure virtual |
Get the node handle used during traversal, or null if not used.
- Returns
- A constant pointer to the optional node handle.
◆ SetUserData()
|
pure virtual |
Set a custom user data object.
- Parameters
-
userData The user data object to set, or null to remove.
- Returns
- true if successful.
◆ GetUserData() [1/2]
|
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]
|
pure virtual |
Get the node's user data object, or null if not set.
- Returns
- A constant pointer to the user data object.
◆ CreateBoundingVolume()
|
pure virtual |
Create a bounding volume.
- Returns
- The bounding volume.
◆ DestroyBoundingVolume()
|
pure virtual |
Destroy a given bounding volume.
- Parameters
-
boundingVolume A reference to the bounding volume pointer. After destruction, the pointer will be set to null.
- Returns
- true if successful.
◆ GetBoundingVolume() [1/2]
|
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]
|
pure virtual |
Get the node's bounding volume, if present.
- Returns
- The bounding volume, or null if the node does not have one.
◆ GetConfigChangedTriggers()
Get the node's active triggers for config change traversal.
- Parameters
-
mask A 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()
Get the node's active triggers for logic traversal.
- Parameters
-
mask A 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()
Get the node's active triggers for input traversal.
- Parameters
-
mask A 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()
Get the node's active triggers for output traversal.
- Parameters
-
mask A 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()
|
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()
|
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()
|
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()
|
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()
Add the response of a node's child to a config change traversal.
- Parameters
-
mask A bit mask of triggers to add to the traversal response, from the ConfigChangedTriggers enumeration.
- Returns
- true if successful.
◆ AddChildProcessLogicResponse()
Add the response of a node's child to a logic traversal.
- Parameters
-
mask A bit mask of triggers to add to the traversal response, from the ProcessLogicTriggers enumeration.
- Returns
- true if successful.
◆ AddChildProcessInputResponse()
Add the response of a node's child to a input traversal.
- Parameters
-
mask A bit mask of triggers to add to the traversal response, from the ProcessInputTriggers enumeration.
- Returns
- true if successful.
◆ AddChildProcessOutputResponse()
Add the response of a node's child to a output traversal.
- Parameters
-
mask A bit mask of triggers to add to the traversal response, from the ProcessOutputTriggers enumeration.
- Returns
- true if successful.
◆ GetModifiedTraversalStates()
|
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.
◆ AddChildModifiedTraversalStates()
Add the traversal states that are modified by a node's child.
- Parameters
-
mask A bit mask of modified traversal states.
- Returns
- true if successful.
◆ GetDefaultControllerClassInfo()
|
pure virtual |
Get the class info structure of the default controller for this node.
- Returns
- The default controller class info.
◆ PrintTree()
|
pure virtual |
Print the node and its sub-graph to the system console.
- Parameters
-
indent The number of spaces to add in front of each output text line. includeNodeFlags A bit mask made up from individual NodeFlags values specifying the nodes to include into the output (default is all flags). excludeNodeFlags A 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