vrml.field
Class MFRotation

java.lang.Object
  extended by vrml.Field
      extended by vrml.MField
          extended by vrml.field.MFRotation
All Implemented Interfaces:
java.lang.Cloneable

public class MFRotation
extends MField

Represents a VRML MFRotation field in Java.


Constructor Summary
MFRotation()
          Default constructor.
MFRotation(float[] rotations)
          Construct an MFRotation field.
MFRotation(float[][] rotations)
          Construct an MFRotation field.
MFRotation(int size, float[] rotations)
          Construct an MFRotation field.
 
Method Summary
 void addValue(ConstSFRotation rotation)
          Add a new element at the end of the list.
 void addValue(float axisX, float axisY, float axisZ, float angle)
          Add a new element at the end of the list.
 void addValue(SFRotation rotation)
          Add a new element at the end of the list.
 void clear()
          Removes all fields from the MField.
 void delete(int index)
          Deletes a field from the MField.
 void get1Value(int index, float[] rotations)
          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.
 void insertValue(int index, ConstSFRotation rotation)
          Insert a new element at the specified position.
 void insertValue(int index, float axisX, float axisY, float axisZ, float angle)
          Insert a new element at the specified position.
 void insertValue(int index, SFRotation rotation)
          Insert a new element at the specified position.
 void set1Value(int index, ConstSFRotation rotation)
          Set a specified element in the field.
 void set1Value(int index, float axisX, float axisY, float axisZ, float angle)
          Set a specified element in the field.
 void set1Value(int index, SFRotation rotation)
          Set a specified element in the field.
 void setValue(ConstMFRotation rotations)
          Set the value of the field.
 void setValue(float[] rotations)
          Set the value of the field.
 void setValue(float[][] rotations)
          Set the value of the field.
 void setValue(int size, float[] rotations)
          Set the value of the field.
 void setValue(MFRotation rotations)
          Set the value of the field.
 
Methods inherited from class vrml.Field
clone, dispose, finalize, getPeer, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MFRotation

public MFRotation()
Default constructor.


MFRotation

public MFRotation(float[][] rotations)
Construct an MFRotation field.

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

MFRotation

public MFRotation(float[] rotations)
Construct an MFRotation field.

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

MFRotation

public MFRotation(int size,
                  float[] rotations)
Construct an 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: MField
Number of elements contained in the MField.

Specified by:
getSize in class MField
Returns:
Number of elements.

clear

public void clear()
Description copied from class: MField
Removes all fields from the MField.

Specified by:
clear in class MField

delete

public void delete(int index)
Description copied from class: MField
Deletes a field from the MField.

Specified by:
delete in class MField
Parameters:
index - Index of field to delete.

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[] rotations)
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.

setValue

public void setValue(float[][] rotations)
Set the value of the field.

Parameters:
rotations - New value for field.

setValue

public void setValue(float[] rotations)
Set the value of the field.

Parameters:
rotations - New value for field.

setValue

public void setValue(int size,
                     float[] rotations)
Set the value of the field.

Parameters:
size - Size of new value for field.
rotations - New value for field.

setValue

public void setValue(MFRotation rotations)
Set the value of the field.

Parameters:
rotations - New value for field.

setValue

public void setValue(ConstMFRotation rotations)
Set the value of the field.

Parameters:
rotations - New value for field.

set1Value

public void set1Value(int index,
                      ConstSFRotation rotation)
Set a specified element in the field.

Parameters:
index - Position of element to update.
rotation - New value for element.

set1Value

public void set1Value(int index,
                      SFRotation rotation)
Set a specified element in the field.

Parameters:
index - Position of element to update.
rotation - New value for element.

set1Value

public void set1Value(int index,
                      float axisX,
                      float axisY,
                      float axisZ,
                      float angle)
Set a specified element in the field.

Parameters:
index - Position of element to update.
axisX - Rotation along X-axis of new value.
axisY - Rotation along Y-axis of new value.
axisZ - Rotation along Z-axis of new value.
angle - Angle of new element.

addValue

public void addValue(ConstSFRotation rotation)
Add a new element at the end of the list.

Parameters:
rotation - Element to add.

addValue

public void addValue(SFRotation rotation)
Add a new element at the end of the list.

Parameters:
rotation - Element to add.

addValue

public void addValue(float axisX,
                     float axisY,
                     float axisZ,
                     float angle)
Add a new element at the end of the list.

Parameters:
axisX - Rotation along X-axis of new element.
axisY - Rotation along Y-axis of new element.
axisZ - Rotation along Z-axis of new element.
angle - Angle of new element.

insertValue

public void insertValue(int index,
                        ConstSFRotation rotation)
Insert a new element at the specified position.

Parameters:
index - Position to insert new element at.
rotation - Value to insert.

insertValue

public void insertValue(int index,
                        SFRotation rotation)
Insert a new element at the specified position.

Parameters:
index - Position to insert new element at.
rotation - Value to insert.

insertValue

public void insertValue(int index,
                        float axisX,
                        float axisY,
                        float axisZ,
                        float angle)
Insert a new element at the specified position.

Parameters:
index - Position to insert new element at.
axisX - Rotation along X-axis of rotation.
axisY - Rotation along Y-axis of rotation.
axisZ - Rotation along Z-axis of rotation.
angle - Angle of rotation.