|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectvrml.eai.field.BaseField
vrml.eai.field.EventOut
vrml.eai.field.EventOutMField
vrml.eai.field.EventOutMFFloat
public abstract class EventOutMFFloat
Reference to a MFFloat event-out slot. Use this class to read values from MFFloat event-out slots.
The following example gets the keys from the "key" field of a CoordinateInterpolator node and prints them to the console:
vrml.eai.Node coordinateInterpolator = ...;
vrml.eai.field.EventOutMFFloat key_changed = (vrml.eai.field.EventOutMFFloat)coordinateInterpolator.getEventOut("key_changed");
float[] f = key_changed.getValue();
for (int i = 0; i < f.length; ++i)
System.out.println(f[i]);
| Field Summary |
|---|
| 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 |
| Constructor Summary | |
|---|---|
protected |
EventOutMFFloat()
Default Constructor. |
| Method Summary | |
|---|---|
abstract float |
get1Value(int index)
Returns one element of a MFFloat event-out slot. |
abstract float[] |
getValue()
Returns the current value of a MFFloat event-out slot. |
abstract void |
getValue(float[] value)
Returns the current value of a MFFloat event-out slot. |
| Methods inherited from class vrml.eai.field.EventOutMField |
|---|
size |
| Methods inherited from class vrml.eai.field.EventOut |
|---|
addVrmlEventListener, getUserData, removeVrmlEventListener, 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 |
|---|
protected EventOutMFFloat()
Node.getEventOut(java.lang.String) method.
| Method Detail |
|---|
public abstract float[] getValue()
The following example gets the keys from the "key" field of a CoordinateInterpolator node and prints them to the console:
vrml.eai.Node coordinateInterpolator = ...;
vrml.eai.field.EventOutMFFloat key_changed = (vrml.eai.field.EventOutMFFloat)coordinateInterpolator.getEventOut("key_changed");
float[] f = key_changed.getValue();
for (int i = 0; i < f.length; ++i)
System.out.println(f[i]);
public abstract void getValue(float[] value)
throws java.lang.ArrayIndexOutOfBoundsException
The following example gets the keys from the "key" field of a CoordinateInterpolator node and prints them to the console:
vrml.eai.Node coordinateInterpolator = ...;
vrml.eai.field.EventOutMFFloat key_changed = (vrml.eai.field.EventOutMFFloat)coordinateInterpolator.getEventOut("key_changed");
int size = key_changed.size();
float[] f = new float[size];
key_changed.getValue(f);
for (int i = 0; i < size; ++i)
System.out.println(f[i]);
value - An array of float values that gets filled with the
current value of the MFFloat event-out slot.
java.lang.ArrayIndexOutOfBoundsException - when the value array is too
small.
public abstract float get1Value(int index)
throws java.lang.ArrayIndexOutOfBoundsException
The following example gets the first key from the "key" field of a CoordinateInterpolator node and prints it to the console:
vrml.eai.Node coordinateInterpolator = ...;
vrml.eai.field.EventOutMFFloat key_changed = (vrml.eai.field.EventOutMFFloat)coordinateInterpolator.getEventOut("key_changed");
System.out.println(key_changed.get1Value(0));
index - The index of the element, starting at 0.
java.lang.ArrayIndexOutOfBoundsException - when the index is invalid.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||