Xj3D 2.0 VRML/X3D Code API

vrml.eai.field
Class EventInMFTime

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

public abstract class EventInMFTime
extends EventIn

VRML eventIn class for MFTime.

Time values are represented as per the VRML IS specification Section 4.11 Time. That is, time is set as VRML "Time" - the number of seconds since Jan 1, 1970 GMT, rather than a Java time which is a long, the number of milliseconds since Jan 1, 1970 GMT. To convert between the two simply divide java time by 1000 and cast to a double.

Note that in setting time values from an external application, the idea of the time that java represents and the time that the VRML world currently has set may well be different. It is best to source the current "time" from a node or eventOut in the VRML world rather than relying exclusively on the value returned from System.currentTimeMillies. This is especially important to note if you are dealing with high speed, narrow interval work such as controlling animation.

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 EventInMFTime()
          Construct an instance of this class.
 
Method Summary
abstract  void set1Value(int index, double value)
          Set a particular time value in the given eventIn array.
abstract  void setValue(double[] value)
          Set the value of the array of times.
 
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

EventInMFTime

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

Method Detail

setValue

public abstract void setValue(double[] value)
Set the value of the array of times. Time values are not required to conform to any range checks.

Parameters:
value - The array of time values

set1Value

public abstract void set1Value(int index,
                               double value)
Set a particular time value in the given eventIn array. To the VRML world this will generate a full MFTime event with the nominated index value changed.

If the index is out of the bounds of the current array of data values an ArrayIndexOutOfBoundsException will be generated.

Parameters:
index - The position to set the time value
value - The time value to set.
Throws:
java.lang.ArrayIndexOutOfBoundsException - The index was outside of the bounds of the current array.

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium