VoxelFarm::CCellData Class Reference

Stores the information for a Cell that has already been converted to a polygonal mesh. More...

#include <CellData.h>

Inheritance diagram for VoxelFarm::CCellData:
VoxelFarm::GL::CGLCellData VoxelFarm::GL::CSolid

Classes

class  CInstanceMesh
 Defines a mesh that can be instanced relative to a face in the mesh. More...
 
class  CInstanceMeshLOD
 Stores all LOD meshes for one instance. More...
 
struct  CVert
 3D Vertex More...
 
class  ThreadContext
 
struct  UV
 Pair of texture coordinates. More...
 

Public Member Functions

 CCellData (CellId cellId)
 
void loadFromBuffer ()
 Loads the cell contents from a buffer. This is used by the offline mode of VoxelFarm.
 
void releaseData ()
 Releases core memory used to feed GPU data.
 
virtual void processMesh (CMaterialLibrary *materialLibrary, CBillboardCache *billboardCache, ThreadContext *tc, LODStats stats)
 Computes normals, materials and billboards for the Cell.
 

Static Public Member Functions

static int getMaterialMedium (CMaterial &materialDefinition, int level)
 Returns medium identifier based on a material definition.
 

Public Attributes

bool deleted
 
CellId cell
 Cell identifier.
 
CFastQuadrics mesh [MEDIUM_MAX]
 A mesh containing the polygons that appear in the Cell.
 
unsigned int * normals [MEDIUM_MAX]
 List of normals to be sent to the GPU.
 
unsigned int * materials [MEDIUM_MAX]
 List of materials to be sent to the GPU.
 
unsigned char * materialChannels [MEDIUM_MAX][3]
 List of materials to be sent to the GPU.
 
int faceCount [MEDIUM_MAX]
 Number of triangles in cell.
 
int vertexCount [MEDIUM_MAX]
 Number of vertices in cell.
 
int normalMapWidth
 Width in pixels of the normal map for the Cell.
 
int normalMapHeight
 Height in pixels of the normal map for the Cell.
 
int mapwidth
 Width in pixels of the diffuse map for the Cell.
 
int mapheight
 Height in pixels of the normal map for the Cell.
 
int billboardCount
 Number of billboard objects found in the Cell.
 
bool * uvSet
 Specifies whether the Cell vertex has UV mapping.
 
CVertvertices [MEDIUM_MAX]
 List of vertices in the Cell.
 
CVertvertNormals [MEDIUM_MAX]
 List of smoothed vertex normals.
 
CVertfaceNormals [MEDIUM_MAX]
 List of face normals.
 
CVertbillboardVertices
 List of billboard vertices.
 
CVertbillboardNormals
 List of billboard normals.
 
CVertbillboardLightDir
 List of billboard light directions.
 
unsigned int * billboardLightColor
 List of billboard light colors.
 
UVbillboardSizes
 List of billboard dimensions.
 
UVbillboardUV
 List of billboard texture coordinates.
 
int generation
 Age of the Cell. This is used by the Cell garbage collection system.
 
int UVFacesCount [MEDIUM_MAX]
 Number of faces that received UV coordinates.
 
CVertlightDir [MEDIUM_MAX]
 Light directions for vertices in the Cell.
 
unsigned int * lightColor [MEDIUM_MAX]
 Light color for vertices in the Cell.
 
Algebra::Vector lastEyePos
 Records the viewer position when the cell was created.
 
double snowHeight
 Height of the snow layer for this cell.
 
int instanceCount
 Number of material instances in the cell.
 
int instanceVertCount
 Number of vertices for material instances in the cell.
 
int instanceFaceCount
 Number of faces for material instances in the cell.
 
CVertinstanceVertices
 Array containing material instance vertices.
 
CVertinstanceNormals
 Array containing material instance normals.
 
CVertinstanceUV
 Array containing material instance UV coordinates.
 
unsigned short * instanceFaces
 Array containing material instance face indices.
 
bool inuse
 
bool seamCreated [3][2]
 
bool seamBaked [3][2]
 
bool seamDisplay [3][2]
 
CFastQuadrics seamMeshes [3][2][MEDIUM_MAX]
 
CFastQuadrics seamMesh [MEDIUM_MAX][2][3]
 A mesh containing the polygons in the Cell seam before simplification.
 
CVertseamVerts [MEDIUM_MAX]
 
CVertseamVertNormals [MEDIUM_MAX]
 
int * seamMaterials [MEDIUM_MAX]
 
unsigned int * seamLightColor [MEDIUM_MAX]
 
int computedSeamFaceCount [MEDIUM_MAX][2][3]
 
CVertcomputedSeamVerts [MEDIUM_MAX][2][3]
 
CVertcomputedSeamVertNormals [MEDIUM_MAX][2][3]
 
CVertcomputedSeamFaceNormals [MEDIUM_MAX][2][3]
 
unsigned int * computedSeamMaterials [MEDIUM_MAX][2][3]
 
unsigned int * computedSeamLightColor [MEDIUM_MAX][2][3]
 
unsigned char * computedSeamMaterialChannels [MEDIUM_MAX][2][3][3]
 

Static Public Attributes

static const int MEDIUM_MAX = 4
 Number of different mediums in the world. Each medium may be subject to a different rendering logic. Medium 0 is reserved to the world geometry. Medium 1 denotes tree crowns and other forms of folliage that will be replaced by billboards, but still must used for casting shadows.
 
static const int MEDIUM_SOLID = 0
 This medium is used for solid world geometry.
 
static const int MEDIUM_FOLIAGE = 1
 This medium is used for foliage.
 
static const int MEDIUM_PREVIEW = 2
 This medium is use for a placement preview.
 
static const int MEDIUM_WATER = 3
 This medium is use for glass and transparent solids.
 
static const int INSTANCE_LOD = 4
 Number of LOD stored for each instance type.
 
static int cellCount
 

Detailed Description

Stores the information for a Cell that has already been converted to a polygonal mesh.

Definition at line 107 of file CellData.h.


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