vrml.field
Class ConstMFRotation

java.lang.Object
  extended by vrml.Field
      extended by vrml.ConstField
          extended by vrml.ConstMField
              extended by vrml.field.ConstMFRotation
All Implemented Interfaces:
java.lang.Cloneable

public class ConstMFRotation
extends ConstMField

Represents a read-only VRML MFRotation field in Java.


Constructor Summary
ConstMFRotation(float[] rotations)
          Construct a read-only MFRotation field.
ConstMFRotation(float[][] rotations)
          Construct a read-only MFRotation field.
ConstMFRotation(int size, float[] rotations)
          Construct a read-only MFRotation field.
 
Method Summary
 void get1Value(int index, float[] rotation)
          Retrieves a specific rotation element in an MFRotation and returns it as a float array.
 void get1Value(int index, SFRotation rotation)
          Retrieves a specific rotation element in an MFRotation and returns it as an SFRotation.
 int getSize()
          Number of elements contained in the MField.
 void getValue(float[] rotations)
          Retrieves the value of an MFRotation field.
 void getValue(float[][] rotations)
          Retrieves the value of an MFRotation field.
 
Methods inherited from class vrml.ConstField
clone
 
Methods inherited from class vrml.Field
dispose, finalize, getPeer, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstMFRotation

public ConstMFRotation(float[][] rotations)
Construct a read-only MFRotation field.

Parameters:
rotations - An array of four float tuples. (x, y, z, a)

ConstMFRotation

public ConstMFRotation(float[] rotations)
Construct a read-only MFRotation field.

Parameters:
rotations - List of x, y, z, a 4-tuples

ConstMFRotation

public ConstMFRotation(int size,
                       float[] rotations)
Construct a read-only MFRotation field.

Parameters:
size - Number of rotations passed in.
rotations - List of x, y, z, a 4-tuples
Method Detail

getSize

public int getSize()
Description copied from class: ConstMField
Number of elements contained in the MField.

Specified by:
getSize in class ConstMField
Returns:
the number of elements.

getValue

public void getValue(float[][] rotations)
Retrieves the value of an MFRotation field.

Parameters:
rotations - 2D array of sets of rotation values to be returned.

getValue

public void getValue(float[] rotations)
Retrieves the value of an MFRotation field.

Parameters:
rotations - Array of sets of rotations values to be returned.

get1Value

public void get1Value(int index,
                      float[] rotation)
Retrieves a specific rotation element in an MFRotation and returns it as a float array.

Parameters:
index - Position of desired rotation
rotation - Value of specified rotation.

get1Value

public void get1Value(int index,
                      SFRotation rotation)
Retrieves a specific rotation element in an MFRotation and returns it as an SFRotation.

Parameters:
index - Position of desired rotation
rotation - SFRotation to be set to desired value.