The IRunnable property interface. More...
#include "murl_graph_i_runnable.h"
Public Member Functions | |
virtual Bool | Reset ()=0 |
Reset the timeline. More... | |
virtual Bool | ResetTo (Real startTime)=0 |
Reset the timeline to a specified start time. More... | |
virtual Bool | Start ()=0 |
Start or continue the timeline. More... | |
virtual Bool | Start (Real startTime, Real endTime)=0 |
Start the timeline with specified parameters. More... | |
virtual Bool | Start (Real startTime, Real endTime, SInt32 numberOfLoops)=0 |
Start the timeline with specified parameters. More... | |
virtual Bool | Start (Real startTime, Real endTime, Real loopStartTime, Real loopEndTime, SInt32 numberOfLoops)=0 |
Start the timeline with specified parameters. More... | |
virtual Bool | Pause ()=0 |
Pause the timeline. More... | |
virtual Bool | Stop ()=0 |
Stop the timeline. More... | |
virtual Bool | Rewind ()=0 |
Rewind the timeline. More... | |
virtual Bool | SetAutoRewindEnabled (Bool enabled)=0 |
Enable/disable automatic rewind. More... | |
virtual Bool | IsAutoRewindEnabled () const =0 |
Check if automatic rewind is enabled. More... | |
virtual Bool | SetStartTime (Real startTime)=0 |
Set the start time. More... | |
virtual Real | GetStartTime () const =0 |
Get the start time. More... | |
virtual Bool | SetEndTime (Real endTime)=0 |
Set the end time. More... | |
virtual Real | GetEndTime () const =0 |
Get the end time. More... | |
virtual Bool | SetLoopStartTime (Real startTime)=0 |
Set the loop start time. More... | |
virtual Real | GetLoopStartTime () const =0 |
Get the loop start time. More... | |
virtual Bool | SetLoopEndTime (Real endTime)=0 |
Set the loop end time. More... | |
virtual Real | GetLoopEndTime () const =0 |
Get the loop end time. More... | |
virtual Bool | SetStartLoop (SInt32 startLoop)=0 |
Set the start loop. More... | |
virtual SInt32 | GetStartLoop () const =0 |
Get the start loop. More... | |
virtual Bool | SetNumberOfLoops (SInt32 numberOfLoops)=0 |
Set the number of loops. More... | |
virtual SInt32 | GetNumberOfLoops () const =0 |
Get the number of loops. More... | |
virtual Bool | SetTimeShift (Double timeShift)=0 |
Set the time shift value. More... | |
virtual Double | GetTimeShift () const =0 |
Get the time shift value. More... | |
virtual Bool | SetTimeOffset (Double timeOffset)=0 |
Set the time offset value. More... | |
virtual Double | GetTimeOffset () const =0 |
Get the time offset value. More... | |
virtual Bool | SetTimeScale (Real timeScale)=0 |
Set the time scale factor. More... | |
virtual Real | GetTimeScale () const =0 |
Get the time scale factor. More... | |
virtual Bool | IsRunning () const =0 |
Check if the timeline is running. More... | |
virtual Bool | IsPaused () const =0 |
Check if the timeline is paused. More... | |
virtual Bool | IsStopped () const =0 |
Check if the timeline is stopped. More... | |
virtual Bool | WasStarted () const =0 |
Check if the timeline was started from the beginning. More... | |
virtual Bool | WasRunning () const =0 |
Check if the timeline has stopped running. More... | |
virtual Bool | IsOrWasRunning () const =0 |
Check if the timeline is or was running. More... | |
virtual Bool | HasPassedTime (Real time) const =0 |
Check if the current time has passed a specified time within the most recent tick. More... | |
virtual Bool | HasPassedLoop (SInt32 loop=-1) const =0 |
Check if the current loop has passed a specified loop number within the most recent tick. More... | |
virtual Double | GetRecentTime () const =0 |
Get the recent time. More... | |
virtual Double | GetCurrentTime () const =0 |
Get the current time. More... | |
virtual Double | GetRemainingTime () const =0 |
Get the remaining time. More... | |
virtual void | SetCurrentTime (Double time)=0 |
Set the current time. More... | |
virtual SInt32 | GetRecentLoop () const =0 |
Get the recent loop. More... | |
virtual SInt32 | GetCurrentLoop () const =0 |
Get the current loop. More... | |
virtual SInt32 | GetRemainingLoops () const =0 |
Get the remaining loops. More... | |
virtual Bool | SetCurrentLoop (SInt32 loop)=0 |
Set the current loop. More... | |
virtual IEnums::AnimationState | GetRecentState () const =0 |
Get the recent animation state. More... | |
virtual IEnums::AnimationState | GetCurrentState () const =0 |
Get the current animation state. More... | |
Detailed Description
The IRunnable property interface.
This interface provides basic properties of a "runnable" object, e.g. a timeline (Start, pause, stop, rewind).
Member Function Documentation
◆ Reset()
|
pure virtual |
Reset the timeline.
Stop the timeline, reset the WasRunning() state and call Rewind().
- Returns
- true if successful.
Referenced by Murl::Logic::GraphSoundObject::StopPlaying().
◆ ResetTo()
Reset the timeline to a specified start time.
Set the start time and call Reset().
- Parameters
-
startTime The start time in seconds.
- Returns
- true if successful.
◆ Start() [1/4]
|
pure virtual |
Start or continue the timeline.
Does not modify the current time and loop.
- Returns
- true if successful.
Referenced by Murl::Logic::GraphSoundObject::ContinuePlaying(), and Murl::Logic::GraphSoundObject::StartPlaying().
◆ Start() [2/4]
◆ Start() [3/4]
◆ Start() [4/4]
|
pure virtual |
Start the timeline with specified parameters.
Set start/end time, loop start/end time, number of loops, calls Rewind() and Start().
- Parameters
-
startTime The start time in seconds. endTime The end time in seconds. loopStartTime The loop start time in seconds. loopEndTime The loop end time in seconds. numberOfLoops Number of loops.
- Returns
- true if successful.
◆ Pause()
|
pure virtual |
Pause the timeline.
- Returns
- true if timeline was paused, false if timeline is not running.
Referenced by Murl::Logic::GraphSoundObject::PausePlaying().
◆ Stop()
|
pure virtual |
Stop the timeline.
Rewind() is called if auto rewind is enabled.
- Returns
- true if timeline was stopped, false if timeline is already stopped.
Referenced by Murl::Logic::GraphSoundObject::StopPlaying().
◆ Rewind()
|
pure virtual |
Rewind the timeline.
Sets the current time to the start time and the current loop to the start loop. Does not affect the current running state.
- Returns
- true if successful.
◆ SetAutoRewindEnabled()
Enable/disable automatic rewind.
Automatic rewind is calling Rewind() when the timeline is stopped.
- Parameters
-
enabled Enable automatic rewind if true.
- Returns
- true if successful.
◆ IsAutoRewindEnabled()
|
pure virtual |
Check if automatic rewind is enabled.
- Returns
- true if automatic rewind.
◆ SetStartTime()
Set the start time.
- Parameters
-
startTime The start time in seconds.
- Returns
- true if successful.
◆ GetStartTime()
|
pure virtual |
Get the start time.
- Returns
- The start time in seconds.
◆ SetEndTime()
Set the end time.
- Parameters
-
endTime The end time in seconds.
- Returns
- true if successful.
◆ GetEndTime()
|
pure virtual |
Get the end time.
- Returns
- The end time in seconds.
◆ SetLoopStartTime()
Set the loop start time.
- Parameters
-
startTime The loop start time in seconds.
- Returns
- true if successful.
◆ GetLoopStartTime()
|
pure virtual |
Get the loop start time.
- Returns
- The loop start time in seconds.
◆ SetLoopEndTime()
Set the loop end time.
- Parameters
-
endTime The loop end time in seconds.
- Returns
- true if successful.
◆ GetLoopEndTime()
|
pure virtual |
Get the loop end time.
- Returns
- The loop end time in seconds.
◆ SetStartLoop()
Set the start loop.
Loop #0 is considered the intro, if it is desired to start right in the middle of the first actual loop, the start loop should be set to 1.
- Parameters
-
startLoop The start loop.
- Returns
- true if successful.
◆ GetStartLoop()
|
pure virtual |
Get the start loop.
- Returns
- The start loop.
◆ SetNumberOfLoops()
Set the number of loops.
- Parameters
-
numberOfLoops Number of loops.
- Returns
- true if successful.
◆ GetNumberOfLoops()
|
pure virtual |
Get the number of loops.
- Returns
- The number of loops.
◆ SetTimeShift()
Set the time shift value.
- Parameters
-
timeShift The time shift value.
- Returns
- true if successful.
◆ GetTimeShift()
|
pure virtual |
Get the time shift value.
- Returns
- The time shift value.
◆ SetTimeOffset()
Set the time offset value.
- Parameters
-
timeOffset The time offset value.
- Returns
- true if successful.
◆ GetTimeOffset()
|
pure virtual |
Get the time offset value.
- Returns
- The time offset value.
◆ SetTimeScale()
Set the time scale factor.
The recent tick duration is multiplied by the time scale factor and added to the current time each logic tick. The default time scale factor is 1.
- Parameters
-
timeScale The time scale factor.
- Returns
- true if successful.
◆ GetTimeScale()
|
pure virtual |
Get the time scale factor.
- Returns
- true The time scale factor.
◆ IsRunning()
|
pure virtual |
Check if the timeline is running.
A timeline can be started by calling Start() and stopped by calling Stop().
- Returns
- true if running.
Referenced by Murl::Logic::GraphSoundObject::IsPlaying().
◆ IsPaused()
|
pure virtual |
Check if the timeline is paused.
A timeline can be paused by calling Pause() and continued by calling Start().
- Returns
- true if paused.
Referenced by Murl::Logic::GraphSoundObject::ContinuePlaying().
◆ IsStopped()
|
pure virtual |
◆ WasStarted()
|
pure virtual |
Check if the timeline was started from the beginning.
- Returns
- true if started.
◆ WasRunning()
|
pure virtual |
Check if the timeline has stopped running.
If the timeline is stopped this state is true within the current logic tick only and will be cleared at the next logic traversal.
(!) This state remains unchanged if the timeline node or a sub-tree containing the node is set to inactive within the current logic tick or if SetStopOnDeactivateEnabled() is enabled. In such a case the Reset() method can be called to clear the state.
- Returns
- true if stopped.
◆ IsOrWasRunning()
|
pure virtual |
Check if the timeline is or was running.
Returns (IsRunning() || WasRunning()) state.
- Returns
- true if IsRunning() or WasRunning() is true.
◆ HasPassedTime()
Check if the current time has passed a specified time within the most recent tick.
Does not consider loops, for evaluating loops see HasPassedLoop().
- Parameters
-
time The time to check in seconds.
- Returns
- true if the current time has passed a specified time within the most recent tick.
◆ HasPassedLoop()
Check if the current loop has passed a specified loop number within the most recent tick.
If the loop number to check is negative, true is returned each time the current loop has changed.
- Parameters
-
loop The loop number to check.
- Returns
- true if the current loop has passed a specified loop within the most recent tick.
◆ GetRecentTime()
|
pure virtual |
Get the recent time.
- Returns
- The recent time in seconds.
◆ GetCurrentTime()
|
pure virtual |
Get the current time.
This method does not consider loops, for evaluating loops see GetCurrentLoop().
- Returns
- The current time in seconds.
◆ GetRemainingTime()
|
pure virtual |
Get the remaining time.
This method calculates GetEndTime() - GetCurrentTime() which does not consider loops, for evaluating loops see GetCurrentLoop().
- Returns
- The remaining time in seconds.
◆ SetCurrentTime()
|
pure virtual |
Set the current time.
This method does not consider loops, for setting loops see SetCurrentLoop().
- Parameters
-
time The current time to set in seconds.
◆ GetRecentLoop()
|
pure virtual |
Get the recent loop.
- Returns
- The recent loop, 0 if number of loops is 0.
◆ GetCurrentLoop()
|
pure virtual |
Get the current loop.
The current loop provides the following information for n loops:
- 0 Intro running from start to loop start time.
- 1 .. n Loop running from loop start to loop end time.
- n + 1 Outro running from loop end to end time.
- Returns
- The current loop, 0 if number of loops is 0.
◆ GetRemainingLoops()
|
pure virtual |
Get the remaining loops.
Calculates GetNumberOfLoops() - GetCurrentLoop().
- Returns
- The remaining loops, -1 if number of loops is < 0, 0 if number of loops is 0 or intro/outro is running.
◆ SetCurrentLoop()
Set the current loop.
The current loop represents the following information for n loops:
- 0 Intro running from start to loop start time.
- 1 .. n Loop running from loop start to loop end time.
- n + 1 Outro running from loop end to end time.
- Parameters
-
loop The current loop to set.
- Returns
- true if successful, false if the loop number is out of range.
◆ GetRecentState()
|
pure virtual |
Get the recent animation state.
- Returns
- The recent animation state.
◆ GetCurrentState()
|
pure virtual |
Get the current animation state.
- Returns
- The current animation state.
The documentation for this interface was generated from the following file:
- murl_graph_i_runnable.h