![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
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.
Check if the node target is initialized.
Boolean IsInitialized()
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.
Boolean IsModified()
Manually set or reset the initialized state of the target.
Boolean SetInitialized(Boolean initialized)
initialized | The initialized state. |
Manually set or reset the modified state of the target.
Boolean SetModified(Boolean modified)
modified | The modified state. |
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.
Integer GetMinNumberOfNodes()
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.
Integer GetMaxNumberOfNodes()
Set the total number of nodes. The given value must be in the range from GetMinNumberOfNodes() to GetMaxNumberOfNodes().
Boolean SetNumberOfNodes(Integer numberOfNodes)
numberOfNodes | The total number of nodes in the target. |
Get the total number of nodes.
Integer GetNumberOfNodes()
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.
Boolean SetNodeId(String nodeId, Integer index)
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. |
Get the node ID at a given index.
String GetNodeId(Integer index)
index | The node ID index in the range from 0 to GetNumberOfNodes()-1. |
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.
Boolean SetNode(Murl.Graph.IInstance object, Integer index)
object | A pointer to the node. |
index | The zero-based position where to set the node, in the range from 0 to GetNumberOfNodes()-1. |
Get the node at a given index.
Murl.Graph.IInstance GetNode(Integer index)
index | The node index in the range from 0 to GetNumberOfNodes() |