vrml.eai.field
Class EventInSFVec2f
java.lang.Object
vrml.eai.field.BaseField
vrml.eai.field.EventIn
vrml.eai.field.EventInSFVec2f
public abstract class EventInSFVec2f
- extends EventIn
Reference to a SFVec2f event-in slot. Use this class to write
values into SFVec2f event-in slots.
The following example demonstrates how to translate
a texture 0.5 units upwards:
vrml.eai.Node textureTransform = ...;
vrml.eai.field.EventInSFVec2f set_translation = (vrml.eai.field.EventInSFVec2f)textureTransform.getEventIn("set_translation");
float x = 0.0f;
float y = 0.5f;
float[] translation = new float[] { x, y };
set_translation.setValue(translation);
Fields inherited from class vrml.eai.field.BaseField |
MFColor, MFFloat, MFInt32, MFNode, MFRotation, MFString, MFTime, MFVec2f, MFVec3f, SFBool, SFColor, SFFloat, SFImage, SFInt32, SFMatrix4f, SFNode, SFRotation, SFString, SFTime, SFVec2f, SFVec3f |
Method Summary |
abstract void |
setValue(float[] value)
Sets the value of a SFVec2f event-in slot. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventInSFVec2f
protected EventInSFVec2f()
- 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.
setValue
public abstract void setValue(float[] value)
throws java.lang.ArrayIndexOutOfBoundsException
- Sets the value of a SFVec2f event-in slot.
The following example demonstrates how to translate
a texture 0.5 units upwards:
vrml.eai.Node textureTransform = ...;
vrml.eai.field.EventInSFVec2f set_translation = (vrml.eai.field.EventInSFVec2f)textureTransform.getEventIn("set_translation");
float x = 0.0f;
float y = 0.5f;
float[] translation = new float[] { x, y };
set_translation.setValue(translation);
- Parameters:
value
- The new vector value. This is an array of at least two
float values. The first value is the x component of the
vector, the second the y component.
- Throws:
java.lang.ArrayIndexOutOfBoundsException
- when the value array
contains less then two values.