![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <SimCallbackObject.h>
Inheritance diagram for Chaos::TSimCallbackObject< TInputType, TOutputType, TOptions >:Additional Inherited Members | |
Protected Member Functions inherited from Chaos::ISimCallbackObject | |
| ISimCallbackObject (const ESimCallbackOptions InOptions=ESimCallbackOptions::Presimulate) | |
| CHAOS_API FSimCallbackInput * | GetProducerInputData_External () |
| void | SetCurrentInput_Internal (FSimCallbackInput *NewInput) |
| void | SetSimAndDeltaTime_Internal (const FReal InSimTime, const FReal InDeltaTime) |
| const FSimCallbackInput * | GetCurrentInput_Internal () const |
Protected Attributes inherited from Chaos::ISimCallbackObject | |
| FSimCallbackOutput * | CurrentOutput_Internal |
Simple templated implementation that uses lock free queues to manage memory
|
inline |
|
inline |
|
inlineoverridevirtual |
Free the output data. Note that allocation is done on the internal thread, but freeing is done on the external thread. A common pattern is to use a single producer single consumer thread safe queue to manage this.
Implements Chaos::ISimCallbackObject.
|
inline |
Get the input associated with the current sim step. This input was provided by the external thread. Note the data could be from a few frames ago
|
inline |
Gets the current producer input data. This is what the external thread should be writing to
|
inline |
Gets the current producer output data. This is what the callback generates. If multiple callbacks are triggered in one step, the same output is used
|
inline |
Check if the output queue is empty of data Can be used while iterating the queue through PopOutputData_External and PopFutureOutputData_External to check if the current data is the last data.
|
inline |
Pop up to the latest output, even if it is in the future. NOTE: It's up to the user to check the internal time of the outputs that this produces. See GetSolver()->GetPhysicsResultsTime_External() for the interpolation time.
A typical example is to pop all of these into a queue, and to interpolate them manually.
|
inline |
Gets the output data produced in order up to and including ResultsTime. Typical usage is: while(auto Output = PopOutputData_External()) { //process output }