vrml.eai.field
Class EventInSFVec3f
java.lang.Object
vrml.eai.field.BaseField
vrml.eai.field.EventIn
vrml.eai.field.EventInSFVec3f
public abstract class EventInSFVec3f
- extends EventIn
Reference to a SFVec3f event-in slot. Use this class to write
values into SFVec3f event-in slots.
The following example demonstrates how to translate
the children of a Transform node 1 unit upwards:
vrml.eai.Node transform = ...;
vrml.eai.field.EventInSFVec3f set_translation = (vrml.eai.field.EventInSFVec3f)transform.getEventIn("set_translation");
float x = 0.0f;
float y = 1.0f;
float z = 0.0f;
float[] translation = new float[] { x, y, z };
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, SFNode, SFRotation, SFString, SFTime, SFVec2f, SFVec3f |
Method Summary |
abstract void |
setValue(float[] value)
Sets the value of a SFVec3f event-in slot. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventInSFVec3f
protected EventInSFVec3f()
- 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 SFVec3f event-in slot.
The following example demonstrates how to translate
the children of a Transform node 1 unit upwards:
vrml.eai.Node transform = ...;
vrml.eai.field.EventInSFVec3f set_translation = (vrml.eai.field.EventInSFVec3f)transform.getEventIn("set_translation");
float x = 0.0f;
float y = 1.0f;
float z = 0.0f;
float[] translation = new float[] { x, y, z };
set_translation.setValue(translation);
- Parameters:
value
- The new vector value. This is an array of at least
three float values. The first value is the x
component of the vector, the second the y
component, and the third the z component.
- Throws:
java.lang.ArrayIndexOutOfBoundsException