Xj3D 2.0 VRML/X3D Code API

vrml.eai.field
Class EventInMFVec2f

java.lang.Object
  extended by vrml.eai.field.BaseField
      extended by vrml.eai.field.EventIn
          extended by vrml.eai.field.EventInMFVec2f

public abstract class EventInMFVec2f
extends EventIn

VRML eventIn class for MFVec2f.

Version:
1.0 30 April 1998

Field Summary
 
Fields inherited from class vrml.eai.field.BaseField
fieldType, MFColor, MFFloat, MFInt32, MFNode, MFRotation, MFString, MFTime, MFVec2f, MFVec3f, SFBool, SFColor, SFFloat, SFImage, SFInt32, SFNode, SFRotation, SFString, SFTime, SFVec2f, SFVec3f, UNSET_FIELD
 
Constructor Summary
protected EventInMFVec2f()
          Construct an instance of this class.
 
Method Summary
abstract  void set1Value(int index, float[] value)
          Set a particular vector value in the given eventIn array.
abstract  void setValue(float[][] value)
          Set the value of the array of 2D vectors.
 
Methods inherited from class vrml.eai.field.EventIn
getUserData, setUserData
 
Methods inherited from class vrml.eai.field.BaseField
getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventInMFVec2f

protected EventInMFVec2f()
Construct an instance of this class. The superclass is called with the type MFVec2f

Method Detail

setValue

public abstract void setValue(float[][] value)
Set the value of the array of 2D vectors. Input is an array of floats If value[i] does not contain at least two values it will generate an ArrayIndexOutOfBoundsException. If value[i] contains more than two items only the first two values will be used and the rest ignored.

If one or more of the values for value[i] are null then the resulting event that is sent to the VRML scenegraph is implementation dependent but no error indicator will be set here.

Parameters:
value - The array of vec2f values where
value[i][0] = X
value[i][1] = Y
Throws:
java.lang.ArrayIndexOutOfBoundsException - A value did not contain at least two values for the vector definition.

set1Value

public abstract void set1Value(int index,
                               float[] value)
Set a particular vector value in the given eventIn array. To the VRML world this will generate a full MFVec2f event with the nominated index value changed.

The value array must contain at least two elements. If the array contains more than 2 values only the first 2 values will be used and the rest ignored.

If the index is out of the bounds of the current array of data values or the array of values does not contain at least 2 elements an ArrayIndexOutOfBoundsException will be generated.

Parameters:
index - The position to set the vector value
value - The array of vector values where
value[0] = X
value[1] = Y
Throws:
java.lang.ArrayIndexOutOfBoundsException - A value did not contain at least 2 values for the vector

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium