Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Protected Attributes | List of all members
cRidgedNoise< N > Class Template Reference

#include <RidgedNoise.h>

Public Member Functions

 cRidgedNoise (int a_Seed)
 Creates a new instance with the specified seed. More...
 
 cRidgedNoise (void)
 Creates a new instance with the seed set to 0. More...
 
void Generate2D (NOISE_DATATYPE *a_Array, int a_SizeX, int a_SizeY, NOISE_DATATYPE a_StartX, NOISE_DATATYPE a_EndX, NOISE_DATATYPE a_StartY, NOISE_DATATYPE a_EndY) const
 Fills a 2D array with the values of the noise. More...
 
void Generate3D (NOISE_DATATYPE *a_Array, int a_SizeX, int a_SizeY, int a_SizeZ, NOISE_DATATYPE a_StartX, NOISE_DATATYPE a_EndX, NOISE_DATATYPE a_StartY, NOISE_DATATYPE a_EndY, NOISE_DATATYPE a_StartZ, NOISE_DATATYPE a_EndZ) const
 Fills a 3D array with the values of the noise. More...
 
void SetSeed (int a_Seed)
 Sets the seed for the underlying noise. More...
 

Protected Attributes

m_Noise
 

Detailed Description

template<typename N>
class cRidgedNoise< N >

Definition at line 17 of file RidgedNoise.h.

Constructor & Destructor Documentation

◆ cRidgedNoise() [1/2]

template<typename N >
cRidgedNoise< N >::cRidgedNoise ( void  )
inline

Creates a new instance with the seed set to 0.

Definition at line 21 of file RidgedNoise.h.

◆ cRidgedNoise() [2/2]

template<typename N >
cRidgedNoise< N >::cRidgedNoise ( int  a_Seed)
inline

Creates a new instance with the specified seed.

Definition at line 28 of file RidgedNoise.h.

Member Function Documentation

◆ Generate2D()

template<typename N >
void cRidgedNoise< N >::Generate2D ( NOISE_DATATYPE a_Array,
int  a_SizeX,
int  a_SizeY,
NOISE_DATATYPE  a_StartX,
NOISE_DATATYPE  a_EndX,
NOISE_DATATYPE  a_StartY,
NOISE_DATATYPE  a_EndY 
) const
inline

Fills a 2D array with the values of the noise.

Parameters
a_ArrayArray to generate into [x + a_SizeX * y]
a_SizeYCount of the array, in each direction
a_EndXNoise-space coords of the array in the X direction
a_EndYNoise-space coords of the array in the Y direction

Definition at line 42 of file RidgedNoise.h.

◆ Generate3D()

template<typename N >
void cRidgedNoise< N >::Generate3D ( NOISE_DATATYPE a_Array,
int  a_SizeX,
int  a_SizeY,
int  a_SizeZ,
NOISE_DATATYPE  a_StartX,
NOISE_DATATYPE  a_EndX,
NOISE_DATATYPE  a_StartY,
NOISE_DATATYPE  a_EndY,
NOISE_DATATYPE  a_StartZ,
NOISE_DATATYPE  a_EndZ 
) const
inline

Fills a 3D array with the values of the noise.

Parameters
a_ArrayArray to generate into [x + a_SizeX * y + a_SizeX * a_SizeY * z]
a_SizeZCount of the array, in each direction
a_EndXNoise-space coords of the array in the X direction
a_EndYNoise-space coords of the array in the Y direction
a_EndZNoise-space coords of the array in the Z direction

Definition at line 63 of file RidgedNoise.h.

◆ SetSeed()

template<typename N >
void cRidgedNoise< N >::SetSeed ( int  a_Seed)
inline

Sets the seed for the underlying noise.

Definition at line 35 of file RidgedNoise.h.

Member Data Documentation

◆ m_Noise

template<typename N >
N cRidgedNoise< N >::m_Noise
protected

Definition at line 85 of file RidgedNoise.h.


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