Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cStructGenTrees Class Reference

#include <StructGen.h>

Inheritance diagram for cStructGenTrees:
Inheritance graph
[legend]
Collaboration diagram for cStructGenTrees:
Collaboration graph
[legend]

Public Member Functions

 cStructGenTrees (int a_Seed, cBiomeGenPtr a_BiomeGen, cTerrainShapeGenPtr a_ShapeGen, cTerrainCompositionGenPtr a_CompositionGen)
 
- Public Member Functions inherited from cFinishGen
virtual ~cFinishGen ()
 

Protected Member Functions

void ApplyTreeImage (int a_ChunkX, int a_ChunkZ, cChunkDesc &a_ChunkDesc, const sSetBlockVector &a_Image, sSetBlockVector &a_Overflow)
 Applies an image into chunk blockdata; all blocks outside the chunk will be appended to a_Overflow. More...
 
void GenerateSingleTree (int a_ChunkX, int a_ChunkZ, int a_Seq, cChunkDesc &a_ChunkDesc, sSetBlockVector &a_OutsideLogs, sSetBlockVector &a_OutsideOther)
 Generates and applies an image of a single tree. More...
 
virtual void GenFinish (cChunkDesc &a_ChunkDesc) override
 
int GetNumTrees (int a_ChunkX, int a_ChunkZ, const cChunkDef::BiomeMap &a_Biomes)
 

Protected Attributes

cBiomeGenPtr m_BiomeGen
 
cTerrainCompositionGenPtr m_CompositionGen
 
cNoise m_Noise
 
int m_Seed
 
cTerrainShapeGenPtr m_ShapeGen
 

Detailed Description

Definition at line 23 of file StructGen.h.

Constructor & Destructor Documentation

cStructGenTrees::cStructGenTrees ( int  a_Seed,
cBiomeGenPtr  a_BiomeGen,
cTerrainShapeGenPtr  a_ShapeGen,
cTerrainCompositionGenPtr  a_CompositionGen 
)
inline

Definition at line 27 of file StructGen.h.

Member Function Documentation

void cStructGenTrees::ApplyTreeImage ( int  a_ChunkX,
int  a_ChunkZ,
cChunkDesc a_ChunkDesc,
const sSetBlockVector a_Image,
sSetBlockVector a_Overflow 
)
protected

Applies an image into chunk blockdata; all blocks outside the chunk will be appended to a_Overflow.

Definition at line 145 of file StructGen.cpp.

void cStructGenTrees::GenerateSingleTree ( int  a_ChunkX,
int  a_ChunkZ,
int  a_Seq,
cChunkDesc a_ChunkDesc,
sSetBlockVector a_OutsideLogs,
sSetBlockVector a_OutsideOther 
)
protected

Generates and applies an image of a single tree.

Parts of the tree inside the chunk are applied to a_ChunkDesc. Parts of the tree outside the chunk are stored in a_OutsideXYZ

Definition at line 76 of file StructGen.cpp.

void cStructGenTrees::GenFinish ( cChunkDesc a_ChunkDesc)
overrideprotectedvirtual

Implements cFinishGen.

Definition at line 17 of file StructGen.cpp.

int cStructGenTrees::GetNumTrees ( int  a_ChunkX,
int  a_ChunkZ,
const cChunkDef::BiomeMap a_Biomes 
)
protected

Definition at line 197 of file StructGen.cpp.

Member Data Documentation

cBiomeGenPtr cStructGenTrees::m_BiomeGen
protected

Definition at line 39 of file StructGen.h.

cTerrainCompositionGenPtr cStructGenTrees::m_CompositionGen
protected

Definition at line 41 of file StructGen.h.

cNoise cStructGenTrees::m_Noise
protected

Definition at line 38 of file StructGen.h.

int cStructGenTrees::m_Seed
protected

Definition at line 37 of file StructGen.h.

cTerrainShapeGenPtr cStructGenTrees::m_ShapeGen
protected

Definition at line 40 of file StructGen.h.


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