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

Replaces random values of the underlying data with random integers in the specified range [Min . More...

#include <ProtIntGen.h>

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

Public Member Functions

 cProtIntGenRndChoice (int a_Seed, int a_ChancePct, int a_Min, int a_Range, Underlying a_Underlying)
 
virtual void GetInts (int a_MinX, int a_MinZ, size_t a_SizeX, size_t a_SizeZ, int *a_Values) override
 Generates the array of specified size into a_Values, based on given min coords. More...
 
- Public Member Functions inherited from cProtIntGenWithNoise
 cProtIntGenWithNoise (int a_Seed)
 
- Public Member Functions inherited from cProtIntGen
virtual ~cProtIntGen ()
 Force a virtual destructor in all descendants. More...
 

Protected Attributes

int m_ChancePct
 
int m_Min
 
int m_Range
 
Underlying m_Underlying
 
- Protected Attributes inherited from cProtIntGenWithNoise
cNoise m_Noise
 

Private Types

typedef cProtIntGenWithNoise super
 

Additional Inherited Members

- Public Types inherited from cProtIntGen
typedef std::shared_ptr< cProtIntGenUnderlying
 Type of the generic interface used for storing links to the underlying generators. More...
 
- Protected Member Functions inherited from cProtIntGenWithNoise
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...
 
- Static Protected Attributes inherited from cProtIntGen
static const int m_BufferSize = PROT_INT_BUFFER_SIZE
 Maximum size of the generated area. More...
 

Detailed Description

Replaces random values of the underlying data with random integers in the specified range [Min .

. Min + Range).

Definition at line 473 of file ProtIntGen.h.

Member Typedef Documentation

Definition at line 476 of file ProtIntGen.h.

Constructor & Destructor Documentation

cProtIntGenRndChoice::cProtIntGenRndChoice ( int  a_Seed,
int  a_ChancePct,
int  a_Min,
int  a_Range,
Underlying  a_Underlying 
)
inline

Definition at line 479 of file ProtIntGen.h.

Member Function Documentation

virtual void cProtIntGenRndChoice::GetInts ( int  a_MinX,
int  a_MinZ,
size_t  a_SizeX,
size_t  a_SizeZ,
int *  a_Values 
)
inlineoverridevirtual

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

Implements cProtIntGen.

Definition at line 489 of file ProtIntGen.h.

Member Data Documentation

int cProtIntGenRndChoice::m_ChancePct
protected

Definition at line 509 of file ProtIntGen.h.

int cProtIntGenRndChoice::m_Min
protected

Definition at line 510 of file ProtIntGen.h.

int cProtIntGenRndChoice::m_Range
protected

Definition at line 511 of file ProtIntGen.h.

Underlying cProtIntGenRndChoice::m_Underlying
protected

Definition at line 512 of file ProtIntGen.h.


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