Class RealTimeSensorManager

java.lang.Object
org.xj3d.impl.core.eventmodel.RealTimeSensorManager
All Implemented Interfaces:
VRMLClock, TimeSensorManager

public class RealTimeSensorManager extends Object implements TimeSensorManager
Generalised manager for time sensor nodes that also represents the VRMLClock.

Another problem is dealing with Java time. On Win32 boxes the accuracy is pretty fucked - 10ms at best on an NT/2K box. The result is that we get this behaviour called every frame and we have no way of dealing with the fact that time has not advanced at all according to the system clock. One way of doing this is looking for the last time, checking the difference and then incrementing by a very small amount (say 1ms). This should give accuracy up to about 100Hz frame rate. How we go when it runs faster than that, I have no idea. Jump up and down and bitch to Sun about it.

During each time click we first call the listeners for time information with the current time.

Time management exists on two levels. The timesensor can be enabled and disabled like any other behavior. This allows the user to pause the play back or just halt in mid-stream. The other part allows the user to reset the time clock so that we can start at time zero again. This allows the replaying of a world from the time zero independently of the enable - for example, loading a new world into a browser and keeping the same clock instance.

Version:
$Revision: 1.2 $
Author:
Justin Couch