Virtual Reality Toolbox | ![]() ![]() |
Create a new node or a handle to an existing node
Syntax
mynode = vrnode mynode = vrnode([]) mynode = vrnode(vrworld_object
, 'node_name
'
)mynode = vrnode
(vrworld_object
,'
node_name
'
,
'
node_type
'
)mynode = vrnode
(parent_node,
'
parent_field
'
,'
node_name
'
,
'
node_type
'
)
Arguments
Description
mynode = vrnode
creates an empty vrnode handle that does not reference any node.
mynode = vrnode([])
creates an empty array of vrnode handles.
mynode = vrnode
(vrworld_object
, '
node_name
'
) creates a handle to an existing named node in the virtual world.
mynode = vrnode
(vrworld_object
, '
node_name
'
,
'
node_type
'
) creates a new node called node_name
of type node_type
on the root of the virtual world. It returns the handle to the newly created node.
mynode = vrnode
(parent_node,
'
parent_field
'
, '
node_name
'
,
'
node_type
'
) creates a new node called node_name
of type node_type
that is a child of the parent_node
and resides in the field parent_field
. It returns the handle to the newly created node.
A vrnode object identifies a virtual world node in a way very similar to a handle. If the vrnode
method is applied to a node that does not exist, the node is created, the vrnode object is created, and the handle to the vrnode object is returned. If the vrnode
method is applied to an existing node, the handle to the vrnode object associated with this node is returned.
See Also
vrworld
, vrnode/get
, vrnode/set
, vrnode/getfield
, vrnode/setfield
, vrnode/delete
![]() | vrnode Object Methods | vrnode/delete | ![]() |