Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Holds a cache of the last calculated integral noise values and interpolates between them en masse. More...
#include <InterpolNoise.h>
Public Member Functions | |
cInterpolCell3D (const cNoise &a_Noise, NOISE_DATATYPE *a_Array, int a_SizeX, int a_SizeY, int a_SizeZ, const NOISE_DATATYPE *a_FracX, const NOISE_DATATYPE *a_FracY, const NOISE_DATATYPE *a_FracZ) | |
void | Generate (int a_FromX, int a_ToX, int a_FromY, int a_ToY, int a_FromZ, int a_ToZ) |
Generates part of the output array using current m_WorkRnds[]. More... | |
void | InitWorkRnds (int a_FloorX, int a_FloorY, int a_FloorZ) |
Initializes m_WorkRnds[] with the specified Floor values. More... | |
void | Move (int a_NewFloorX, int a_NewFloorY, int a_NewFloorZ) |
Updates m_WorkRnds[] for the new Floor values. More... | |
Protected Types | |
typedef NOISE_DATATYPE | Workspace[2][2][2] |
Protected Attributes | |
NOISE_DATATYPE * | m_Array |
The output array where the noise is calculated. More... | |
int | m_CurFloorX |
The integral coords of the currently calculated WorkRnds[]. More... | |
int | m_CurFloorY |
int | m_CurFloorZ |
const NOISE_DATATYPE * | m_FracX |
Arrays holding the fractional values of the coords in each direction. More... | |
const NOISE_DATATYPE * | m_FracY |
const NOISE_DATATYPE * | m_FracZ |
const cNoise & | m_Noise |
The noise used for generating the values at integral coords. More... | |
int | m_SizeX |
Dimensions of the output array. More... | |
int | m_SizeY |
int | m_SizeZ |
Workspace * | m_WorkRnds |
The current random values; points to either m_Workspace1 or m_Workspace2 (doublebuffering) More... | |
Workspace | m_Workspace1 |
Buffer 1 for workspace doublebuffering, used in Move() More... | |
Workspace | m_Workspace2 |
Buffer 2 for workspace doublebuffering, used in Move() More... | |
Holds a cache of the last calculated integral noise values and interpolates between them en masse.
Provides a massive optimization for cInterpolNoise. Works by calculating multiple noise values (that have the same integral noise coords) at once. The underlying noise values needn't be recalculated for these values, only the interpolation is done within the unit cube.
Definition at line 156 of file InterpolNoise.h.
|
protected |
Definition at line 279 of file InterpolNoise.h.
|
inline |
a_Noise | Noise to use for generating the random values |
a_Array | Array to generate into [x + a_SizeX * y] |
a_SizeZ | Count of the array, in each direction |
a_FracX | Pointer to the array that stores the X fractional values |
a_FracY | Pointer to the attay that stores the Y fractional values |
a_FracZ | Pointer to the array that stores the Z fractional values |
Definition at line 159 of file InterpolNoise.h.
|
inline |
Generates part of the output array using current m_WorkRnds[].
Definition at line 184 of file InterpolNoise.h.
|
inline |
Initializes m_WorkRnds[] with the specified Floor values.
Definition at line 219 of file InterpolNoise.h.
|
inline |
Updates m_WorkRnds[] for the new Floor values.
Definition at line 236 of file InterpolNoise.h.
|
protected |
The output array where the noise is calculated.
Definition at line 297 of file InterpolNoise.h.
|
protected |
The integral coords of the currently calculated WorkRnds[].
Definition at line 294 of file InterpolNoise.h.
|
protected |
Definition at line 294 of file InterpolNoise.h.
|
protected |
Definition at line 294 of file InterpolNoise.h.
|
protected |
Arrays holding the fractional values of the coords in each direction.
Definition at line 303 of file InterpolNoise.h.
|
protected |
Definition at line 304 of file InterpolNoise.h.
|
protected |
Definition at line 305 of file InterpolNoise.h.
|
protected |
The noise used for generating the values at integral coords.
Definition at line 282 of file InterpolNoise.h.
|
protected |
Dimensions of the output array.
Definition at line 300 of file InterpolNoise.h.
|
protected |
Definition at line 300 of file InterpolNoise.h.
|
protected |
Definition at line 300 of file InterpolNoise.h.
|
protected |
The current random values; points to either m_Workspace1 or m_Workspace2 (doublebuffering)
Definition at line 285 of file InterpolNoise.h.
|
protected |
Buffer 1 for workspace doublebuffering, used in Move()
Definition at line 288 of file InterpolNoise.h.
|
protected |
Buffer 2 for workspace doublebuffering, used in Move()
Definition at line 291 of file InterpolNoise.h.