shout3d.core
Class TimeSensor
java.lang.Object
|
+--shout3d.core.Node
|
+--shout3d.core.TimeSensor
- public class TimeSensor
- extends Node
A TimeSensor
Method Summary |
boolean |
isPaused()
Gets whether this timeSensor is paused or not |
void |
setPaused(boolean nowPaused)
Pauses or unpauses this TimeSensor. |
void |
setViewer(Shout3DViewer viewer)
Overrides base class to additionally store the clock. |
void |
start()
Starts this timeSensor by setting startTime to the current time. |
void |
stop()
Stops this timeSensor by setting stopTime to the current time. |
void |
update()
Updates the outputs of the TimeSensor based on the values of its fields. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
cycleInterval
public final DoubleField cycleInterval
cycleTime
public final DoubleField cycleTime
elapsedSeconds
public final DoubleField elapsedSeconds
enabled
public final BooleanField enabled
fraction
public final FloatField fraction
isActive
public final BooleanField isActive
loop
public final BooleanField loop
numLoops
public final IntField numLoops
startTime
public final DoubleField startTime
stopTime
public final DoubleField stopTime
time
public final DoubleField time
TimeSensor
public TimeSensor()
- Constructs a default TimeSensor
TimeSensor
public TimeSensor(Shout3DViewer viewer)
- Constructs a default TimeSensor
setViewer
public void setViewer(Shout3DViewer viewer)
- Overrides base class to additionally store the clock.
- Overrides:
- setViewer in class Node
start
public void start()
- Starts this timeSensor by setting startTime to the current time.
stop
public void stop()
- Stops this timeSensor by setting stopTime to the current time.
setPaused
public void setPaused(boolean nowPaused)
- Pauses or unpauses this TimeSensor. Calling
setPaused(false)
on a TimeSensor which is not paused has no effect.
- Parameters:
nowPaused
- is this timeSensor paused now
isPaused
public boolean isPaused()
- Gets whether this timeSensor is paused or not
- Returns:
- is paused or not
update
public void update()
- Updates the outputs of the TimeSensor based on the values of its fields.
Called automatically by the Shout3DPanel once per render, but
may also be called separately to propagate times that come
between renders. The output will always be based on the time
in the viewer's clock.