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

#include <EndGen.h>

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

Public Member Functions

 cEndGen (int a_Seed)
 
- Public Member Functions inherited from cTerrainShapeGen
virtual void InitializeShapeGen (cIniFile &a_IniFile)
 Reads parameters from the ini file, prepares generator for use. More...
 
virtual ~cTerrainShapeGen ()
 
- Public Member Functions inherited from cTerrainCompositionGen
virtual ~cTerrainCompositionGen ()
 

Protected Member Functions

virtual void ComposeTerrain (cChunkDesc &a_ChunkDesc, const cChunkDesc::Shape &a_Shape) override
 Generates the chunk's composition into a_ChunkDesc, using the terrain shape provided in a_Shape. More...
 
void GenerateNoiseArray (void)
 Generates the m_NoiseArray array for the current chunk. More...
 
virtual void GenShape (cChunkCoords a_ChunkCoords, cChunkDesc::Shape &a_Shape) override
 Generates the shape for the given chunk. More...
 
virtual void InitializeCompoGen (cIniFile &a_IniFile) override
 Reads parameters from the ini file, prepares generator for use. More...
 
bool IsChunkOutsideRange (cChunkCoords a_ChunkCoords)
 Returns true if the chunk is outside of the island's dimensions. More...
 
void PrepareState (cChunkCoords a_ChunkCoords)
 Unless the LastChunk coords are equal to coords given, prepares the internal state (noise array) More...
 

Protected Attributes

NOISE_DATATYPE m_FrequencyX
 
NOISE_DATATYPE m_FrequencyY
 
NOISE_DATATYPE m_FrequencyZ
 
int m_IslandSizeX
 
int m_IslandSizeY
 
int m_IslandSizeZ
 
cChunkCoords m_LastChunkCoords
 
int m_MaxChunkX
 
int m_MaxChunkZ
 
int m_MinChunkX
 
int m_MinChunkZ
 
NOISE_DATATYPE m_NoiseArray [17 *17 *257]
 
cPerlinNoise m_Perlin
 The Perlin noise used for generating. More...
 
int m_Seed
 Seed for the noise. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from cTerrainShapeGen
static cTerrainShapeGenPtr CreateShapeGen (cIniFile &a_IniFile, cBiomeGenPtr a_BiomeGen, int a_Seed, bool &a_CacheOffByDefault)
 Creates the correct TerrainShapeGen descendant based on the ini file settings and the seed provided. More...
 
- Static Public Member Functions inherited from cTerrainCompositionGen
static cTerrainCompositionGenPtr CreateCompositionGen (cIniFile &a_IniFile, cBiomeGenPtr a_BiomeGen, cTerrainShapeGenPtr a_ShapeGen, int a_Seed)
 Creates the correct TerrainCompositionGen descendant based on the ini file settings and the seed provided. More...
 

Detailed Description

Definition at line 19 of file EndGen.h.

Constructor & Destructor Documentation

cEndGen::cEndGen ( int  a_Seed)

Definition at line 35 of file EndGen.cpp.

Member Function Documentation

void cEndGen::ComposeTerrain ( cChunkDesc a_ChunkDesc,
const cChunkDesc::Shape a_Shape 
)
overrideprotectedvirtual

Generates the chunk's composition into a_ChunkDesc, using the terrain shape provided in a_Shape.

Is expected to fill a_ChunkDesc's heightmap with the data from a_Shape.

Implements cTerrainCompositionGen.

Definition at line 186 of file EndGen.cpp.

void cEndGen::GenerateNoiseArray ( void  )
protected

Generates the m_NoiseArray array for the current chunk.

Definition at line 97 of file EndGen.cpp.

void cEndGen::GenShape ( cChunkCoords  a_ChunkCoords,
cChunkDesc::Shape a_Shape 
)
overrideprotectedvirtual

Generates the shape for the given chunk.

Implements cTerrainShapeGen.

Definition at line 151 of file EndGen.cpp.

void cEndGen::InitializeCompoGen ( cIniFile a_IniFile)
overrideprotectedvirtual

Reads parameters from the ini file, prepares generator for use.

Reimplemented from cTerrainCompositionGen.

Definition at line 58 of file EndGen.cpp.

bool cEndGen::IsChunkOutsideRange ( cChunkCoords  a_ChunkCoords)
protected

Returns true if the chunk is outside of the island's dimensions.

Definition at line 139 of file EndGen.cpp.

void cEndGen::PrepareState ( cChunkCoords  a_ChunkCoords)
protected

Unless the LastChunk coords are equal to coords given, prepares the internal state (noise array)

Definition at line 79 of file EndGen.cpp.

Member Data Documentation

NOISE_DATATYPE cEndGen::m_FrequencyX
protected

Definition at line 40 of file EndGen.h.

NOISE_DATATYPE cEndGen::m_FrequencyY
protected

Definition at line 41 of file EndGen.h.

NOISE_DATATYPE cEndGen::m_FrequencyZ
protected

Definition at line 42 of file EndGen.h.

int cEndGen::m_IslandSizeX
protected

Definition at line 35 of file EndGen.h.

int cEndGen::m_IslandSizeY
protected

Definition at line 36 of file EndGen.h.

int cEndGen::m_IslandSizeZ
protected

Definition at line 37 of file EndGen.h.

cChunkCoords cEndGen::m_LastChunkCoords
protected

Definition at line 49 of file EndGen.h.

int cEndGen::m_MaxChunkX
protected

Definition at line 45 of file EndGen.h.

int cEndGen::m_MaxChunkZ
protected

Definition at line 46 of file EndGen.h.

int cEndGen::m_MinChunkX
protected

Definition at line 45 of file EndGen.h.

int cEndGen::m_MinChunkZ
protected

Definition at line 46 of file EndGen.h.

NOISE_DATATYPE cEndGen::m_NoiseArray[17 *17 *257]
protected

Definition at line 50 of file EndGen.h.

cPerlinNoise cEndGen::m_Perlin
protected

The Perlin noise used for generating.

Definition at line 32 of file EndGen.h.

int cEndGen::m_Seed
protected

Seed for the noise.

Definition at line 29 of file EndGen.h.


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