Open 3D Engine EMotionFX Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
EMotionFX::SingleThreadScheduler Class Reference

#include <SingleThreadScheduler.h>

Inherits EMotionFX::ActorUpdateScheduler.

Public Types

enum  { TYPE_ID = 0x00000001 }
 

Public Member Functions

const char * GetName () const override
 
uint32 GetType () const override
 
void Clear () override
 
void Execute (float timePassedInSeconds) override
 
void RecursiveInsertActorInstance (ActorInstance *actorInstance, size_t startStep=0) override
 
void RecursiveRemoveActorInstance (ActorInstance *actorInstance, size_t startStep=0) override
 
size_t RemoveActorInstance (ActorInstance *actorInstance, size_t startStep=0) override
 
- Public Member Functions inherited from EMotionFX::ActorUpdateScheduler
virtual const char * GetName () const =0
 
virtual uint32 GetType () const =0
 
virtual void Execute (float timePassedInSeconds)=0
 
virtual void Clear ()=0
 
virtual void Print ()
 
virtual void RecursiveInsertActorInstance (ActorInstance *actorInstance, size_t startStep=0)=0
 
virtual void RecursiveRemoveActorInstance (ActorInstance *actorInstance, size_t startStep=0)=0
 
virtual size_t RemoveActorInstance (ActorInstance *actorInstance, size_t startStep=0)=0
 
size_t GetNumUpdatedActorInstances () const
 
size_t GetNumVisibleActorInstances () const
 
size_t GetNumSampledActorInstances () const
 
- Public Member Functions inherited from EMotionFX::BaseObject
 BaseObject ()
 
virtual ~BaseObject ()
 
- Public Member Functions inherited from MCore::MemoryObject
 MemoryObject ()
 
virtual ~MemoryObject ()
 
void IncreaseReferenceCount ()
 
void DecreaseReferenceCount ()
 
void Destroy ()
 
uint32 GetReferenceCount () const
 

Static Public Member Functions

static SingleThreadSchedulerCreate ()
 

Protected Member Functions

void RecursiveExecuteActorInstance (ActorInstance *actorInstance, float timePassedInSeconds)
 
 SingleThreadScheduler ()
 
virtual ~SingleThreadScheduler ()
 
- Protected Member Functions inherited from EMotionFX::ActorUpdateScheduler
 ActorUpdateScheduler ()
 
virtual ~ActorUpdateScheduler ()
 
- Protected Member Functions inherited from EMotionFX::BaseObject
void Delete () override
 
virtual void Delete ()
 

Additional Inherited Members

- Protected Attributes inherited from EMotionFX::ActorUpdateScheduler
MCore::AtomicSizeT m_numUpdated
 
MCore::AtomicSizeT m_numVisible
 
MCore::AtomicSizeT m_numSampled
 

Detailed Description

The single processor scheduler. This scheduler is optimized for systems with just one CPU, or if you want EMotion FX to only use one CPU. Using this class will be faster than using the MultiThreadScheduler that has been setup to use only one CPU. The reason for this is that this scheduler will not have the associated multithread management overhead.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

The unique type ID of this scheduler, as returned by the GetType() method.

Constructor & Destructor Documentation

◆ SingleThreadScheduler()

EMotionFX::SingleThreadScheduler::SingleThreadScheduler ( )
protected

The constructor.

◆ ~SingleThreadScheduler()

virtual EMotionFX::SingleThreadScheduler::~SingleThreadScheduler ( )
protectedvirtual

The destructor.

Member Function Documentation

◆ Clear()

void EMotionFX::SingleThreadScheduler::Clear ( )
inlineoverridevirtual

Clear the schedule.

Implements EMotionFX::ActorUpdateScheduler.

◆ Create()

static SingleThreadScheduler * EMotionFX::SingleThreadScheduler::Create ( )
static

The creation method.

◆ Execute()

void EMotionFX::SingleThreadScheduler::Execute ( float  timePassedInSeconds)
overridevirtual

The main method which will execute all callbacks, which on their turn will check for visibilty, perform updates and render.

Parameters
timePassedInSecondsThe time passed, in seconds, since the last call to the update.

Implements EMotionFX::ActorUpdateScheduler.

◆ GetName()

const char * EMotionFX::SingleThreadScheduler::GetName ( ) const
inlineoverridevirtual

Get the name of this class, or a description.

Returns
The string containing the name of the scheduler.

Implements EMotionFX::ActorUpdateScheduler.

◆ GetType()

uint32 EMotionFX::SingleThreadScheduler::GetType ( ) const
inlineoverridevirtual

Get the unique type ID of the scheduler type. All schedulers will have another ID, so that you can use this to identify what scheduler you are dealing with.

Returns
The unique ID of the scheduler type.

Implements EMotionFX::ActorUpdateScheduler.

◆ RecursiveExecuteActorInstance()

void EMotionFX::SingleThreadScheduler::RecursiveExecuteActorInstance ( ActorInstance actorInstance,
float  timePassedInSeconds 
)
protected

Recursively execute an actor instance and its attachments.

Parameters
actorInstanceThe actor instance to execute the callbacks for.
timePassedInSecondsThe time passed, in seconds, since the last update.

◆ RecursiveInsertActorInstance()

void EMotionFX::SingleThreadScheduler::RecursiveInsertActorInstance ( ActorInstance actorInstance,
size_t  startStep = 0 
)
inlineoverridevirtual

Recursively insert an actor instance into the schedule, including all its attachments.

Parameters
actorInstanceThe actor instance to insert.
startStepAn offset in the schedule where to start trying to insert the actor instances.

Implements EMotionFX::ActorUpdateScheduler.

◆ RecursiveRemoveActorInstance()

void EMotionFX::SingleThreadScheduler::RecursiveRemoveActorInstance ( ActorInstance actorInstance,
size_t  startStep = 0 
)
inlineoverridevirtual

Recursively remove an actor instance and its attachments from the schedule.

Parameters
actorInstanceThe actor instance to remove.
startStepAn offset in the schedule where to start trying to remove from.

Implements EMotionFX::ActorUpdateScheduler.

◆ RemoveActorInstance()

size_t EMotionFX::SingleThreadScheduler::RemoveActorInstance ( ActorInstance actorInstance,
size_t  startStep = 0 
)
inlineoverridevirtual

Remove a single actor instance from the schedule. This will not remove its attachments.

Parameters
actorInstanceThe actor instance to remove.
startStepAn offset in the schedule where to start trying to remove from.
Returns
Returns the offset in the schedule where the actor instance was removed.

Implements EMotionFX::ActorUpdateScheduler.


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