Virtual Reality Toolbox    
vrnode/get

Read property value of vrnode object or VRML field

Syntax

Arguments

vrnode_object
Name of a vrnode object representing the node to be queried.
property_name
Name of the property to be read.
field_name
Name of the VRML field to be read.

Description

If a vrnode object is the only argument, a list of all properties and VRML fields is displayed in the MATLAB Command Window.

If a property name is given as an argument, the method returns the value of that property. All these properties are read-only.

Vrnode objects are case sensitive and have the following properties.

Property
Description
Fields
Valid field names for this type of VRML node.
Name
Node name.
Type
Node type string (for example, 'Transform', 'Shape').
World
A vrworld object representing the node's parent world.

Node fields queried by get can be eventOut or exposedField. EventIn does not have values; therefore, you cannot read these values.

If a VRML field name is given as an argument, the method returns the value of that VRML field. The type of the result depends on the type of the field.

Field Name
Field and Result Type
SFInt32, SFFloat, SFTime
Double
SFVec2f
Two doubles
SFVec3f, SFColor
Three doubles
SFRotation
Four doubles
MFInt32, MFFloat
n doubles
MFVec2f
n-by-2 doubles
MFVec3f, MFColor
n-by-3 doubles
MFRotation
n-by-4 doubles
SFString
String
MFString
Cell array of strings
SFBool
'on' or 'off'

Values that consist of more than one double are returned in the form of a row vector.

VRML fields with types SFNode and MFNode are not accessible in this version of the Virtual Reality Toolbox. These fields always return an empty vector.

See Also

vrnode/set, vrnode/getfield, vrnode/setfield, vrnode


  vrnode/fields vrnode/getfield