VoxelFarm::IBlockData Class Referenceabstract
Inheritance diagram for VoxelFarm::IBlockData:
VoxelFarm::CBlockData VoxelFarm::CBufferBlockData

Public Member Functions

virtual void setBlock (CellId &cell, int &x, int &y, int &z, int material, double dx, double dy, double dz, TSet< CellId > *changedCells)=0
 Sets a value for a voxel. More...
 
virtual BlockVoxelDatafetchData (CellId cell, bool create)=0
 Returns the voxel data buffer for the specified cell. This is a synchronous call. More...
 
virtual BlockVoxelDatafetchCacheData (CellId cell, bool create)=0
 Returns a cache voxel data buffer for the specified cell. More...
 
virtual void beginChanges ()=0
 Sets a marker for a change set that can be undone.
 
virtual void trackCellChanges (CellId cell, const BlockVoxelData *blockData)=0
 Requests changes made to a cell to be remembered so they can be undone.
 
virtual void endChanges ()=0
 Closes the marker for a change set that can be undone.
 

Detailed Description

Definition at line 36 of file BlockData.h.

Member Function Documentation

virtual BlockVoxelData* VoxelFarm::IBlockData::fetchCacheData ( CellId  cell,
bool  create 
)
pure virtual

Returns a cache voxel data buffer for the specified cell.

Parameters
cellCell ID for the cell to be retrieved
createIf set to true will create an empty cell buffer if no buffer is found for the cell

Implemented in VoxelFarm::CBlockData, and VoxelFarm::CBufferBlockData.

virtual BlockVoxelData* VoxelFarm::IBlockData::fetchData ( CellId  cell,
bool  create 
)
pure virtual

Returns the voxel data buffer for the specified cell. This is a synchronous call.

Parameters
cellCell ID for the cell to be retrieved
createIf set to true will create an empty cell buffer if no buffer is found for the cell

Implemented in VoxelFarm::CBlockData, and VoxelFarm::CBufferBlockData.

virtual void VoxelFarm::IBlockData::setBlock ( CellId cell,
int &  x,
int &  y,
int &  z,
int  material,
double  dx,
double  dy,
double  dz,
TSet< CellId > *  changedCells 
)
pure virtual

Sets a value for a voxel.

Parameters
cellID for the cell containing the voxel to be set
xX coordinates for a voxel relative to the origin of the Cell
yY coordinates for a voxel relative to the origin of the Cell
zZ coordinates for a voxel relative to the origin of the Cell
materialID for material being set.
dxX coordinates of the inner-voxel point, relative to the origin of the voxel
dyY coordinates of the inner-voxel point, relative to the origin of the voxel
dzZ coordinates of the inner-voxel point, relative to the origin of the voxel

Implemented in VoxelFarm::CBlockData, and VoxelFarm::CBufferBlockData.


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