Package vrml.eai.field
Class EventOutMFRotation
java.lang.Object
vrml.eai.field.BaseField
vrml.eai.field.EventOut
vrml.eai.field.EventOutMField
vrml.eai.field.EventOutMFRotation
- Direct Known Subclasses:
EventOutMFRotationWrapper
VRML eventOut class for MFRotation.
Rotation values are specified according to the VRML IS Specification Section 5.8 SFRotation and MFRotation.
- Version:
- 1.0 30 April 1998
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Construct an instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionabstract float[]
get1Value
(int index) Get a particular rotation in the given eventOut array.abstract void
get1Value
(int index, float[] vec) Get the value of a particular rotation value in the event out array.abstract float[][]
getValue()
Get the value of the array of rotations.abstract void
getValue
(float[] vec) Get the values of the event out flattened into a single 1D array.abstract void
getValue
(float[][] vec) Write the value of the event out to the given array.Methods inherited from class vrml.eai.field.EventOutMField
size
Methods inherited from class vrml.eai.field.EventOut
addVrmlEventListener, getUserData, removeVrmlEventListener, setUserData
-
Constructor Details
-
EventOutMFRotation
protected EventOutMFRotation()Construct an instance of this class. The superclass constructor is called with a type of MFRotation.
-
-
Method Details
-
getValue
public abstract float[][] getValue()Get the value of the array of rotations. Output is an array of floats values in order required to specify an SFRotation.- Returns:
- The array of rotation values where
value[i][0] = X component [0-1]
value[i][1] = Y component [0-1]
value[i][2] = Z component [0-1]
value[i][3] = Angle of rotation [-PI - PI] (nominally).
-
getValue
public abstract void getValue(float[][] vec) Write the value of the event out to the given array.- Parameters:
vec
- The array to be filled in where
value[i][0] = X component [0-1]
value[i][1] = Y component [0-1]
value[i][2] = Z component [0-1]
value[i][3] = Angle of rotation [-PI - PI] (nominally).- Throws:
ArrayIndexOutOfBoundsException
- The provided array was too small
-
getValue
public abstract void getValue(float[] vec) Get the values of the event out flattened into a single 1D array. The array must be at least 4 times the size of the array.- Parameters:
vec
- The array to be filled in where the value[i + 0] = X component [0-1]
value[i + 1] = Y component [0-1]
value[i + 2] = Z component [0-1]
value[i + 3] = Angle of rotation [-PI - PI] (nominally).- Throws:
ArrayIndexOutOfBoundsException
- The provided array was too small
-
get1Value
public abstract float[] get1Value(int index) Get a particular rotation in the given eventOut array.If the index is out of the bounds of the current array of data values an ArrayIndexOutOfBoundsException will be generated.
- Parameters:
index
- The position to get the rotation value- Returns:
- The array of rotation values where
value[0] = X component [0-1]
value[1] = Y component [0-1]
value[2] = Z component [0-1]
value[3] = Angle of rotation [-PI - PI] (nominally). - Throws:
ArrayIndexOutOfBoundsException
- The index was outside the current data array bounds.
-
get1Value
public abstract void get1Value(int index, float[] vec) Get the value of a particular rotation value in the event out array.- Parameters:
index
- The position to get the vector value from.vec
- The array to place the value in where. vec[0] = X component [0-1]
vec[1] = Y component [0-1]
vec[2] = Z component [0-1]
vec[3] = Angle of rotation [-PI - PI] (nominally).- Throws:
ArrayIndexOutOfBoundsException
- The provided array was too small or the index was outside the current data array bounds.
-