VoxelFarm::IVoxelLayer Class Referenceabstract

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>

Inheritance diagram for VoxelFarm::IVoxelLayer:
VoxelFarm::API::CExtensionLayer VoxelFarm::Architecture::CArchitectureManager VoxelFarm::CBlockData VoxelFarm::CHeightmapTerrain VoxelFarm::CHeightmapWaterLayer VoxelFarm::CInstanceManager VoxelFarm::COceanLayer VoxelFarm::CSimplexWorldVoxelLayer VoxelFarm::CStaticWaterLayer

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.
 

Detailed Description

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.

Member Function Documentation

virtual void VoxelFarm::IVoxelLayer::getContourData ( CellId  cell,
ContourVoxelData data,
bool &  empty,
void *  threadContext 
)
pure virtual

Returns voxel data for the specified cell.

Parameters
cellID of the cell
dataA buffer where the voxel data will be copied.
emptyA 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.


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