Apparatus Version 1.23
ECS data-oriented workflow for Unreal Engine.
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
AMechanicalPlayerController Class Reference

The mechanical player controller entity. More...

#include <MechanicalPlayerController.h>

Inheritance diagram for AMechanicalPlayerController:
Inheritance graph
[legend]
Collaboration diagram for AMechanicalPlayerController:
Collaboration graph
[legend]

Public Member Functions

 AMechanicalPlayerController ()
 Construct a new mechanism.
 
virtual float GetSteadyDeltaTime () const override
 Get the time interval for steady ticking.
 
virtual float GetOwnTime () const override
 Get own Mechanical's local life time.
 
virtual void Tick (float DeltaTime) override
 
float GetProcessedSteadyTime () const
 Get the time of the last processed steady frame.
 
float CalcSteadyFrameRatio () const
 The current ratio within the steady frame.
 
int64 GetSteadyFrame () const
 The current steady frame.
 
float GetSteadyTime () const
 The total steady time elapsed.
 
float CalcSteadyFutureFactor () const
 The current steady future factor.
 
- Public Member Functions inherited from IMechanical
AMechanismGetMechanism () const
 Get the mechanism this mechanical is part of.
 
FSubjectHandle SpawnSubject (const EFlagmark Flagmark=FM_None)
 Spawn a new subject, returning its handle.
 
template<typename ChainT = TChain<TChunkIt<FSubjectHandle>, TBeltIt<FSubjectHandle>>>
TSharedRef< ChainT > Enchain (const FFilter &InFilter) const
 Enchain iterables using the supplied filter.
 
TSharedRef< TChain< TChunkIt< FSolidSubjectHandle >, TBeltIt< FSolidSubjectHandle > > > EnchainSolid (const FFilter &InFilter) const
 Solid-enchain iterables using the supplied filter.
 
void ReceiveBoot ()
 Process newly created subjects.
 
void ReceiveInputTick ()
 Process a pre-steady input tick.
 
void ReceiveSteadyTick (float DeltaSeconds)
 Process a fixed-rate steady tick.
 
void ReceivePresentationTick (float DeltaSeconds, float FrameRatio, float FutureFactor)
 Process a past-steady presentation tick.
 
virtual void Boot ()
 Process newly created subjects.
 
virtual void InputTick ()
 Process a pre-steady input tick.
 
virtual void SteadyTick (float DeltaTime)
 Process a fixed-rate steady tick.
 
virtual void PresentationTick (float DeltaSeconds, float FrameRatio, float FutureFactor)
 Process a past-steady presentation tick.
 
 IMechanical ()
 
virtual float GetSteadyDeltaTime () const
 Get the time interval for steady ticking.
 
virtual float GetOwnTime () const
 Get own Mechanical's local life time.
 
float GetProcessedSteadyTime () const
 Get the time of the last processed steady frame.
 
float CalcSteadyFrameRatio () const
 The current ratio within the steady frame.
 
void GetSteadyFrame (int64 &OutFrame) const
 Get the current steady frame.
 
float GetSteadyTime () const
 Get the total steady time elapsed.
 
float CalcSteadyFutureFactor () const
 The current steady future factor.
 
template<typename ChainT = void, typename FilterT = void, typename MechanicT = void>
std::enable_if<!std::is_function< MechanicT >::value &&std::is_base_of< FFilterIndicator, FilterT >::value, EApparatusStatus >::type Operate (FilterT &&Filter, const MechanicT &Mechanic)
 Process the mechanism using a functor mechanic.
 
template<typename ChainT = void, typename FilterT = void, typename MechanicT = void>
std::enable_if<!std::is_function< MechanicT >::value &&std::is_base_of< FFilterIndicator, FilterT >::value, EApparatusStatus >::type Operate (FilterT &&Filter, MechanicT &Mechanic)
 Process the mechanism using a functor mechanic.
 
template<typename ChainT = void, typename FilterT = void, typename FunctionT = void>
std::enable_if< std::is_function< FunctionT >::value &&std::is_base_of< FFilterIndicator, FilterT >::value, EApparatusStatus >::type Operate (FilterT &&Filter, FunctionT *const Mechanic)
 Process the chain using a free function mechanic.
 
template<typename ChainT = void, typename MechanicT = void>
std::enable_if<!std::is_function< MechanicT >::value, EApparatusStatus >::type Operate (const MechanicT &Mechanic)
 Process the mechanism using a functor mechanic.
 
template<typename ChainT = void, typename MechanicT = void>
std::enable_if<!std::is_function< MechanicT >::value, EApparatusStatus >::type Operate (MechanicT &Mechanic)
 Process the mechanism using a functor mechanic.
 
template<typename ChainT = void, typename FunctionT = void>
std::enable_if< std::is_function< FunctionT >::value, EApparatusStatus >::type Operate (FunctionT *const Mechanic)
 Process the chain using a free function mechanic.
 
template<typename ChainT = void, EParadigm Paradigm = EParadigm::None, typename FilterT = void, typename MechanicT = void>
std::enable_if<!std::is_function< MechanicT >::value &&std::is_base_of< FFilterIndicator, FilterT >::value, EApparatusStatus >::type OperateConcurrently (FilterT &&Filter, const MechanicT &Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1, const bool bSync=true)
 Process the mechanism using a functor mechanic in a threaded manner.
 
