Interface SFTime
- All Superinterfaces:
X3DField
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
-
Method Summary
Methods inherited from interface org.web3d.x3d.sai.X3DField
addX3DEventListener, getDefinition, getUserData, isReadable, isWritable, removeX3DEventListener, setUserData
-
Method Details
-
getValue
double getValue()Get the time value in the given eventOut. Time can be any value either positive or negative but always absolute in value. As per the VRML time specification, all time values are absolute.- Returns:
- The current time of this eventOut.
-
setValue
void setValue(double value) Set the time value in the given eventIn. Time can be any value either positive or negative but always absolute in value. As per the VRML time specification, all time values are to be absolute.- Parameters:
value
- The time value to be set.
-