Xj3D VRML/X3D Code API

org.web3d.vrml.nodes
Class VRMLFieldData

java.lang.Object
  extended byorg.web3d.vrml.nodes.VRMLFieldData

public class VRMLFieldData
extends java.lang.Object

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
static short BOOLEAN_ARRAY_DATA
          The field returned was boolean array data
static short BOOLEAN_DATA
          The field returned was boolean data
 boolean[] booleanArrayValue
          An array of boolean values for MFBool etc
 boolean booleanValue
          The boolean value of the field.
 short dataType
          The type of data that has been returned in this class
static short DOUBLE_ARRAY_DATA
          The field returned was double array data
static short DOUBLE_DATA
          The field returned was double data
 double[] doubleArrayValue
          An array of double values for MFTime, MFDouble etc
 double doubleValue
          The double value of the field.
static short FLOAT_ARRAY_DATA
          The field returned was float array data
static short FLOAT_DATA
          The field returned was float data
 float[] floatArrayValue
          An array of float values for MFFloat, SFVec3f, MFColor etc
 float floatValue
          The float value of the field.
static short INT_ARRAY_DATA
          The field returned was int array data
static short INT_DATA
          The field returned was int data
 int[] intArrayValue
          An array of int values for MFInt, SFImage etc
 int intValue
          The integer value of the field.
static short LONG_ARRAY_DATA
          The field returned was long array data
static short LONG_DATA
          The field returned was long data
 long[] longArrayValue
          An array of int values for MFLong
 long longValue
          The long value of the field.
static short NODE_ARRAY_DATA
          The field returned was a node array
static short NODE_DATA
          The field returned was a node
 VRMLNode[] nodeArrayValue
          An array of node values of the field
 VRMLNode nodeValue
          The node value of the field
 int numElements
          The number of valid values in an array field.
static short STRING_ARRAY_DATA
          The field returned was a string array
static short STRING_DATA
          The field returned was a string
 java.lang.String[] stringArrayValue
          An array of string values of the field
 java.lang.String stringValue
          The string value of the field
 
Constructor Summary
VRMLFieldData()
          Default 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
 void clear()
          Clear the contents of the current field data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOLEAN_DATA

public static final short BOOLEAN_DATA
The field returned was boolean data

See Also:
Constant Field Values

INT_DATA

public static final short INT_DATA
The field returned was int data

See Also:
Constant Field Values

LONG_DATA

public static final short LONG_DATA
The field returned was long data

See Also:
Constant Field Values

FLOAT_DATA

public static final short FLOAT_DATA
The field returned was float data

See Also:
Constant Field Values

DOUBLE_DATA

public static final short DOUBLE_DATA
The field returned was double data

See Also:
Constant Field Values

STRING_DATA

public static final short STRING_DATA
The field returned was a string

See Also:
Constant Field Values

NODE_DATA

public static final short NODE_DATA
The field returned was a node

See Also:
Constant Field Values

BOOLEAN_ARRAY_DATA

public static final short BOOLEAN_ARRAY_DATA
The field returned was boolean array data

See Also:
Constant Field Values

INT_ARRAY_DATA

public static final short INT_ARRAY_DATA
The field returned was int array data

See Also:
Constant Field Values

LONG_ARRAY_DATA

public static final short LONG_ARRAY_DATA
The field returned was long array data

See Also:
Constant Field Values

FLOAT_ARRAY_DATA

public static final short FLOAT_ARRAY_DATA
The field returned was float array data

See Also:
Constant Field Values

DOUBLE_ARRAY_DATA

public static final short DOUBLE_ARRAY_DATA
The field returned was double array data

See Also:
Constant Field Values

NODE_ARRAY_DATA

public static final short NODE_ARRAY_DATA
The field returned was a node array

See Also:
Constant Field Values

STRING_ARRAY_DATA

public static final short STRING_ARRAY_DATA
The field returned was a string array

See Also:
Constant Field Values

dataType

public short dataType
The type of data that has been returned in this class


numElements

public int numElements
The 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 intValue
The integer value of the field.


longValue

public long longValue
The long value of the field.


floatValue

public float floatValue
The float value of the field.


doubleValue

public double doubleValue
The double value of the field.


booleanValue

public boolean booleanValue
The boolean value of the field.


nodeValue

public VRMLNode nodeValue
The node value of the field


stringValue

public java.lang.String stringValue
The string value of the field


intArrayValue

public int[] intArrayValue
An array of int values for MFInt, SFImage etc


longArrayValue

public long[] longArrayValue
An array of int values for MFLong


floatArrayValue

public float[] floatArrayValue
An array of float values for MFFloat, SFVec3f, MFColor etc


doubleArrayValue

public double[] doubleArrayValue
An array of double values for MFTime, MFDouble etc


booleanArrayValue

public boolean[] booleanArrayValue
An array of boolean values for MFBool etc


nodeArrayValue

public VRMLNode[] nodeArrayValue
An array of node values of the field


stringArrayValue

public java.lang.String[] stringArrayValue
An array of string values of the field

Constructor Detail

VRMLFieldData

public VRMLFieldData()
Default constructor creates a data object with no values set.


VRMLFieldData

public VRMLFieldData(VRMLFieldData data)
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 Detail

clear

public void clear()
Clear the contents of the current field data.


Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium