UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Chaos::FEventManager Class Reference

#include <EventManager.h>

Public Member Functions

 FEventManager (const Chaos::EMultiBufferMode &BufferModeIn)
 
 ~FEventManager ()
 
CHAOS_API void Reset ()
 
void SetBufferMode (const Chaos::EMultiBufferMode &BufferModeIn)
 
template<typename PayloadType >
void RegisterEvent (const EEventType &EventType, TFunction< void(const Chaos::FPBDRigidsSolver *Solver, PayloadType &EventData, bool bResetData)> InFunction)
 
template<typename PayloadType >
void ClearEvents (const EEventType &EventType, TFunction< void(PayloadType &EventData)> InFunction)
 
CHAOS_API void UnregisterEvent (const EEventType &EventType)
 
template<typename PayloadType , typename HandlerType >
void RegisterHandler (const EEventType &EventType, HandlerType *Handler, typename TRawEventHandler< PayloadType, HandlerType >::FHandlerFunction HandlerFunction, typename TRawEventHandler< PayloadType, HandlerType >::FInterestedProxyOwnerFunction InterestedProxyOwnerFunction=nullptr)
 
CHAOS_API void UnregisterHandler (const EEventType &EventType, const void *InHandler)
 
CHAOS_API void FillProducerData (const Chaos::FPBDRigidsSolver *Solver, bool bResetData=true)
 
CHAOS_API void FlipBuffersIfRequired ()
 
CHAOS_API void DispatchEvents ()
 
template<typename PayloadType >
void AddEvent (const EEventType &EventType, TFunction< void(PayloadType &EventData)> InFunction)
 

Static Public Member Functions

static CHAOS_API int32 EncodeCollisionIndex (int32 ActualCollisionIndex, bool bSwapOrder)
 
static CHAOS_API int32 DecodeCollisionIndex (int32 EncodedCollisionIdx, bool &bSwapOrder)
 

Friends

class FPBDRigidsSolver
 

Constructor & Destructor Documentation

◆ FEventManager()

Chaos::FEventManager::FEventManager ( const Chaos::EMultiBufferMode BufferModeIn)
inline

◆ ~FEventManager()

Chaos::FEventManager::~FEventManager ( )
inline

Member Function Documentation

◆ AddEvent()

template<typename PayloadType >
void Chaos::FEventManager::AddEvent ( const EEventType EventType,
TFunction< void(PayloadType &EventData)>  InFunction 
)
inline

◆ ClearEvents()

template<typename PayloadType >
void Chaos::FEventManager::ClearEvents ( const EEventType EventType,
TFunction< void(PayloadType &EventData)>  InFunction 
)
inline

Modify the producer side of the event buffer

◆ DecodeCollisionIndex()

int32 Chaos::FEventManager::DecodeCollisionIndex ( int32  EncodedCollisionIdx,
bool bSwapOrder 
)
static

Returns decoded collision index.

◆ DispatchEvents()

void Chaos::FEventManager::DispatchEvents ( )

// Dispatch events to the registered handlers

◆ EncodeCollisionIndex()

int32 Chaos::FEventManager::EncodeCollisionIndex ( int32  ActualCollisionIndex,
bool  bSwapOrder 
)
static

Returns encoded collision index.

◆ FillProducerData()

void Chaos::FEventManager::FillProducerData ( const Chaos::FPBDRigidsSolver Solver,
bool  bResetData = true 
)

Called by the solver to invoke the functions that fill the producer side of all the event data buffers

◆ FlipBuffersIfRequired()

void Chaos::FEventManager::FlipBuffersIfRequired ( )

Flips the event data buffer if it is of double or triple buffer type

◆ RegisterEvent()

template<typename PayloadType >
void Chaos::FEventManager::RegisterEvent ( const EEventType EventType,
TFunction< void(const Chaos::FPBDRigidsSolver *Solver, PayloadType &EventData, bool bResetData)>  InFunction 
)
inline

Register a new event into the system, providing the function that will fill the producer side of the event buffer

◆ RegisterHandler()

template<typename PayloadType , typename HandlerType >
void Chaos::FEventManager::RegisterHandler ( const EEventType EventType,
HandlerType Handler,
typename TRawEventHandler< PayloadType, HandlerType >::FHandlerFunction  HandlerFunction,
typename TRawEventHandler< PayloadType, HandlerType >::FInterestedProxyOwnerFunction  InterestedProxyOwnerFunction = nullptr 
)
inline

Register a handler that will receive the dispatched events

◆ Reset()

void Chaos::FEventManager::Reset ( )

Clears out every handler and container calling destructors on held items

◆ SetBufferMode()

void Chaos::FEventManager::SetBufferMode ( const Chaos::EMultiBufferMode BufferModeIn)
inline

Set the buffer mode to be used within the event containers

◆ UnregisterEvent()

void Chaos::FEventManager::UnregisterEvent ( const EEventType EventType)

Unregister specified event from system

◆ UnregisterHandler()

void Chaos::FEventManager::UnregisterHandler ( const EEventType EventType,
const void InHandler 
)

Unregister the specified event handler

Friends And Related Symbol Documentation

◆ FPBDRigidsSolver

friend class FPBDRigidsSolver
friend

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