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

Public Member Functions

 cCubicCell2D (const cNoise &a_Noise, NOISE_DATATYPE *a_Array, int a_SizeX, int a_SizeY, const NOISE_DATATYPE *a_FracX, const NOISE_DATATYPE *a_FracY)
 
void Generate (int a_FromX, int a_ToX, int a_FromY, int a_ToY)
 Uses current m_WorkRnds[] to generate part of the array. More...
 
void InitWorkRnds (int a_FloorX, int a_FloorY)
 Initializes m_WorkRnds[] with the specified Floor values. More...
 
void Move (int a_NewFloorX, int a_NewFloorY)
 Updates m_WorkRnds[] for the new Floor values. More...
 

Protected Types

typedef NOISE_DATATYPE Workspace[4][4]
 

Protected Attributes

NOISE_DATATYPEm_Array
 
int m_CurFloorX
 
int m_CurFloorY
 
const NOISE_DATATYPEm_FracX
 
const NOISE_DATATYPEm_FracY
 
const cNoisem_Noise
 
int m_SizeX
 
int m_SizeY
 
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 196 of file Noise.cpp.

Member Typedef Documentation

◆ Workspace

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

Definition at line 220 of file Noise.cpp.

Constructor & Destructor Documentation

◆ cCubicCell2D()

cCubicCell2D::cCubicCell2D ( const cNoise a_Noise,
NOISE_DATATYPE a_Array,
int  a_SizeX,
int  a_SizeY,
const NOISE_DATATYPE a_FracX,
const NOISE_DATATYPE a_FracY 
)
Parameters
a_NoiseNoise to use for generating the random values
a_ArrayArray to generate into [x + a_SizeX * y]
a_SizeYCount 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

Definition at line 240 of file Noise.cpp.

Member Function Documentation

◆ Generate()

void cCubicCell2D::Generate ( int  a_FromX,
int  a_ToX,
int  a_FromY,
int  a_ToY 
)

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

Definition at line 263 of file Noise.cpp.

◆ InitWorkRnds()

void cCubicCell2D::InitWorkRnds ( int  a_FloorX,
int  a_FloorY 
)

Initializes m_WorkRnds[] with the specified Floor values.

Definition at line 288 of file Noise.cpp.

◆ Move()

void cCubicCell2D::Move ( int  a_NewFloorX,
int  a_NewFloorY 
)

Updates m_WorkRnds[] for the new Floor values.

Definition at line 307 of file Noise.cpp.

Member Data Documentation

◆ m_Array

NOISE_DATATYPE* cCubicCell2D::m_Array
protected

Definition at line 230 of file Noise.cpp.

◆ m_CurFloorX

int cCubicCell2D::m_CurFloorX
protected

Definition at line 227 of file Noise.cpp.

◆ m_CurFloorY

int cCubicCell2D::m_CurFloorY
protected

Definition at line 228 of file Noise.cpp.

◆ m_FracX

const NOISE_DATATYPE* cCubicCell2D::m_FracX
protected

Definition at line 232 of file Noise.cpp.

◆ m_FracY

const NOISE_DATATYPE* cCubicCell2D::m_FracY
protected

Definition at line 233 of file Noise.cpp.

◆ m_Noise

const cNoise& cCubicCell2D::m_Noise
protected

Definition at line 222 of file Noise.cpp.

◆ m_SizeX

int cCubicCell2D::m_SizeX
protected

Definition at line 231 of file Noise.cpp.

◆ m_SizeY

int cCubicCell2D::m_SizeY
protected

Definition at line 231 of file Noise.cpp.

◆ m_WorkRnds

Workspace* cCubicCell2D::m_WorkRnds
protected

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

Definition at line 224 of file Noise.cpp.

◆ m_Workspace1

Workspace cCubicCell2D::m_Workspace1
protected

Buffer 1 for workspace doublebuffering, used in Move()

Definition at line 225 of file Noise.cpp.

◆ m_Workspace2

Workspace cCubicCell2D::m_Workspace2
protected

Buffer 2 for workspace doublebuffering, used in Move()

Definition at line 226 of file Noise.cpp.


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