Murl Engine Lua Addon API  Version 1.0 beta
Murl.Graph.IReference

The IReference graph node interface.

Reference nodes can be used to directly reference to any other (previously defined) node in the scene graph, without actually duplicating that node and its children (in contrast to Graph::IInstance nodes, which actually create new sub-graphs).

Scene graph traversal is carried out on the referenced node and its children as if they were regular children of this node. In other words, multiple traversals may be carried out on the same node more than once per tick and/or frame, depending on its active and/or visible state, respectively. If some animated node is referenced, all references to this node reflect the same animation state during that frame. It is not possible to e.g. reference a single animated Graph::IPlaneSequenceGeometry multiple times and show different animation frames: all references are in sync regarding animation state. In such a case, e.g. a Graph::IInstance must be used instead, to create distinct animated objects.

The interface exposes two GetTransformInterface() methods that can be used to access a node's optionally present Graph::ITransform interface, which allows to define an additional transform applied to the referenced node. Note, that simple references need not implement this interface and return null on both methods.


Table members

Methods


GetNodeInterface()

Get the constant Graph::INode interface. This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.

Murl.Graph.INode GetNodeInterface()

Returns
Murl.Graph.INode The constant Graph::INode interface, or null if not available

GetTransformInterface()

Get the constant Graph::ITransform interface. This method returns a constant pointer to the node's optional Graph::ITransform interface, to be able to query the node's transformation matrix and depth order.

Murl.Graph.ITransform GetTransformInterface()

Returns
Murl.Graph.ITransform The constant Graph::ITransform interface, or null if not available

GetScaleInterface()

Get the constant Graph::IScale interface. This method returns a constant pointer to the node's optional Graph::IScale interface, to be able to query the node's scale factor.

Murl.Graph.IScale GetScaleInterface()

Returns
Murl.Graph.IScale The constant Graph::IScale interface, or null if not available

GetNodeTarget()

Get the constant Graph::INodeTarget container. This method returns a constant pointer to the node's Graph::INodeTarget container, which allows to query the referenced node.

Murl.Graph.IGenericNodeTarget.GraphINode GetNodeTarget()

Returns
Murl.Graph.IGenericNodeTarget.GraphINode The mutable Graph::INodeTarget container, or null if not available.