![]() |
Murl Engine API
Version 2018.3
|
The IGenericNodeTarget graph node target interface. More...
#include <murl_graph_i_generic_node_target.h>
The IGenericNodeTarget graph node target interface.
A generic node target is used to encapsulate (possibly) any number of nodes in a scene graph, referenced by their unique ID or directly by pointer. It provides access methods to add, remove or query the set of nodes that are referenced. By using an IGenericNodeTarget, a graph node's process of handling references to other nodes can be unified, the respective node references may be acquired by either specifying a node ID in an XML scene graph file, or directly set from code when a new node is created from a Logic::IProcessor.
Public Member Functions | |
virtual Bool | Init (IInitTracker *tracker)=0 |
Initialize the node target. More... | |
virtual Bool | DeInit (IDeInitTracker *tracker)=0 |
De-Initialize the node target. More... | |
virtual Bool | IsInitialized () const =0 |
Check if the node target is initialized. More... | |
virtual Bool | IsModified () const =0 |
Check if the node target is modified. More... | |
virtual Bool | SetInitialized (Bool initialized)=0 |
Manually set or reset the initialized state of the target. More... | |
virtual Bool | SetModified (Bool modified)=0 |
Manually set or reset the modified state of the target. More... | |
virtual UInt32 | GetMinNumberOfNodes () const =0 |
Query the minimum number of nodes. More... | |
virtual UInt32 | GetMaxNumberOfNodes () const =0 |
Query the maximum number of nodes. More... | |
virtual Bool | SetNumberOfNodes (UInt32 numberOfNodes)=0 |
Set the total number of nodes. More... | |
virtual UInt32 | GetNumberOfNodes () const =0 |
Get the total number of nodes. More... | |
virtual Bool | SetNodeId (const String &nodeId, UInt32 index)=0 |
Set a single node ID at a given index. More... | |
virtual const String & | GetNodeId (UInt32 index) const =0 |
Get the node ID at a given index. More... | |
virtual Bool | SetNode (ObjectType *object, UInt32 index)=0 |
Set (replace) a single node for referencing at a given position. More... | |
virtual ObjectType * | GetNode (UInt32 index) const =0 |
Get the node at a given index. More... | |
|
pure virtual |
Initialize the node target.
To be able to reference nodes via their unique IDs in a scene graph, a Graph::IInitTracker must be passed to the node target, which holds a reference to the scene graph's root.
tracker | The tracker used for node initialization. |
|
pure virtual |
De-Initialize the node target.
tracker | The tracker used for node de-initialization. |
|
pure virtual |
Check if the node target is initialized.
|
pure virtual |
Check if the node target is modified.
This method returns true, whenever the set of encapsulated node references changes, either in size or by content. When modified, that state persists until a manual call to SetModified() with parameter false.
|
pure virtual |
Manually set or reset the initialized state of the target.
initialized | The initialized state. |
|
pure virtual |
Manually set or reset the modified state of the target.
modified | The modified state. |
|
pure virtual |
Query the minimum number of nodes.
This method returns the defined minimum number of node references that must be present for the Init() call to be successful.
|
pure virtual |
Query the maximum number of nodes.
This method returns the defined maximum number of node references that can be present for the Init() call to be successful.
|
pure virtual |
Set the total number of nodes.
The given value must be in the range from GetMinNumberOfNodes() to GetMaxNumberOfNodes().
numberOfNodes | The total number of nodes in the target. |
|
pure virtual |
Get the total number of nodes.
|
pure virtual |
Set a single node ID at a given index.
You need to make sure that the given index is in the range from 0 to GetNumberOfNodes()-1, use SetNumberOfNodes() to define the actual node count.
nodeId | A string containing the full path and ID to a node in the scene graph. |
index | The index of the node ID to set, in the range from 0 to GetNumberOfNodes()-1. |
|
pure virtual |
Get the node ID at a given index.
index | The node ID index in the range from 0 to GetNumberOfNodes()-1. |
|
pure virtual |
Set (replace) a single node for referencing at a given position.
You need to make sure that the given index is in the range from 0 to GetNumberOfNodes()-1, use SetNumberOfNodes() to define the actual node count.
object | A pointer to the node. |
index | The zero-based position where to set the node, in the range from 0 to GetNumberOfNodes()-1. |
|
pure virtual |
Get the node at a given index.
index | The node index in the range from 0 to GetNumberOfNodes() |