engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
Chaos::TBufferedData< DataType > 模板类 参考

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
 

详细描述

template<typename DataType>
class Chaos::TBufferedData< DataType >

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

成员函数说明

◆ Get()

template<typename DataType >
DataType & Chaos::TBufferedData< DataType >::Get ( int32  InIndex)
inline

Direct access to buffered data, useful to initialise members before beginning simulation.

Never use once the data is being managed over multiple threads

◆ GetGameDataForWrite()

template<typename DataType >
DataType & Chaos::TBufferedData< DataType >::GetGameDataForWrite ( )
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


该类的文档由以下文件生成: