Package org.web3d.vrml.nodes
Class VRMLFieldData
java.lang.Object
org.web3d.vrml.nodes.VRMLFieldData
Data holder class to hold information that is returned from the
VRMLNodeType
VRMLNodeType.getFieldValue(int)
method.
WARNING
Note that in the interests of speed this class will normally represent a reference to the internal structure rather than a copy of it. The user of this array should never directly manipulate these values because it will reek havoc to the internal implementation. It is really designed for the scripting and external interface glue code to use and no-one else.
- Version:
- $Revision: 1.6 $
- Author:
- Justin Couch
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final short
The field returned was boolean array datastatic final short
The field returned was boolean databoolean[]
An array of boolean values for MFBool etcboolean
The boolean value of the field.short
The type of data that has been returned in this classstatic final short
The field returned was double array datastatic final short
The field returned was double datadouble[]
An array of double values for MFTime, MFDouble etcdouble
The double value of the field.static final short
The field returned was float array datastatic final short
The field returned was float datafloat[]
An array of float values for MFFloat, SFVec3f, MFColor etcfloat
The float value of the field.static final short
The field returned was int array datastatic final short
The field returned was int dataint[]
An array of int values for MFInt, SFImage etcint
The integer value of the field.static final short
The field returned was long array datastatic final short
The field returned was long datalong[]
An array of int values for MFLonglong
The long value of the field.static final short
The field returned was a node arraystatic final short
The field returned was a nodeAn array of node values of the fieldThe node value of the fieldint
The number of valid values in an array field.static final short
The field returned was a string arraystatic final short
The field returned was a stringString[]
An array of string values of the fieldThe string value of the field -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor creates a data object with no values set.VRMLFieldData
(VRMLFieldData data) Copy constructor that takes the data in the given node and assigns the same values to this instance. -
Method Summary
-
Field Details
-
BOOLEAN_DATA
public static final short BOOLEAN_DATAThe field returned was boolean data- See Also:
-
INT_DATA
public static final short INT_DATAThe field returned was int data- See Also:
-
LONG_DATA
public static final short LONG_DATAThe field returned was long data- See Also:
-
FLOAT_DATA
public static final short FLOAT_DATAThe field returned was float data- See Also:
-
DOUBLE_DATA
public static final short DOUBLE_DATAThe field returned was double data- See Also:
-
STRING_DATA
public static final short STRING_DATAThe field returned was a string- See Also:
-
NODE_DATA
public static final short NODE_DATAThe field returned was a node- See Also:
-
BOOLEAN_ARRAY_DATA
public static final short BOOLEAN_ARRAY_DATAThe field returned was boolean array data- See Also:
-
INT_ARRAY_DATA
public static final short INT_ARRAY_DATAThe field returned was int array data- See Also:
-
LONG_ARRAY_DATA
public static final short LONG_ARRAY_DATAThe field returned was long array data- See Also:
-
FLOAT_ARRAY_DATA
public static final short FLOAT_ARRAY_DATAThe field returned was float array data- See Also:
-
DOUBLE_ARRAY_DATA
public static final short DOUBLE_ARRAY_DATAThe field returned was double array data- See Also:
-
NODE_ARRAY_DATA
public static final short NODE_ARRAY_DATAThe field returned was a node array- See Also:
-
STRING_ARRAY_DATA
public static final short STRING_ARRAY_DATAThe field returned was a string array- See Also:
-
dataType
public short dataTypeThe type of data that has been returned in this class -
numElements
public int numElementsThe number of valid values in an array field. If the array is a flattened array of items such as MFColor, then this is the number of values in the array not the length of items (ie size = numElements * 3 for MFColor). -
intValue
public int intValueThe integer value of the field. -
longValue
public long longValueThe long value of the field. -
floatValue
public float floatValueThe float value of the field. -
doubleValue
public double doubleValueThe double value of the field. -
booleanValue
public boolean booleanValueThe boolean value of the field. -
nodeValue
The node value of the field -
stringValue
The string value of the field -
intArrayValues
public int[] intArrayValuesAn array of int values for MFInt, SFImage etc -
longArrayValues
public long[] longArrayValuesAn array of int values for MFLong -
floatArrayValues
public float[] floatArrayValuesAn array of float values for MFFloat, SFVec3f, MFColor etc -
doubleArrayValues
public double[] doubleArrayValuesAn array of double values for MFTime, MFDouble etc -
booleanArrayValues
public boolean[] booleanArrayValuesAn array of boolean values for MFBool etc -
nodeArrayValues
An array of node values of the field -
stringArrayValues
An array of string values of the field
-
-
Constructor Details
-
VRMLFieldData
public VRMLFieldData()Default constructor creates a data object with no values set. -
VRMLFieldData
Copy constructor that takes the data in the given node and assigns the same values to this instance. For array data types, this is a copy by reference action.- Parameters:
data
- The instance to copy values from
-
-
Method Details
-
clear
public void clear()Clear the contents of the current field data.
-