vrml.field
Class ConstMFVec2d

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

public class ConstMFVec2d
extends ConstMField

Represents a read-only VRML MFVec2d field in Java.


Constructor Summary
ConstMFVec2d(double[] vec2s)
          Construct a read-only MFVec2d field.
ConstMFVec2d(double[][] vec2s)
          Construct a read-only MFVec2d field.
ConstMFVec2d(int size, double[] vec2s)
          Construct a read-only MFVec2d field.
 
Method Summary
 void get1Value(int index, double[] vec2s)
          Retrieves a specific element in an MFVec2d and returns it as a double array.
 void get1Value(int index, SFVec2d vec)
          Retrieves a specific element in an MFVec2d and returns it as an SFVec2d.
 int getSize()
          Number of elements contained in the MField.
 void getValue(double[] vec2s)
          Retrieves the value of an MFVec2d field.
 void getValue(double[][] vec2s)
          Retrieves the value of an MFVec2d 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

ConstMFVec2d

public ConstMFVec2d(double[][] vec2s)
Construct a read-only MFVec2d field.

Parameters:
vec2s - An array of sets of x,y values

ConstMFVec2d

public ConstMFVec2d(double[] vec2s)
Construct a read-only MFVec2d field.

Parameters:
vec2s - List of x,y pairs

ConstMFVec2d

public ConstMFVec2d(int size,
                    double[] vec2s)
Construct a read-only MFVec2d field.

Parameters:
size - Number of SFVec2d elements passed in.
vec2s - List of x,y pairs
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(double[][] vec2s)
Retrieves the value of an MFVec2d field.

Parameters:
vec2s - 2D array of x,y pairs to be returned.

getValue

public void getValue(double[] vec2s)
Retrieves the value of an MFVec2d field.

Parameters:
vec2s - Array of x,y pairs to be returned.

get1Value

public void get1Value(int index,
                      double[] vec2s)
Retrieves a specific element in an MFVec2d and returns it as a double array.

Parameters:
index - Position of desired element
vec2s - Element at specified position

get1Value

public void get1Value(int index,
                      SFVec2d vec)
Retrieves a specific element in an MFVec2d and returns it as an SFVec2d.

Parameters:
index - Position of desired element
vec - Element at specified position