template<typename ChainT = void, EParadigm Paradigm = EParadigm::None, typename FilterT = void, typename MechanicT = void>
std::enable_if<!std::is_function< MechanicT >::value &&std::is_base_of< FFilterIndicator, FilterT >::value, EApparatusStatus >::type OperateConcurrently (FilterT &&Filter, MechanicT &Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1, const bool bSync=true)
 Process the mechanism using a functor mechanic in a threaded manner.
 
template<typename ChainT = void, EParadigm Paradigm = EParadigm::None, typename FilterT = void, typename FunctionT = void>
std::enable_if< std::is_function< FunctionT >::value &&std::is_base_of< FFilterIndicator, FilterT >::value, EApparatusStatus >::type OperateConcurrently (FilterT &&Filter, FunctionT *const Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1, const bool bSync=true)
 Process the chain using a free function mechanic in a parallel manner.
 
template<typename ChainT = void, EParadigm Paradigm = EParadigm::None, typename MechanicT = void>
std::enable_if<!std::is_function< MechanicT >::value, EApparatusStatus >::type OperateConcurrently (const MechanicT &Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1, const bool bSync=true)
 Process the mechanism using a functor mechanic in a threaded manner.
 
template<typename ChainT = void, EParadigm Paradigm = EParadigm::None, typename MechanicT = void>
std::enable_if<!std::is_function< MechanicT >::value, EApparatusStatus >::type OperateConcurrently (MechanicT &Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1, const bool bSync=true)
 Process the mechanism using a functor mechanic in a threaded manner.
 
template<typename ChainT = void, EParadigm Paradigm = EParadigm::None, typename FunctionT = void>
std::enable_if< std::is_function< FunctionT >::value, EApparatusStatus >::type OperateConcurrently (FunctionT *const Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1, const bool bSync=true)
 Process the chain using a free function mechanic in a parallel manner.
 

Protected Member Functions

virtual void BeginPlay () override
 Begin executing the mechanism.
 
virtual void EndPlay (const EEndPlayReason::Type EndPlayReason) override
 End executing the mechanism.
 
- Protected Member Functions inherited from IMechanical
virtual void DoTick (float NewTime, float DeltaTime, float SteadyDeltaTime)
 Perform a standard ticking routine.
 
void DoRegister ()
 
void DoUnregister ()
 
void DoPostLogin (APlayerController *NewPlayer)
 
float DoGetProcessedSteadyTime (float SteadyDeltaTime) const
 
float DoCalcSteadyFrameRatio (const float Time, const float SteadyDeltaTime) const
 
float DoCalcSteadyFutureFactor (const float Time, const float SteadyDeltaTime) const
 
float GetProcessedSteadyTime_Implementation () const
 
float CalcSteadyFrameRatio_Implementation () const
 
void GetSteadyFrame_Implementation (int64 &OutFrame) const
 
float CalcSteadyFutureFactor_Implementation () const
 
float GetSteadyTime_Implementation () const
 

Additional Inherited Members

- Protected Attributes inherited from IMechanical
int64 SteadyFrame = 0
 The steady frame we are currently part of.
 
int64 ProcessedSteadyFrame = -1
 The last, actually processed steady frame.
 
float PrevTime = NAN
 The game time of the previous tick.
 
uint32 bInsideTick: 1
 Is this mechanism currently updating?
 
uint32 bInsideSteadyTick: 1
 Is this mechanism currently in the process of steady ticking?
 
uint32 bInsidePresentationTick: 1
 Is this mechanism currently in the process of presentation ticking?
 

Detailed Description

The mechanical player controller entity.

Constructor & Destructor Documentation

◆ AMechanicalPlayerController()

AMechanicalPlayerController::AMechanicalPlayerController ( )
inline

Construct a new mechanism.

Member Function Documentation

◆ BeginPlay()

virtual void AMechanicalPlayerController::BeginPlay ( )
inlineoverrideprotectedvirtual

Begin executing the mechanism.

◆ CalcSteadyFrameRatio()

float AMechanicalPlayerController::CalcSteadyFrameRatio ( ) const
inline

The current ratio within the steady frame.

This is in relation between the previous steady frame and the current next one. Should be used for interframe interpolation.

◆ CalcSteadyFutureFactor()

float AMechanicalPlayerController::CalcSteadyFutureFactor ( ) const
inline

The current steady future factor.

This is in relation between the previous change time delta to the next steady frame change delta time.

◆ EndPlay()

virtual void AMechanicalPlayerController::EndPlay ( const EEndPlayReason::Type  EndPlayReason)
inlineoverrideprotectedvirtual

End executing the mechanism.

◆ GetOwnTime()

virtual float AMechanicalPlayerController::GetOwnTime ( ) const
inlineoverridevirtual

Get own Mechanical's local life time.

Should be overriden in the descendants.

Reimplemented from IMechanical.

◆ GetProcessedSteadyTime()

float AMechanicalPlayerController::GetProcessedSteadyTime ( ) const
inline

Get the time of the last processed steady frame.

◆ GetSteadyDeltaTime()

virtual float AMechanicalPlayerController::GetSteadyDeltaTime ( ) const
inlineoverridevirtual

Get the time interval for steady ticking.

Should be overriden in the descendants to provide a propertie's value.

Reimplemented from IMechanical.

◆ GetSteadyFrame()

int64 AMechanicalPlayerController::GetSteadyFrame ( ) const
inline

The current steady frame.

◆ GetSteadyTime()

float AMechanicalPlayerController::GetSteadyTime ( ) const
inline

The total steady time elapsed.

◆ Tick()

virtual void AMechanicalPlayerController::Tick ( float  DeltaTime)
inlineoverridevirtual

The documentation for this class was generated from the following file: