VoxelFarm::CHeightmapWaterLayer Class Reference
Inheritance diagram for VoxelFarm::CHeightmapWaterLayer:
VoxelFarm::IVoxelLayer VoxelFarm::IMask

Public Member Functions

 CHeightmapWaterLayer (IHydroHeightmapPage *heightmap, MaterialId waterMaterial, double seaLevel, double springLevel)
 
CHydroTilegetTile (CellId cell)
 
CHydroTilegetTile (int level, int xc, int yc, int zc)
 
virtual void getContourData (CellId cell, ContourVoxelData *data, bool &empty, void *threadContext) override
 Returns voxel data for the specified cell (IVoxelLayer) More...
 
virtual void planJobs (Scene *scene) override
 Processes a scene to get new entities from it. This is called by the scene creation loop. It adds master cells to the instance grid for their generation in worker threads.
 
virtual void runJobs () override
 Processes pending generation requests. This is called by the contouring loop. Pending cells will be generated at this time.
 
virtual int getStatsContourId () override
 Returns the stats ID to be used for measuring performance of the getContourData() method.
 
virtual double getMaskValue (double x, double y, double z)
 Returns the mask strength value for the specified 3D point. The value must be between 0 and 1. More...
 
- Public Member Functions inherited from VoxelFarm::IVoxelLayer
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 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.
 

Public Attributes

IHydroHeightmapPageheightmap
 
TMap< CellId, CHydroTile * > pages
 
ExternalMutex::Mutex lock
 
TSet< CellIdpendingCells
 
TVector< CellIdpendingQueue
 
MaterialId waterMaterial
 
double seaLevel
 
double springLevel
 

Static Public Attributes

static const int TILE_LOD = 14
 
static const int TILE_SIZE = 512
 
static const int PAGE_SIZE = 32
 

Detailed Description

Definition at line 204 of file HydroTile.h.

Member Function Documentation

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

Returns voxel data for the specified cell (IVoxelLayer)

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

Implements VoxelFarm::IVoxelLayer.

virtual double VoxelFarm::CHeightmapWaterLayer::getMaskValue ( double  x,
double  y,
double  z 
)
virtual

Returns the mask strength value for the specified 3D point. The value must be between 0 and 1.

Parameters
xWorld X coordinate
yWorld Y coordinate
zWorld Z coordinate

Implements VoxelFarm::IMask.


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