Murl Engine Lua Addon API  Version 1.0 beta
Murl.Graph.IGenericNodeTarget.GraphIBoneState

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.


Table members

Methods


IsInitialized()

Check if the node target is initialized.

Boolean IsInitialized()

Returns
Boolean true if initialized.

IsModified()

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()

Returns
Boolean true if modified.

SetInitialized(initialized)

Manually set or reset the initialized state of the target.

Boolean SetInitialized(Boolean initialized)

Parameters
initializedThe initialized state.
Returns
Boolean true if successful.

SetModified(modified)

Manually set or reset the modified state of the target.

Boolean SetModified(Boolean modified)

Parameters
modifiedThe modified state.
Returns
Boolean true if successful.

GetMinNumberOfNodes()

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()

Returns
Integer The required minimum number of nodes for the target to be valid.

GetMaxNumberOfNodes()

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()

Returns
Integer The required maximum number of nodes for the target to be valid.

SetNumberOfNodes(numberOfNodes)

Set the total number of nodes. The given value must be in the range from GetMinNumberOfNodes() to GetMaxNumberOfNodes().

Boolean SetNumberOfNodes(Integer numberOfNodes)

Parameters
numberOfNodesThe total number of nodes in the target.
Returns
Boolean true if successful.

GetNumberOfNodes()

Get the total number of nodes.

Integer GetNumberOfNodes()

Returns
Integer The total number of nodes in the target.

SetNodeId(nodeId, index)

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)

Parameters
nodeIdA string containing the full path and ID to a node in the scene graph.
indexThe index of the node ID to set, in the range from 0 to GetNumberOfNodes()-1.
Returns
Boolean true if successful.

GetNodeId(index)

Get the node ID at a given index.

String GetNodeId(Integer index)

Parameters
indexThe node ID index in the range from 0 to GetNumberOfNodes()-1.
Returns
String The node ID at the given index.

SetNode(object, index)

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.IBoneState object, Integer index)

Parameters
objectA pointer to the node.
indexThe zero-based position where to set the node, in the range from 0 to GetNumberOfNodes()-1.
Returns
Boolean true if successful.

GetNode(index)

Get the node at a given index.

Murl.Graph.IBoneState GetNode(Integer index)

Parameters
indexThe node index in the range from 0 to GetNumberOfNodes()
Returns
Murl.Graph.IBoneState The node at the given index.