Unigine::NodeReference Class
Header: | #include <UnigineNodes.h> |
Inherits: | Node |
A node reference is a node that refers to an external .node file on the disk, which is obtained by exporting a node from the world.
The world can contain several instances of node references referring to the same .node file.
The node reference should be used instead of the node if there a lot of identical objects repeated in the world: it will enable to avoid manual editing each object if you need to make the same changes in all of these objects.
Unlike regular nodes, reference nodes are loaded into the world faster because of the internal cache usage.
A bounding box of the reference node is equal to the bounding box of its root node (child nodes are disregarded).
See Also
- Article on Nodes that lists the main differences between the regular nodes and reference nodes
- Article on Node Reference
NodeReference Class
Members
static NodeReferencePtr create(const char * name)
Constructor. Creates a new object that references a node from a given file.Arguments
- const char * name - Path to a *.node file.
Ptr<NodeReference> cast(const Ptr<Node> & node)
Arguments
- const Ptr<Node> & node
int setNodeName(const char * name)
Sets a reference to a new *.node fileArguments
- const char * name - Path to a *.node file.
Return value
Returns 1 if the new reference is set successfully; otherwise, 0.const char * getNodeName()
Returns the path to the referenced *.node file.Return value
Path to the referenced *.node file.Ptr<Node> getReference()
Ptr<Node> detachReference()
int type()
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)