An interface for a voxel layer. By implementing this interface, very different modules can contribute their voxel data into the final representation for the world. More...
#include <VoxelLayer.h>
Public Member Functions | |
| virtual void | getContourData (CellId cell, ContourVoxelData *data, bool &empty, void *threadContext)=0 |
| Returns voxel data for the specified cell. More... | |
| virtual void | planJobs (Scene *scene) |
| This is called when a new scene is discovered. It can be used to create objects that will be later returned in voxel form. | |
| virtual void | runJobs () |
| Execute any additional generation task. | |
| virtual void * | createThreadContext () |
| The voxel layer can use this method to return a structure that will be unique for each calling thread. This allows to have lock-free work buffers assigned to each worker thread. | |
| virtual void | disposeThreadContext (void *threadContext) |
| Destroys the specified thread context. | |
| virtual int | getStatsContourId () |
| Returns the stats ID to be used for measuring performance of the getContourData() method. | |
| virtual int | getStatsPlanJobsId () |
| Returns the stats ID to be used for measuring performance of the planJobs() method. | |
| virtual int | getStatsRunJobsId () |
| Returns the stats ID to be used for measuring performance of the runJobs() method. | |
| virtual bool | isCacheable () |
| Returns true if the layer's output can be cached. Return true if the output for a cell will always be the same. | |
An interface for a voxel layer. By implementing this interface, very different modules can contribute their voxel data into the final representation for the world.
Definition at line 535 of file VoxelLayer.h.
|
pure virtual |
Returns voxel data for the specified cell.
| cell | ID of the cell |
| data | A buffer where the voxel data will be copied. |
| empty | A flag notifying the entire cell is empty and could be discarded by the caller |
Implemented in VoxelFarm::CSimplexWorldVoxelLayer, VoxelFarm::CStaticWaterLayer, VoxelFarm::Architecture::CArchitectureManager, VoxelFarm::CHeightmapTerrain, VoxelFarm::COceanLayer, VoxelFarm::CHeightmapWaterLayer, VoxelFarm::CBlockData, VoxelFarm::CInstanceManager, and VoxelFarm::API::CExtensionLayer.