VoxelFarm::CInstanceHeightMap Class Reference

Handles instanced voxel data. More...

#include <InstanceManager.h>

Inheritance diagram for VoxelFarm::CInstanceHeightMap:
VoxelFarm::CInstanceManager VoxelFarm::IVoxelLayer VoxelFarm::IMask

Public Member Functions

 CInstanceHeightMap (CHeightmap *heightmap, Architecture::CArchitectureManager *architectureManager)
 
int * generateInstances (CellId cell)
 Runs planting rules over one cell.
 
- Public Member Functions inherited from VoxelFarm::CInstanceManager
 CInstanceManager (Architecture::CArchitectureManager *architectureManager)
 
int loadClassData (char *name, char *filename)
 Load data for one class.
 
int loadClassData (VoxelFarm::IInputStream *reader, char *name, char *filename)
 Load data for one class from a resource stream.
 
int loadClassDataRaw (const char *name, const char *data)
 Load data for one class out of the provided raw data.
 
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 void * createThreadContext () override
 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) override
 Destroys the specified thread context.
 
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) override
 Retrieves a mask value based on whether there are instances in that coordinate.
 
- Public Member Functions inherited from VoxelFarm::IVoxelLayer
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.
 

Additional Inherited Members

- Protected Attributes inherited from VoxelFarm::CInstanceManager
Architecture::CArchitectureManagerarchitectureManager
 
TVector< ClassDataclasses
 
TMap< CellId, TVector< int > > instances
 
TMap< CellId, int * > instanceMap
 
TVector< InstanceDatainstanceData
 
TMap< String, int > classMap
 
TSet< CellIdgeneratedCells
 
ExternalMutex::Mutex lock
 
TSet< CellIdpendingCells
 

Detailed Description

Handles instanced voxel data.

Definition at line 134 of file InstanceManager.h.


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