vrnode - Create node or handle to 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

vrworld_object

Name of a vrworld object representing a virtual world.

node_name

Name of the node.

node_type

Type of the node.

parent_node

Name of the parent node that is a vrnode object.

parent_field

Name of the field of the parent node.

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

vrnode/delete, vrnode/get, vrnode/getfield, vrnode/set, vrnode/setfield, vrworld

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS