vrml.eai.field
Class EventInMFFloat

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

public abstract class EventInMFFloat
extends EventIn

Reference to a MFFloat event-in slot. Use this class to write values into MFFloat event-in slots.

The following example demonstrates how to write three float values (0, 0.5 and 1) into the "key" field of a CoordinateInterpolator node:

 vrml.eai.Node coordinateInterpolator = ...;
 vrml.eai.field.EventInMFFloat set_key = (vrml.eai.field.EventInMFFloat)coordinateInterpolator.getEventIn("set_key");
 set_key.setValue(new float[] { 0.0f, 0.5f, 1.0f });
 


Field Summary
 
Fields inherited from class vrml.eai.field.BaseField
MFColor, MFFloat, MFInt32, MFNode, MFRotation, MFString, MFTime, MFVec2f, MFVec3f, SFBool, SFColor, SFFloat, SFImage, SFInt32, SFNode, SFRotation, SFString, SFTime, SFVec2f, SFVec3f
 
Constructor Summary
protected EventInMFFloat()
          Default constructor.
 
Method Summary
abstract  void set1Value(int index, float value)
          Sets one element of the MFFloat event-in slot.
abstract  void setValue(float[] value)
          Sets the elements of the MFFloat event-in slot.
 
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

EventInMFFloat

protected EventInMFFloat()
Default constructor. This method is protected, i.e. you cannot create new instances of this class. The only way to get instances is via the Node.getEventIn(java.lang.String) method.

Method Detail

setValue

public abstract void setValue(float[] value)
Sets the elements of the MFFloat event-in slot.

The following example demonstrates how to write three float values (0, 0.5 and 1) into the "key" field of a CoordinateInterpolator node:

 vrml.eai.Node coordinateInterpolator = ...;
 vrml.eai.field.EventInMFFloat set_key = (vrml.eai.field.EventInMFFloat)coordinateInterpolator.getEventIn("set_key");
 set_key.setValue(new float[] { 0.0f, 0.5f, 1.0f });
 

Parameters:
value - The new float values

set1Value

public abstract void set1Value(int index,
                               float value)
                        throws java.lang.ArrayIndexOutOfBoundsException
Sets one element of the MFFloat event-in slot.

The following example demonstrates how to write a float value (0.5) into the first element of the "key" field of a CoordinateInterpolator node:

 vrml.eai.Node coordinateInterpolator = ...;
 vrml.eai.field.EventInMFFloat set_key = (vrml.eai.field.EventInMFFloat)coordinateInterpolator.getEventIn("set_key");
 set_key.set1Value(0, 0.5f);
 

Parameters:
index - The index of the element, starting at 0.
value - The new float value.
Throws:
java.lang.ArrayIndexOutOfBoundsException - when the index is invalid.