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

Provides additional cNoise member and its helper functions. More...

#include <IntGen.h>

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

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

cNoise m_Noise
 

Private Types

using Super = cIntGen< SizeX, SizeZ >
 

Additional Inherited Members

- Public Types inherited from cIntGen< SizeX, SizeX >
using IntGenType = cIntGen< SizeX, SizeZ >
 
using Values = int[SizeX *SizeZ]
 Holds the array of values generated by this class (descendant). More...
 

Detailed Description

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

Provides additional cNoise member and its helper functions.

Definition at line 138 of file IntGen.h.

Member Typedef Documentation

◆ Super

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

Definition at line 141 of file IntGen.h.

Constructor & Destructor Documentation

◆ cIntGenWithNoise()

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

Definition at line 145 of file IntGen.h.

Member Function Documentation

◆ ChooseRandomOne() [1/2]

template<int SizeX, int SizeZ = SizeX>
int cIntGenWithNoise< SizeX, SizeZ >::ChooseRandomOne ( int  a_RndX,
int  a_RndZ,
int  a_Val1,
int  a_Val2 
)
inlineprotected

Chooses one of a_Val1 or a_Val2, based on m_Noise and the coordinates for querying the noise.

Definition at line 154 of file IntGen.h.

◆ ChooseRandomOne() [2/2]

template<int SizeX, int SizeZ = SizeX>
int cIntGenWithNoise< SizeX, SizeZ >::ChooseRandomOne ( int  a_RndX,
int  a_RndZ,
int  a_Val1,
int  a_Val2,
int  a_Val3,
int  a_Val4 
)
inlineprotected

Chooses one of a_ValN, based on m_Noise and the coordinates for querying the noise.

Definition at line 161 of file IntGen.h.

Member Data Documentation

◆ m_Noise

template<int SizeX, int SizeZ = SizeX>
cNoise cIntGenWithNoise< SizeX, SizeZ >::m_Noise
protected

Definition at line 151 of file IntGen.h.


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