Xj3D VRML/X3D Code API

vrml.field
Class ConstMFRotation

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

public class ConstMFRotation
extends ConstMField

Constant VRML JSAI type class containing multiple rotations.

Internally the class keeps data as a flat array, so that is the most efficient way of interacting with this class.

Version:
$Revision: 1.6 $
Author:
Alan Hudson, Justin Couch

Field Summary
protected  float[] data
          The data of the underlying field
 
Fields inherited from class vrml.ConstMField
numElements
 
Fields inherited from class vrml.Field
valueChanged
 
Constructor Summary
protected ConstMFRotation()
          Construct an instance with default values.
  ConstMFRotation(float[] vecs)
          Construct a new field based on all the given data values
  ConstMFRotation(float[][] vecs)
          Construct a new field based on all the given 4D array of values.
  ConstMFRotation(int size, float[] vecs)
          Construct a new field based on subsection the given data values
 
Method Summary
 java.lang.Object clone()
          Make a clone of this object.
 void get1Value(int index, float[] vec)
          Get the vec value at the given position and copy it into the user provided array.
 void get1Value(int index, SFRotation vec)
          Get the vec value at the given position and copy it into the user provided field.
 void getValue(float[] vecs)
          Copy the vec values used in this field into the user provided array.
 void getValue(float[][] vecs)
          Get the vec values used in this field and copy them into the user provided array.
 java.lang.String toString()
          Create a string representation of the field values.
 
Methods inherited from class vrml.ConstMField
getSize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

data

protected float[] data
The data of the underlying field

Constructor Detail

ConstMFRotation

protected ConstMFRotation()
Construct an instance with default values. Not available to mere mortals.


ConstMFRotation

public ConstMFRotation(float[][] vecs)
Construct a new field based on all the given 4D array of values.

Parameters:
vecs - The vec values to use

ConstMFRotation

public ConstMFRotation(float[] vecs)
Construct a new field based on all the given data values

Parameters:
vecs - The vec values to use

ConstMFRotation

public ConstMFRotation(int size,
                       float[] vecs)
Construct a new field based on subsection the given data values

Parameters:
size - The number of items to use. numElements = size / 4
vecs - The vec values to use
Method Detail

getValue

public void getValue(float[][] vecs)
Get the vec values used in this field and copy them into the user provided array.

Parameters:
vecs - The array to copy values to

getValue

public void getValue(float[] vecs)
Copy the vec values used in this field into the user provided array.

Parameters:
vecs - The array to copy values to

get1Value

public void get1Value(int index,
                      float[] vec)
Get the vec value at the given position and copy it into the user provided array.

Parameters:
index - The position of the vec to copy
vec - The array to copy data to

get1Value

public void get1Value(int index,
                      SFRotation vec)
Get the vec value at the given position and copy it into the user provided field.

Parameters:
index - The position of the vec to copy
vec - The field to copy data to

toString

public java.lang.String toString()
Create a string representation of the field values.

Returns:
A string representing the values.

clone

public java.lang.Object clone()
Make a clone of this object.

Specified by:
clone in class Field
Returns:
A copy of the field and its data

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium