Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
BiomeGenOriginal Class Referencefinal

#include <mg_biome.h>

+ Inheritance diagram for BiomeGenOriginal:
+ Collaboration diagram for BiomeGenOriginal:

Public Member Functions

 BiomeGenOriginal (BiomeManager *biomemgr, const BiomeParamsOriginal *params, v3s16 chunksize)
 
virtual ~BiomeGenOriginal ()
 
BiomeGenType getType () const
 
BiomeGenclone (BiomeManager *biomemgr) const
 
float calcHeatAtPoint (v3s16 pos) const
 
float calcHumidityAtPoint (v3s16 pos) const
 
BiomecalcBiomeAtPoint (v3s16 pos) const
 
void calcBiomeNoise (v3s16 pmin)
 
biome_tgetBiomes (s16 *heightmap, v3s16 pmin)
 
BiomegetBiomeAtPoint (v3s16 pos) const
 
BiomegetBiomeAtIndex (size_t index, v3s16 pos) const
 
BiomecalcBiomeFromNoise (float heat, float humidity, v3s16 pos) const
 
s16 getNextTransitionY (s16 y) const
 
- Public Member Functions inherited from BiomeGen
virtual ~BiomeGen ()=default
 
void assertChunkSize (v3s16 expect) const
 

Public Attributes

float * heatmap
 
float * humidmap
 
- Public Attributes inherited from BiomeGen
biome_tbiomemap = nullptr
 

Private Attributes

const BiomeParamsOriginalm_params
 
Noisenoise_heat
 
Noisenoise_humidity
 
Noisenoise_heat_blend
 
Noisenoise_humidity_blend
 
std::vector< s16 > m_transitions_y
 

Additional Inherited Members

- Protected Attributes inherited from BiomeGen
BiomeManagerm_bmgr = nullptr
 
v3s16 m_pmin
 
v3s16 m_csize
 

Constructor & Destructor Documentation

◆ BiomeGenOriginal()

BiomeGenOriginal::BiomeGenOriginal ( BiomeManager * biomemgr,
const BiomeParamsOriginal * params,
v3s16 chunksize )

References BiomeGen::biomemap, ObjDefManager::getNumObjects(), ObjDefManager::getRaw(), heatmap, humidmap, BiomeGen::m_bmgr, BiomeGen::m_csize, m_params, m_transitions_y, Biome::max_pos, Biome::min_pos, noise_heat, noise_heat_blend, noise_humidity, noise_humidity_blend, BiomeParamsOriginal::np_heat, BiomeParamsOriginal::np_heat_blend, BiomeParamsOriginal::np_humidity, BiomeParamsOriginal::np_humidity_blend, Noise::result, and BiomeParams::seed.

Referenced by clone().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~BiomeGenOriginal()

BiomeGenOriginal::~BiomeGenOriginal ( )
virtual

Member Function Documentation

◆ calcBiomeAtPoint()

Biome * BiomeGenOriginal::calcBiomeAtPoint ( v3s16 pos) const
virtual

Implements BiomeGen.

References calcBiomeFromNoise(), calcHeatAtPoint(), and calcHumidityAtPoint().

+ Here is the call graph for this function:

◆ calcBiomeFromNoise()

Biome * BiomeGenOriginal::calcBiomeFromNoise ( float heat,
float humidity,
v3s16 pos ) const

References BIOME_NONE, ObjDefManager::getNumObjects(), ObjDefManager::getRaw(), Biome::heat_point, Biome::humidity_point, BiomeGen::m_bmgr, Biome::max_pos, Biome::min_pos, PcgRandom::range(), and Biome::vertical_blend.

Referenced by calcBiomeAtPoint(), getBiomeAtIndex(), and getBiomes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calcBiomeNoise()

void BiomeGenOriginal::calcBiomeNoise ( v3s16 pmin)
virtual

Implements BiomeGen.

References BiomeGen::m_csize, BiomeGen::m_pmin, noise_heat, noise_heat_blend, noise_humidity, noise_humidity_blend, Noise::perlinMap2D(), and Noise::result.

Referenced by MapgenValleys::makeChunk().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calcHeatAtPoint()

float BiomeGenOriginal::calcHeatAtPoint ( v3s16 pos) const

References m_params, NoisePerlin2D(), BiomeParamsOriginal::np_heat, BiomeParamsOriginal::np_heat_blend, and BiomeParams::seed.

Referenced by calcBiomeAtPoint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calcHumidityAtPoint()

float BiomeGenOriginal::calcHumidityAtPoint ( v3s16 pos) const

References m_params, NoisePerlin2D(), BiomeParamsOriginal::np_humidity, BiomeParamsOriginal::np_humidity_blend, and BiomeParams::seed.

Referenced by calcBiomeAtPoint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clone()

BiomeGen * BiomeGenOriginal::clone ( BiomeManager * biomemgr) const
virtual

Implements BiomeGen.

References BiomeGenOriginal(), BiomeGen::m_csize, and m_params.

+ Here is the call graph for this function:

◆ getBiomeAtIndex()

Biome * BiomeGenOriginal::getBiomeAtIndex ( size_t index,
v3s16 pos ) const
virtual

Implements BiomeGen.

References calcBiomeFromNoise(), noise_heat, noise_humidity, and Noise::result.

Referenced by getBiomeAtPoint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBiomeAtPoint()

Biome * BiomeGenOriginal::getBiomeAtPoint ( v3s16 pos) const
virtual

Implements BiomeGen.

References getBiomeAtIndex(), BiomeGen::m_csize, and BiomeGen::m_pmin.

+ Here is the call graph for this function:

◆ getBiomes()

biome_t * BiomeGenOriginal::getBiomes ( s16 * heightmap,
v3s16 pmin )
virtual

Implements BiomeGen.

References BiomeGen::biomemap, calcBiomeFromNoise(), ObjDef::index, BiomeGen::m_csize, noise_heat, noise_humidity, and Noise::result.

+ Here is the call graph for this function:

◆ getNextTransitionY()

s16 BiomeGenOriginal::getNextTransitionY ( s16 y) const
virtual

Reimplemented from BiomeGen.

References m_transitions_y, and S16_MIN.

◆ getType()

BiomeGenType BiomeGenOriginal::getType ( ) const
inlinevirtual

Implements BiomeGen.

References BIOMEGEN_ORIGINAL.

Member Data Documentation

◆ heatmap

float* BiomeGenOriginal::heatmap

◆ humidmap

float* BiomeGenOriginal::humidmap

◆ m_params

const BiomeParamsOriginal* BiomeGenOriginal::m_params
private

◆ m_transitions_y

std::vector<s16> BiomeGenOriginal::m_transitions_y
private

◆ noise_heat

Noise* BiomeGenOriginal::noise_heat
private

◆ noise_heat_blend

Noise* BiomeGenOriginal::noise_heat_blend
private

◆ noise_humidity

Noise* BiomeGenOriginal::noise_humidity
private

◆ noise_humidity_blend

Noise* BiomeGenOriginal::noise_humidity_blend
private

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