vrml.field
Class ConstMFVec2f

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

public class ConstMFVec2f
extends ConstMField

Represents a read-only VRML MFVec2f field in Java.


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

ConstMFVec2f

public ConstMFVec2f(float[][] vec2s)
Construct a read-only MFVec2f field.

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

ConstMFVec2f

public ConstMFVec2f(float[] vec2s)
Construct a read-only MFVec2f field.

Parameters:
vec2s - List of x,y pairs

ConstMFVec2f

public ConstMFVec2f(int size,
                    float[] vec2s)
Construct a read-only MFVec2f field.

Parameters:
size - Number of SFVec2f 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(float[][] vec2s)
Retrieves the value of an MFVec2f field.

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

getValue

public void getValue(float[] vec2s)
Retrieves the value of an MFVec2f field.

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

get1Value

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

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

get1Value

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

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