RapyutaSimulationPlugins
Public Member Functions | Public Attributes | List of all members
URRLimitRTFFixedSizeCustomTimeStep Class Reference

Control the Engine TimeStep via a fixed time step and limit RTF(Real Time Factor). More...

#include <RRLimitRTFFixedSizeCustomTimeStep.h>

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

Public Member Functions

virtual bool Initialize (UEngine *InEngine) override
 Overriden function from UEngineCustomTimeStep. More...
 
virtual void Shutdown (UEngine *InEngine) override
 Overriden function from UEngineCustomTimeStep. More...
 
virtual bool UpdateTimeStep (UEngine *InEngine) override
 Overriden function from UEngineCustomTimeStep. More...
 
virtual ECustomTimeStepSynchronizationState GetSynchronizationState () const override
 Overriden function from UEngineCustomTimeStep. More...
 
virtual float GetStepSize () const
 Get the Step Size object. More...
 
virtual void SetStepSize (const float InStepSize)
 Set the Step Size object. More...
 
virtual float GetTargetRTF () const
 Get the Target R T F object. More...
 
virtual void SetTargetRTF (const float InTargetRTF)
 Set the Target R T F object. More...
 
virtual bool WaitForSync ()
 Main logic to update simulation time. More...
 

Public Attributes

float StepSize = 0.01f
 
float TargetRTF = 1.f
 
double LastPlatformTime = 0
 

Detailed Description

Control the Engine TimeStep via a fixed time step and limit RTF(Real Time Factor).

Main logic is copied from UGenlockedFixedRateCustomTimeStep and UEngineCustomTimeStep.

See also
UEngineCustomTimeStep
UGenlockedFixedRateCustomTimeStep

UCLASS(Blueprintable, editinlinenew, meta = (DisplayName = "Limit RTF Fixed Rate"))

Member Function Documentation

◆ GetStepSize()

virtual float URRLimitRTFFixedSizeCustomTimeStep::GetStepSize ( ) const
virtual

Get the Step Size object.

Returns
float

◆ GetSynchronizationState()

virtual ECustomTimeStepSynchronizationState URRLimitRTFFixedSizeCustomTimeStep::GetSynchronizationState ( ) const
overridevirtual

Overriden function from UEngineCustomTimeStep.

See also
UEngineCustomTimeStep
Returns
ECustomTimeStepSynchronizationState

◆ GetTargetRTF()

virtual float URRLimitRTFFixedSizeCustomTimeStep::GetTargetRTF ( ) const
virtual

Get the Target R T F object.

Returns
float

◆ Initialize()

virtual bool URRLimitRTFFixedSizeCustomTimeStep::Initialize ( UEngine *  InEngine)
overridevirtual

Overriden function from UEngineCustomTimeStep.

See also
UEngineCustomTimeStep
Parameters
InEngine
Returns
true
false

◆ SetStepSize()

virtual void URRLimitRTFFixedSizeCustomTimeStep::SetStepSize ( const float  InStepSize)
virtual

Set the Step Size object.

Parameters
InStepSize

◆ SetTargetRTF()

virtual void URRLimitRTFFixedSizeCustomTimeStep::SetTargetRTF ( const float  InTargetRTF)
virtual

Set the Target R T F object.

Parameters
InTargetRTF

◆ Shutdown()

virtual void URRLimitRTFFixedSizeCustomTimeStep::Shutdown ( UEngine *  InEngine)
overridevirtual

Overriden function from UEngineCustomTimeStep.

See also
UEngineCustomTimeStep
Parameters
InEngine

◆ UpdateTimeStep()

virtual bool URRLimitRTFFixedSizeCustomTimeStep::UpdateTimeStep ( UEngine *  InEngine)
overridevirtual

Overriden function from UEngineCustomTimeStep.

See also
UEngineCustomTimeStep
Parameters
InEngine
Returns
true
false

◆ WaitForSync()

virtual bool URRLimitRTFFixedSizeCustomTimeStep::WaitForSync ( )
virtual

Main logic to update simulation time.

Simulation time += StepSize and wait not to over TargetRTF.

Returns
true
false

Member Data Documentation

◆ LastPlatformTime

double URRLimitRTFFixedSizeCustomTimeStep::LastPlatformTime = 0

◆ StepSize

float URRLimitRTFFixedSizeCustomTimeStep::StepSize = 0.01f

◆ TargetRTF

float URRLimitRTFFixedSizeCustomTimeStep::TargetRTF = 1.f

Desired RTF(Real Time Factor).

No guarantee to meet this RTF but do not over this value

UPROPERTY(EditAnywhere, Category = "Timing")


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