![]() |
Murl Engine API
Version 2018.3
|
#include <murl_logic_i_stage.h>
The IStage interface.
The IStage is an extended IProcessor containing a run state and an optional IStageTimeline object. An IStage object is controlled by the IStageProcessor.
Additional IProcessor objects can be added to the IStageProcessor object by using myStageProc->GetProcessor(myStageProc)->AddChild(). See also enum StageProcessing.
Inherited by Murl::Logic::Stage.
Public Types | |
enum | StageProcessing { BEFORE_STEP, BEFORE_CHILDREN, AFTER_CHILDREN } |
Definiton of the stage processsing sequence. More... | |
enum | RunState { RUN_STATE_STOP, RUN_STATE_BEGIN_INTRO, RUN_STATE_RUN_INTRO, RUN_STATE_BEGIN_RUN, RUN_STATE_RUN, RUN_STATE_BEGIN_OUTRO, RUN_STATE_RUN_OUTRO } |
Definition of RunStates controlled by the IStageProcessor. More... | |
Public Member Functions | |
virtual IProcessorPtr | GetProcessor ()=0 |
Get the processor interface from a stage object. More... | |
virtual void | SetStageProcessing (StageProcessing processing)=0 |
Set the stage processing sequence. More... | |
virtual StageProcessing | GetStageProcessing () const =0 |
Get the stage processing sequence. More... | |
virtual Bool | SetAppStage (IAppStagePtr appStage)=0 |
Set the stage callback object. More... | |
virtual void | SetStageId (const String &stageId)=0 |
Set the stage identifier. More... | |
virtual const String & | GetStageId () const =0 |
Get the stage identifier. More... | |
virtual void | SetSwitchId (const String &switchId)=0 |
Set the graph switch child identifier. More... | |
virtual const String & | GetSwitchId () const =0 |
Get the graph switch child identifier. More... | |
virtual void | SetRunState (RunState runState)=0 |
Set the current run state. More... | |
virtual Bool | IsRunState (RunState runState) const =0 |
Check the current run state. More... | |
virtual RunState | GetRunState () const =0 |
Get the current run state. More... | |
virtual Bool | StartStageIntro ()=0 |
Start a stage intro. More... | |
virtual Bool | StartStageOutro ()=0 |
Start a stage intro. More... | |
virtual Bool | StopStage ()=0 |
Stop the stage. More... | |
virtual Bool | IsStageStopped () const =0 |
Check if stage is stopped. More... | |
virtual Bool | CreateStageTimeline (const IState *state, const String &timeline, Real introTime, Real outroTime)=0 |
Create and initialize the IStageTimeline object. More... | |
virtual Bool | SetStageTimeline (IStageTimelinePtr stageTimeline)=0 |
Set the IStageTimeline object. More... | |
virtual IStageTimelinePtr | GetStageTimeline () const =0 |
Get the IStageTimeline object. More... | |
virtual Bool | InitStage (const IState *state, IStageProcessor *stageProcessor)=0 |
Initialize the stage. More... | |
virtual Bool | DeInitStage (const IState *state, IStageProcessor *stageProcessor)=0 |
Deinitialize the stage. More... | |
virtual void | ProcessStageTick (const IState *state, IStageProcessor *stageProcessor)=0 |
Execute a logic tick. More... | |
virtual void | ProcessStageFrame (const IState *state, IStageProcessor *stageProcessor)=0 |
Execute a frame tick. More... | |
virtual void | FinishStageTick (const IState *state, IStageProcessor *stageProcessor)=0 |
Finish a logic tick. More... | |
virtual void | FinishStageFrame (const IState *state, IStageProcessor *stageProcessor)=0 |
Finish a frame tick. More... | |
virtual void | ProcessStageTickSelf (const IState *state, IStageProcessor *stageProcessor)=0 |
Execute a IAppStage logic tick. More... | |
virtual void | ProcessStageFrameSelf (const IState *state, IStageProcessor *stageProcessor)=0 |
Execute a IAppStage frame tick. More... | |
virtual void | FinishStageTickSelf (const IState *state, IStageProcessor *stageProcessor)=0 |
Finish a IAppStage logic tick. More... | |
virtual void | FinishStageFrameSelf (const IState *state, IStageProcessor *stageProcessor)=0 |
Finish a IAppStage frame tick. More... | |
Definiton of the stage processsing sequence.
The sequence of calling the IAppStage callbacks and the IAppProcessor callbacks can be controlled.
Enumerator | |
---|---|
BEFORE_STEP | Default, process stage before processor.
|
BEFORE_CHILDREN | Process stage in between processor.
|
AFTER_CHILDREN | Process stage after processor.
|
Definition of RunStates controlled by the IStageProcessor.
Enumerator | |
---|---|
RUN_STATE_STOP | The idle state.
|
RUN_STATE_BEGIN_INTRO | The begin intro state.
|
RUN_STATE_RUN_INTRO | The run intro state.
|
RUN_STATE_BEGIN_RUN | The begin run state.
|
RUN_STATE_RUN | The run state. |
RUN_STATE_BEGIN_OUTRO | The begin outro state.
|
RUN_STATE_RUN_OUTRO | The run outro state.
|
|
pure virtual |
Get the processor interface from a stage object.
The IStage conforms to the IProcessor interface.
|
pure virtual |
Set the stage processing sequence.
processing | The stage processing sequence. |
|
pure virtual |
Get the stage processing sequence.
|
pure virtual |
Set the stage callback object.
appStage | The stage callback object. |
|
pure virtual |
Set the stage identifier.
The stage identifier is used by the IStageProcessor to select stages by string identifier.
stageId | The stage identifier. |
|
pure virtual |
Get the stage identifier.
|
pure virtual |
Set the graph switch child identifier.
See IStageProcessor description.
switchId | The graph switch child identifier. |
|
pure virtual |
Get the graph switch child identifier.
|
pure virtual |
Set the current run state.
runState | The run state to set. |
Check the current run state.
runState | The run state to compare. |
|
pure virtual |
Get the current run state.
|
pure virtual |
Start a stage intro.
If the current run state is RUN_STATE_STOP, set the RUN_STATE_BEGIN_INTRO.
|
pure virtual |
Start a stage intro.
If the current run state is not RUN_STATE_STOP, set the RUN_STATE_BEGIN_OUTRO.
|
pure virtual |
Stop the stage.
If the current run state is not RUN_STATE_STOP, set the RUN_STATE_STOP.
(!) IAppStage::OnStop() is not executed.
|
pure virtual |
Check if stage is stopped.
|
pure virtual |
Create and initialize the IStageTimeline object.
The IStageTimeline object created is deinitialized and destroyed automatically by DeInitStage().
The intro start time is set to zero, the outro start time is set to the intro end time by default. The intro / outro time can be modified at any time by accessing the IStageTimeline object using GetStageTimeline().
state | The IState object. |
timeline | The full path to the graph <Timeline> instance. |
introTime | The intro end time in seconds, |
outroTime | The outro end time in seconds, |
|
pure virtual |
Set the IStageTimeline object.
The IStageTimeline object is not affected by DeInitStage().
stageTimeline | An initialized IStageTimeline object. |
|
pure virtual |
Get the IStageTimeline object.
|
pure virtual |
Initialize the stage.
This method is typically used by the corresponding IStageProcessor. Execute IAppProcessor::OnInit(), IAppStage::OnInitStage() and initialization of all processor's children.
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
|
pure virtual |
Deinitialize the stage.
This method is typically used by the corresponding IStageProcessor. Execute deinitialization of all processor's children, AppStage::OnDeInitStage() and IAppProcessor::OnDeInit().
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
|
pure virtual |
Execute a logic tick.
This method is typically used by the corresponding IStageProcessor.
Evaluate the StageProcessing state to execute the IProcessor logic tick and the ProcessStageTickSelf() method.
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
|
pure virtual |
Execute a frame tick.
This method is typically used by the corresponding IStageProcessor.
Evaluate the StageProcessing state to execute the IProcessor frame tick and the ProcessStageFrameSelf() method.
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
|
pure virtual |
Finish a logic tick.
This method is typically used by the corresponding IStageProcessor.
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
|
pure virtual |
Finish a frame tick.
This method is typically used by the corresponding IStageProcessor.
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
|
pure virtual |
Execute a IAppStage logic tick.
This method is typically used by IStage::ProcessStageTick() method.
Execute the IAppStage::OnProcessStageTick() method first and afterwards the IAppStage::OnProcessTick[RUN_STATE_STATE] method depending on the current RunState.
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
|
pure virtual |
Execute a IAppStage frame tick.
This method is typically used by IStage::ProcessStageFrame() method.
Execute the IAppStage::OnProcessStageFrame() method.
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
|
pure virtual |
Finish a IAppStage logic tick.
This method is typically used by IStage::ProcessStageTick() method.
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
|
pure virtual |
Finish a IAppStage frame tick.
This method is typically used by IStage::ProcessStageFrame() method.
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |