Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Protected Attributes | Private Types | List of all members
cIntGenLandOcean< SizeX, SizeZ > Class Template Reference

Decides between the ocean and landmass biomes. More...

#include <IntGen.h>

Inheritance diagram for cIntGenLandOcean< SizeX, SizeZ >:
Inheritance graph
[legend]
Collaboration diagram for cIntGenLandOcean< SizeX, SizeZ >:
Collaboration graph
[legend]

Public Member Functions

 cIntGenLandOcean (int a_Seed, int a_Threshold)
 
virtual void GetInts (int a_MinX, int a_MinZ, typename Super::Values &a_Values) override
 Generates the array of templated size into a_Values, based on given min coords. More...
 
- Public Member Functions inherited from cIntGenWithNoise< SizeX, SizeX >
 cIntGenWithNoise (int a_Seed)
 
- Public Member Functions inherited from cIntGen< SizeX, SizeZ >
virtual ~cIntGen ()
 Force a virtual destructor in all descendants. More...
 

Protected Attributes

int m_Threshold
 
- Protected Attributes inherited from cIntGenWithNoise< SizeX, SizeX >
cNoise m_Noise
 

Private Types

using Super = cIntGenWithNoise< SizeX, SizeZ >
 

Additional Inherited Members

- Public Types inherited from cIntGen< SizeX, SizeZ >
using IntGenType = cIntGen< SizeX, SizeZ >
 
using Values = int[SizeX *SizeZ]
 Holds the array of values generated by this class (descendant). More...
 
- Protected Member Functions inherited from cIntGenWithNoise< SizeX, SizeX >
int ChooseRandomOne (int a_RndX, int a_RndZ, int a_Val1, int a_Val2)
 Chooses one of a_Val1 or a_Val2, based on m_Noise and the coordinates for querying the noise. More...
 
int ChooseRandomOne (int a_RndX, int a_RndZ, int a_Val1, int a_Val2, int a_Val3, int a_Val4)
 Chooses one of a_ValN, based on m_Noise and the coordinates for querying the noise. More...
 

Detailed Description

template<int SizeX, int SizeZ = SizeX>
class cIntGenLandOcean< SizeX, SizeZ >

Decides between the ocean and landmass biomes.

Has a threshold (in percent) of how much land, the larger the threshold, the more land. Generates 0 for ocean, biome group ID for landmass.

Definition at line 214 of file IntGen.h.

Member Typedef Documentation

◆ Super

template<int SizeX, int SizeZ = SizeX>
using cIntGenLandOcean< SizeX, SizeZ >::Super = cIntGenWithNoise<SizeX, SizeZ>
private

Definition at line 217 of file IntGen.h.

Constructor & Destructor Documentation

◆ cIntGenLandOcean()

template<int SizeX, int SizeZ = SizeX>
cIntGenLandOcean< SizeX, SizeZ >::cIntGenLandOcean ( int  a_Seed,
int  a_Threshold 
)
inline

Definition at line 221 of file IntGen.h.

Member Function Documentation

◆ GetInts()

template<int SizeX, int SizeZ = SizeX>
virtual void cIntGenLandOcean< SizeX, SizeZ >::GetInts ( int  a_MinX,
int  a_MinZ,
typename Super::Values a_Values 
)
inlineoverridevirtual

Generates the array of templated size into a_Values, based on given min coords.

Implements cIntGen< SizeX, SizeZ >.

Definition at line 228 of file IntGen.h.

Member Data Documentation

◆ m_Threshold

template<int SizeX, int SizeZ = SizeX>
int cIntGenLandOcean< SizeX, SizeZ >::m_Threshold
protected

Definition at line 248 of file IntGen.h.


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