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 ~cTerrainShapeGen ()
 
- Public Member Functions inherited from cTerrainCompositionGen
virtual void InitializeCompoGen (cIniFile &a_IniFile)
 Reads parameters from the ini file, prepares generator for use. More...
 
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 InitializeShapeGen (cIniFile &a_IniFile) override
 Reads parameters from the ini file, prepares generator for use. More...
 
void PrepareState (cChunkCoords a_ChunkCoords)
 Unless the LastChunk coords are equal to coords given, prepares the internal state (noise array) More...
 

Protected Attributes

int m_IslandThickness
 
int m_IslandYOffset
 
cChunkCoords m_LastChunkCoords
 
NOISE_DATATYPE m_MainIslandFrequencyX
 
NOISE_DATATYPE m_MainIslandFrequencyY
 
NOISE_DATATYPE m_MainIslandFrequencyZ
 
NOISE_DATATYPE m_MainIslandMinThreshold
 
int m_MainIslandSize
 
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...
 
NOISE_DATATYPE m_SmallIslandFrequencyX
 
NOISE_DATATYPE m_SmallIslandFrequencyY
 
NOISE_DATATYPE m_SmallIslandFrequencyZ
 
NOISE_DATATYPE m_SmallIslandMinThreshold
 

Additional Inherited Members

- Static Public Member Functions inherited from cTerrainShapeGen
static std::unique_ptr< cTerrainShapeGenCreateShapeGen (cIniFile &a_IniFile, cBiomeGen &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 std::unique_ptr< cTerrainCompositionGenCreateCompositionGen (cIniFile &a_IniFile, cBiomeGen &a_BiomeGen, cTerrainShapeGen &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::cEndGen ( int  a_Seed)

Definition at line 35 of file EndGen.cpp.

Member Function Documentation

◆ ComposeTerrain()

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 180 of file EndGen.cpp.

◆ GenerateNoiseArray()

void cEndGen::GenerateNoiseArray ( void  )
protected

Generates the m_NoiseArray array for the current chunk.

Definition at line 98 of file EndGen.cpp.

◆ GenShape()

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

Generates the shape for the given chunk.

Implements cTerrainShapeGen.

Definition at line 140 of file EndGen.cpp.

◆ InitializeShapeGen()

void cEndGen::InitializeShapeGen ( cIniFile a_IniFile)
overrideprotectedvirtual

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

Reimplemented from cTerrainShapeGen.

Definition at line 60 of file EndGen.cpp.

◆ PrepareState()

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 82 of file EndGen.cpp.

Member Data Documentation

◆ m_IslandThickness

int cEndGen::m_IslandThickness
protected

Definition at line 36 of file EndGen.h.

◆ m_IslandYOffset

int cEndGen::m_IslandYOffset
protected

Definition at line 37 of file EndGen.h.

◆ m_LastChunkCoords

cChunkCoords cEndGen::m_LastChunkCoords
protected

Definition at line 53 of file EndGen.h.

◆ m_MainIslandFrequencyX

NOISE_DATATYPE cEndGen::m_MainIslandFrequencyX
protected

Definition at line 40 of file EndGen.h.

◆ m_MainIslandFrequencyY

NOISE_DATATYPE cEndGen::m_MainIslandFrequencyY
protected

Definition at line 41 of file EndGen.h.

◆ m_MainIslandFrequencyZ

NOISE_DATATYPE cEndGen::m_MainIslandFrequencyZ
protected

Definition at line 42 of file EndGen.h.

◆ m_MainIslandMinThreshold

NOISE_DATATYPE cEndGen::m_MainIslandMinThreshold
protected

Definition at line 43 of file EndGen.h.

◆ m_MainIslandSize

int cEndGen::m_MainIslandSize
protected

Definition at line 35 of file EndGen.h.

◆ m_NoiseArray

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

Definition at line 54 of file EndGen.h.

◆ m_Perlin

cPerlinNoise cEndGen::m_Perlin
protected

The Perlin noise used for generating.

Definition at line 32 of file EndGen.h.

◆ m_Seed

int cEndGen::m_Seed
protected

Seed for the noise.

Definition at line 29 of file EndGen.h.

◆ m_SmallIslandFrequencyX

NOISE_DATATYPE cEndGen::m_SmallIslandFrequencyX
protected

Definition at line 46 of file EndGen.h.

◆ m_SmallIslandFrequencyY

NOISE_DATATYPE cEndGen::m_SmallIslandFrequencyY
protected

Definition at line 47 of file EndGen.h.

◆ m_SmallIslandFrequencyZ

NOISE_DATATYPE cEndGen::m_SmallIslandFrequencyZ
protected

Definition at line 48 of file EndGen.h.

◆ m_SmallIslandMinThreshold

NOISE_DATATYPE cEndGen::m_SmallIslandMinThreshold
protected

Definition at line 49 of file EndGen.h.


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