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

#include <Noise3DGenerator.h>

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

Public Member Functions

 cNoise3DComposable (int a_Seed)
 
void Initialize (cIniFile &a_IniFile)
 
- Public Member Functions inherited from cTerrainShapeGen
virtual ~cTerrainShapeGen ()
 

Protected Member Functions

void GenerateNoiseArrayIfNeeded (cChunkCoords a_ChunkCoords)
 Generates the 3D noise array used for terrain generation (m_NoiseArray), unless the LastChunk coords are equal to coords given. 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...
 

Protected Attributes

NOISE_DATATYPE m_AirThreshold
 
NOISE_DATATYPE m_BaseFrequencyX
 
NOISE_DATATYPE m_BaseFrequencyZ
 
cOctavedNoise< cInterpolNoise< Interp5Deg > > m_BaseNoise
 Heightmap-like noise used to provide variance for low-amplitude biomes. More...
 
NOISE_DATATYPE m_ChoiceFrequencyX
 
NOISE_DATATYPE m_ChoiceFrequencyY
 
NOISE_DATATYPE m_ChoiceFrequencyZ
 
cOctavedNoise< cInterpolNoise< Interp5Deg > > m_ChoiceNoise
 The 3D noise that is used to choose between density noise A and B. More...
 
cOctavedNoise< cInterpolNoise< Interp5Deg > > m_DensityNoiseA
 Density 3D noise, variant A. More...
 
cOctavedNoise< cInterpolNoise< Interp5Deg > > m_DensityNoiseB
 Density 3D noise, variant B. More...
 
NOISE_DATATYPE m_FrequencyX
 
NOISE_DATATYPE m_FrequencyY
 
NOISE_DATATYPE m_FrequencyZ
 
NOISE_DATATYPE m_HeightAmplification
 The main parameter of the generator, specifies the slope of the vertical linear gradient. More...
 
cChunkCoords m_LastChunkCoords
 
NOISE_DATATYPE m_MidPoint
 Where the vertical "center" of the noise should be, as block height. More...
 
NOISE_DATATYPE m_NoiseArray [17 *17 *257]
 

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...
 

Detailed Description

Definition at line 73 of file Noise3DGenerator.h.

Constructor & Destructor Documentation

◆ cNoise3DComposable()

cNoise3DComposable::cNoise3DComposable ( int  a_Seed)

Definition at line 350 of file Noise3DGenerator.cpp.

Member Function Documentation

◆ GenerateNoiseArrayIfNeeded()

void cNoise3DComposable::GenerateNoiseArrayIfNeeded ( cChunkCoords  a_ChunkCoords)
protected

Generates the 3D noise array used for terrain generation (m_NoiseArray), unless the LastChunk coords are equal to coords given.

Definition at line 427 of file Noise3DGenerator.cpp.

◆ GenShape()

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

Generates the shape for the given chunk.

Implements cTerrainShapeGen.

Definition at line 485 of file Noise3DGenerator.cpp.

◆ Initialize()

void cNoise3DComposable::Initialize ( cIniFile a_IniFile)

Definition at line 374 of file Noise3DGenerator.cpp.

◆ InitializeShapeGen()

virtual void cNoise3DComposable::InitializeShapeGen ( cIniFile a_IniFile)
inlineoverrideprotectedvirtual

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

Reimplemented from cTerrainShapeGen.

Definition at line 128 of file Noise3DGenerator.h.

Member Data Documentation

◆ m_AirThreshold

NOISE_DATATYPE cNoise3DComposable::m_AirThreshold
protected

Definition at line 116 of file Noise3DGenerator.h.

◆ m_BaseFrequencyX

NOISE_DATATYPE cNoise3DComposable::m_BaseFrequencyX
protected

Definition at line 107 of file Noise3DGenerator.h.

◆ m_BaseFrequencyZ

NOISE_DATATYPE cNoise3DComposable::m_BaseFrequencyZ
protected

Definition at line 108 of file Noise3DGenerator.h.

◆ m_BaseNoise

cOctavedNoise<cInterpolNoise<Interp5Deg> > cNoise3DComposable::m_BaseNoise
protected

Heightmap-like noise used to provide variance for low-amplitude biomes.

Definition at line 92 of file Noise3DGenerator.h.

◆ m_ChoiceFrequencyX

NOISE_DATATYPE cNoise3DComposable::m_ChoiceFrequencyX
protected

Definition at line 111 of file Noise3DGenerator.h.

◆ m_ChoiceFrequencyY

NOISE_DATATYPE cNoise3DComposable::m_ChoiceFrequencyY
protected

Definition at line 112 of file Noise3DGenerator.h.

◆ m_ChoiceFrequencyZ

NOISE_DATATYPE cNoise3DComposable::m_ChoiceFrequencyZ
protected

Definition at line 113 of file Noise3DGenerator.h.

◆ m_ChoiceNoise

cOctavedNoise<cInterpolNoise<Interp5Deg> > cNoise3DComposable::m_ChoiceNoise
protected

The 3D noise that is used to choose between density noise A and B.

Definition at line 83 of file Noise3DGenerator.h.

◆ m_DensityNoiseA

cOctavedNoise<cInterpolNoise<Interp5Deg> > cNoise3DComposable::m_DensityNoiseA
protected

Density 3D noise, variant A.

Definition at line 86 of file Noise3DGenerator.h.

◆ m_DensityNoiseB

cOctavedNoise<cInterpolNoise<Interp5Deg> > cNoise3DComposable::m_DensityNoiseB
protected

Density 3D noise, variant B.

Definition at line 89 of file Noise3DGenerator.h.

◆ m_FrequencyX

NOISE_DATATYPE cNoise3DComposable::m_FrequencyX
protected

Definition at line 102 of file Noise3DGenerator.h.

◆ m_FrequencyY

NOISE_DATATYPE cNoise3DComposable::m_FrequencyY
protected

Definition at line 103 of file Noise3DGenerator.h.

◆ m_FrequencyZ

NOISE_DATATYPE cNoise3DComposable::m_FrequencyZ
protected

Definition at line 104 of file Noise3DGenerator.h.

◆ m_HeightAmplification

NOISE_DATATYPE cNoise3DComposable::m_HeightAmplification
protected

The main parameter of the generator, specifies the slope of the vertical linear gradient.

A higher value means a steeper slope and a smaller total amplitude of the generated terrain.

Definition at line 96 of file Noise3DGenerator.h.

◆ m_LastChunkCoords

cChunkCoords cNoise3DComposable::m_LastChunkCoords
protected

Definition at line 119 of file Noise3DGenerator.h.

◆ m_MidPoint

NOISE_DATATYPE cNoise3DComposable::m_MidPoint
protected

Where the vertical "center" of the noise should be, as block height.

Definition at line 99 of file Noise3DGenerator.h.

◆ m_NoiseArray

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

Definition at line 120 of file Noise3DGenerator.h.


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