Botcraft 1.21.4
Loading...
Searching...
No Matches
Botcraft::Biome Class Reference

#include <Biome.hpp>

Public Member Functions

 Biome (const std::string &name_, const float temperature_, const float rainfall_, const BiomeType biome_type_)
 
 ~Biome ()
 
const std::string & GetName () const
 
unsigned int GetColorMultiplier (const int height, const bool is_grass) const
 
unsigned int GetWaterColorMultiplier () const
 

Private Member Functions

unsigned int ComputeColorTriangle (const int height, const bool is_grass) const
 

Private Attributes

std::string name
 
float temperature
 
float rainfall
 
unsigned int default_grass
 
unsigned int default_leaves
 
BiomeType biome_type
 

Detailed Description

Definition at line 25 of file Biome.hpp.

Constructor & Destructor Documentation

◆ Biome()

Botcraft::Biome::Biome ( const std::string &  name_,
const float  temperature_,
const float  rainfall_,
const BiomeType  biome_type_ 
)

◆ ~Biome()

Botcraft::Biome::~Biome ( )

Definition at line 31 of file Biome.cpp.

Member Function Documentation

◆ ComputeColorTriangle()

unsigned int Botcraft::Biome::ComputeColorTriangle ( const int  height,
const bool  is_grass 
) const
private

Definition at line 127 of file Biome.cpp.

References rainfall, and temperature.

Referenced by Biome(), and GetColorMultiplier().

◆ GetColorMultiplier()

unsigned int Botcraft::Biome::GetColorMultiplier ( const int  height,
const bool  is_grass 
) const

◆ GetName()

const std::string & Botcraft::Biome::GetName ( ) const

Definition at line 35 of file Biome.cpp.

References name.

◆ GetWaterColorMultiplier()

unsigned int Botcraft::Biome::GetWaterColorMultiplier ( ) const

Member Data Documentation

◆ biome_type

BiomeType Botcraft::Biome::biome_type
private

Definition at line 49 of file Biome.hpp.

Referenced by Biome(), GetColorMultiplier(), and GetWaterColorMultiplier().

◆ default_grass

unsigned int Botcraft::Biome::default_grass
private

Definition at line 47 of file Biome.hpp.

Referenced by Biome(), and GetColorMultiplier().

◆ default_leaves

unsigned int Botcraft::Biome::default_leaves
private

Definition at line 48 of file Biome.hpp.

Referenced by Biome(), and GetColorMultiplier().

◆ name

std::string Botcraft::Biome::name
private

Definition at line 44 of file Biome.hpp.

Referenced by Biome(), and GetName().

◆ rainfall

float Botcraft::Biome::rainfall
private

Definition at line 46 of file Biome.hpp.

Referenced by Biome(), and ComputeColorTriangle().

◆ temperature

float Botcraft::Biome::temperature
private

Definition at line 45 of file Biome.hpp.

Referenced by Biome(), and ComputeColorTriangle().


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