Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Protected Types | Protected Attributes | List of all members
cCubicCell3D Class Reference
Collaboration diagram for cCubicCell3D:
Collaboration graph
[legend]

Public Member Functions

 cCubicCell3D (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)
 Uses current m_WorkRnds[] to generate part of the array. 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[4][4][4]
 

Protected Attributes

NOISE_DATATYPEm_Array
 
int m_CurFloorX
 
int m_CurFloorY
 
int m_CurFloorZ
 
const NOISE_DATATYPEm_FracX
 
const NOISE_DATATYPEm_FracY
 
const NOISE_DATATYPEm_FracZ
 
const cNoisem_Noise
 
int m_SizeX
 
int m_SizeY
 
int m_SizeZ
 
Workspacem_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...
 

Detailed Description

Definition at line 347 of file Noise.cpp.

Member Typedef Documentation

◆ Workspace

typedef NOISE_DATATYPE cCubicCell3D::Workspace[4][4][4]
protected

Definition at line 373 of file Noise.cpp.

Constructor & Destructor Documentation

◆ cCubicCell3D()

cCubicCell3D::cCubicCell3D ( 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 
)
Parameters
a_NoiseNoise to use for generating the random values
a_ArrayArray to generate into [x + a_SizeX * y]
a_SizeZCount of the array, in each direction
a_FracXPointer to the array that stores the X fractional values
a_FracYPointer to the attay that stores the Y fractional values
a_FracZPointer to the array that stores the Z fractional values

Definition at line 395 of file Noise.cpp.

Member Function Documentation

◆ Generate()

void cCubicCell3D::Generate ( int  a_FromX,
int  a_ToX,
int  a_FromY,
int  a_ToY,
int  a_FromZ,
int  a_ToZ 
)

Uses current m_WorkRnds[] to generate part of the array.

Definition at line 422 of file Noise.cpp.

◆ InitWorkRnds()

void cCubicCell3D::InitWorkRnds ( int  a_FloorX,
int  a_FloorY,
int  a_FloorZ 
)

Initializes m_WorkRnds[] with the specified Floor values.

Definition at line 461 of file Noise.cpp.

◆ Move()

void cCubicCell3D::Move ( int  a_NewFloorX,
int  a_NewFloorY,
int  a_NewFloorZ 
)

Updates m_WorkRnds[] for the new Floor values.

Definition at line 485 of file Noise.cpp.

Member Data Documentation

◆ m_Array

NOISE_DATATYPE* cCubicCell3D::m_Array
protected

Definition at line 384 of file Noise.cpp.

◆ m_CurFloorX

int cCubicCell3D::m_CurFloorX
protected

Definition at line 380 of file Noise.cpp.

◆ m_CurFloorY

int cCubicCell3D::m_CurFloorY
protected

Definition at line 381 of file Noise.cpp.

◆ m_CurFloorZ

int cCubicCell3D::m_CurFloorZ
protected

Definition at line 382 of file Noise.cpp.

◆ m_FracX

const NOISE_DATATYPE* cCubicCell3D::m_FracX
protected

Definition at line 386 of file Noise.cpp.

◆ m_FracY

const NOISE_DATATYPE* cCubicCell3D::m_FracY
protected

Definition at line 387 of file Noise.cpp.

◆ m_FracZ

const NOISE_DATATYPE* cCubicCell3D::m_FracZ
protected

Definition at line 388 of file Noise.cpp.

◆ m_Noise

const cNoise& cCubicCell3D::m_Noise
protected

Definition at line 375 of file Noise.cpp.

◆ m_SizeX

int cCubicCell3D::m_SizeX
protected

Definition at line 385 of file Noise.cpp.

◆ m_SizeY

int cCubicCell3D::m_SizeY
protected

Definition at line 385 of file Noise.cpp.

◆ m_SizeZ

int cCubicCell3D::m_SizeZ
protected

Definition at line 385 of file Noise.cpp.

◆ m_WorkRnds

Workspace* cCubicCell3D::m_WorkRnds
protected

The current random values; points to either m_Workspace1 or m_Workspace2 (doublebuffering)

Definition at line 377 of file Noise.cpp.

◆ m_Workspace1

Workspace cCubicCell3D::m_Workspace1
protected

Buffer 1 for workspace doublebuffering, used in Move()

Definition at line 378 of file Noise.cpp.

◆ m_Workspace2

Workspace cCubicCell3D::m_Workspace2
protected

Buffer 2 for workspace doublebuffering, used in Move()

Definition at line 379 of file Noise.cpp.


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