Functions for operating on the node structure of the VR Tree.
Clones an existing node.
Handle to the parent of the new node
the node to copy
if not 0, also copies descendants
the copy of nodeToClone
Compares all the properties on both nodes to make sure they are equal.
first node to compare
second node to compare
whether to compare the node name as well as the properties (non-zero to enable)
1 if the nodes are the same, 0 if they are not
Creates a node.
type of node to create
name of the new node
creation flags (bits) to provide to the new node
low 64bits of a unique id (or 0 for auto ID)
high 64bits of a unique id (or 0 for auto ID)
whether the change is a response to a user action
Flags larger than 16bits will be truncated.
Deletes a node and all its children.
the node to delete
0 if deletion successful
Finds a descendant of startNode using its path.
node to search from
path from start node to requested node
handle to requested node or NULL if not found
Finds a direct child of startNode. Index is used to specify n'th child if multiple children have the same name.
node to get the child from
name of the child
index of child with non-unique name
Finds a direct child of startNode by specifying name and type.
node to get child from
type of child node to get
name of the child node to return
handle to found node or NULL if not found
Gets or creates a node matching metanode and name.
Handle to the parent of the node
Gets the first child of node.
first child or NULL if no children
Gets the first child of a specific type.
the type of child to get
first child of requested type, or NULL if no children/no children of this type
Gets the VRTree libraries node.
Gets the metanode of a node.
metanode or NULL if no metanode
Gets the next sibling of a node.
sibling or NULL if no siblings
Gets the next sibling of a specific type.
the type of sibling to get
next sibling of requested type, or NULL if no siblings/no siblings of this type
Gets the name of a node.
handle to the node
a buffer to receive the node name as a null terminated string
size of the buffer
the number of characters written to the buffer (including trailing null)
Gets the length of a node's name, plus 1 for the trailing null terminator.
Gets the path of a node.
a buffer to recieve the node path as a null terminated string
if buffer is null, function returns the required size of the buffer
Gets the length of a node's path.
Stores a pointer on the node.
user data bound to slot
Gets the parent of a node.
parent node or NULL if no parent (root node)
Gets the previous sibling of a node.
Gets the previous sibling of a specific type.
previous sibling of requested type, or NULL if no siblings/no siblings of this type
Gets the VRTree root node.
Gets the VRTree scenes node.
Gets the VRTree system library node.
Gets the VRTree user node.
Gets the type of a node.
a buffer to recieve the node type name as a null terminated string
Gets the length of the type name of a node.
Gets the VRTree users node.
Checks if node a is an ancestor of node b.
1 if a is an ancestor of b
Determines if a node value has been changed/dirtied.
name of the property on this node
1 if node property is dirty, 0 if it is not
the index of the property to set
Checks if the name of the node is equal to parameter.
to check against
1 if name is equal -1 if node invalid 0 if not equal
Checks if two node handles are pointing at the same node.
1 if the nodes are the same
Determines if a node is of a particular type.
name of the node type to match
1 if node is of type metaName, 0 if it is not
Loads a VRText or VRNative format file from disk.
the node to load the file onto (usually root)
the full path to the file to load
The first new child of targetNode, or NULL if load failed
Input flags to apply while loading the tree
flags which adjust the behaviour of the builder
additional MetaNode flags applied to nodes created by the tree builder
Saves the tree to a VRText or VRNative format file on disk.
the node to start saving from (usually root)
the full path to the file to save to
0 if the save was successful
the node to start saving from (usually root).
the full path to the file to save to.
0 if the save was successful.
Sets the name of a node.
the new node name
0 on success
which you wish to store in slot, can be null to remove data
previously bound data, if any
Sets the parent of a node, adding it as the last child.
Sets the parent of a node, specifying a sibling to insert after.
the node after which to insert this node. If null, inserts as first child of parent