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
UMechanicalActorComponent Class Reference

The mechanical actor component entity. More...

#include <MechanicalActorComponent.h>

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

Public Member Functions

 UMechanicalActorComponent ()
 Construct a new mechanism.
 
 ~UMechanicalActorComponent ()
 Destroy the 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 TickComponent (float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) 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 actor component entity.

Constructor & Destructor Documentation

◆ UMechanicalActorComponent()

UMechanicalActorComponent::UMechanicalActorComponent ( )
inline

Construct a new mechanism.

◆ ~UMechanicalActorComponent()

UMechanicalActorComponent::~UMechanicalActorComponent ( )
inline

Destroy the mechanism.

Member Function Documentation

◆ BeginPlay()

void UMechanicalActorComponent::BeginPlay ( )
inlineoverrideprotectedvirtual

Begin executing the mechanism.

◆ CalcSteadyFrameRatio()

float UMechanicalActorComponent::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 UMechanicalActorComponent::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()

void UMechanicalActorComponent::EndPlay ( const EEndPlayReason::Type  EndPlayReason)
inlineoverrideprotectedvirtual

End executing the mechanism.

◆ GetOwnTime()

virtual float UMechanicalActorComponent::GetOwnTime ( ) const
inlineoverridevirtual

Get own Mechanical's local life time.

Should be overriden in the descendants.

Reimplemented from IMechanical.

◆ GetProcessedSteadyTime()

float UMechanicalActorComponent::GetProcessedSteadyTime ( ) const
inline

Get the time of the last processed steady frame.

◆ GetSteadyDeltaTime()

virtual float UMechanicalActorComponent::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 UMechanicalActorComponent::GetSteadyFrame ( ) const
inline

The current steady frame.

◆ GetSteadyTime()

float UMechanicalActorComponent::GetSteadyTime ( ) const
inline

The total steady time elapsed.

◆ TickComponent()

void UMechanicalActorComponent::TickComponent ( float  DeltaTime,
enum ELevelTick  TickType,
FActorComponentTickFunction *  ThisTickFunction 
)
inlineoverridevirtual

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