Module |
|
Header |
/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Framework/BufferedData.h |
Include |
#include "Chaos/Framework/BufferedData.h" |
template<typename DataType>
class TBufferedData
Container type for double buffered physics data. Wrap whatever results object in this to have well definied semantics for accessing each side of a buffer and flipping it
Name | Description | |
---|---|---|
|
TBufferedData() |
Name | Description | ||
---|---|---|---|
|
Flip() |
Flips the double buffer, no locks here - if synchronizing multiple threads make sure there's a lock somewhere |
|
|
DataType & |
Get ( |
Direct access to buffered data, useful to initialise members before beginning simulation. |
|
const DataTy... |
GetGameDataForRead() |
Get a readable reference for the game thread side of the double buffer |
|
DataType & |
GetGameDataForWrite() |
Only for the game side to call, gets a writable reference to the game side data. |
|
GetGameDataSyncCount() |
Get the counter for the last written state on the game side |
|
|
const DataTy... |
GetPhysicsDataForRead() |
Get a readable reference for the physics side of the double buffer |
|
DataType & |
GetPhysicsDataForWrite() |
Only for the physics side to call, gets a writable reference to the physics side and increments the current sync counter to uniquely identify this write |
|
GetPhysicsDataSyncCount() |
Get the counter for the last written state on the physics side |