Container type for double buffered physics data. 更多...
#include <BufferedData.h>
Public 成员函数 | |
| void | Flip () |
| Flips the double buffer, no locks here - if synchronizing multiple threads make sure there's a lock somewhere | |
| DataType & | Get (int32 InIndex) |
| Direct access to buffered data, useful to initialise members before beginning simulation. 更多... | |
| const DataType & | GetGameDataForRead () const |
| 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. 更多... | |
| int32 | GetGameDataSyncCount () const |
| Get the counter for the last written state on the game side | |
| const DataType & | GetPhysicsDataForRead () const |
| 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 | |
| int32 | GetPhysicsDataSyncCount () const |
| Get the counter for the last written state on the physics side | |
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
|
inline |
Direct access to buffered data, useful to initialise members before beginning simulation.
Never use once the data is being managed over multiple threads
|
inline |
Only for the game side to call, gets a writable reference to the game side data.
Mainly useful for exchanging ptrs in the data type. For copying just call GetGameDataForRead