public final class RealTimeSimulationAnimation extends ForwardAndBackwardAnimation
TimeMultiplier
(get
/ set
) can be adjusted to make the simulation time progress
faster or slower than real time.ForwardAnimation.AnimationState
m_endCycle, m_endTime, m_startCycle, m_startTime
m_time
Constructor and Description |
---|
RealTimeSimulationAnimation()
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected JulianDate |
getNextTime()
Gets the next animation time.
|
double |
getTimeMultiplier()
Gets the multiplier describing the rate of simulation time relative to real time.
|
Duration |
getTimeStep()
Gets the quantity of real time, in seconds, that is stepped when
ForwardAnimation.stepForward() or
ForwardAndBackwardAnimation.stepBackward() is called. |
protected void |
onLooping(JulianDate newTime) |
protected void |
onStarted(boolean forward) |
protected void |
onTimeUpdate()
|
void |
setTimeMultiplier(double value)
Sets the multiplier describing the rate of simulation time relative to real time.
|
void |
setTimeStep(Duration value)
Sets the quantity of real time, in seconds, that is stepped when
ForwardAnimation.stepForward() or
ForwardAndBackwardAnimation.stepBackward() is called. |
protected void |
stepBackwardTime() |
protected void |
stepForwardTime() |
getEndCycle, getEndTime, getStartCycle, getStartTime, nextFrame, playBackward, resetTime, setEndCycle, setEndTime, setStartCycle, setStartTime, stepBackward, validateAnimation
addHasReset, addPaused, addStarted, addStopped, animate, dispose, getAnimatingForward, getIsAnimating, getIsPaused, getIsReset, getIsStopped, getMessageLoopType, getRefreshRate, getState, getTargetedFramesPerSecond, getTime, onHasReset, onPaused, pause, playForward, removeHasReset, removePaused, removeStarted, removeStopped, reset, setAnimatingForward, setMessageLoopType, setRefreshRate, setState, setTargetedFramesPerSecond, setTime, startAnimationPump, stepForward, stopAnimationPump
animate, dispose, getResourceTimerEnabled, resourceTimerCallback, setResourceTimerEnabled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public RealTimeSimulationAnimation()
public final double getTimeMultiplier()
public final void setTimeMultiplier(double value)
@Nonnull public final Duration getTimeStep()
ForwardAnimation.stepForward()
or
ForwardAndBackwardAnimation.stepBackward()
is called. The simulation time
will be stepped by this value times the TimeMultiplier
(get
/ set
). For example, if
this value is 60.0, and TimeMultiplier
(get
/ set
) is 3.0, Time
(get
/ set
) will be
stepped by 60.0 * 3.0 = 180.0 seconds when ForwardAnimation.stepForward()
is called.public final void setTimeStep(Duration value)
ForwardAnimation.stepForward()
or
ForwardAndBackwardAnimation.stepBackward()
is called. The simulation time
will be stepped by this value times the TimeMultiplier
(get
/ set
). For example, if
this value is 60.0, and TimeMultiplier
(get
/ set
) is 3.0, Time
(get
/ set
) will be
stepped by 60.0 * 3.0 = 180.0 seconds when ForwardAnimation.stepForward()
is called.protected JulianDate getNextTime()
ForwardAnimation
getNextTime
in class ForwardAnimation
protected void stepForwardTime()
stepForwardTime
in class ForwardAndBackwardAnimation
protected void stepBackwardTime()
stepBackwardTime
in class ForwardAndBackwardAnimation
protected void onTimeUpdate()
ForwardAnimation
onTimeUpdate
in class ForwardAnimation
protected void onStarted(boolean forward)
onStarted
in class ForwardAnimation
protected void onLooping(JulianDate newTime)
onLooping
in class ForwardAndBackwardAnimation