![]() |
Cuberite
A lightweight, fast and extensible game server for Minecraft
|
A single non-branching tunnel of a WormNestCave. More...
Public Member Functions | |
cCaveTunnel (int a_BlockStartX, int a_BlockStartY, int a_BlockStartZ, int a_StartRadius, int a_BlockEndX, int a_BlockEndY, int a_BlockEndZ, int a_EndRadius, cNoise &a_Noise) | |
void | ProcessChunk (int a_ChunkX, int a_ChunkZ, cChunkDef::BlockTypes &a_BlockTypes, cChunkDesc::BlockNibbleBytes &a_BlockMetas, cChunkDef::HeightMap &a_HeightMap) |
Carves the tunnel into the chunk specified. More... | |
Public Attributes | |
cCaveDefPoints | m_Points |
Private Member Functions | |
void | CalcBoundingBox (void) |
Calculates the bounding box of the points present. More... | |
void | FinishLinear (void) |
Linearly interpolates the points so that the maximum distance between two neighbors is max 1 block. More... | |
void | Randomize (cNoise &a_Noise) |
Generates the shaping defpoints for the cave, based on the cave block coords and noise. More... | |
bool | RefineDefPoints (const cCaveDefPoints &a_Src, cCaveDefPoints &a_Dst) |
Refines (adds and smooths) defpoints from a_Src into a_Dst; returns false if no refinement possible (segments too short) More... | |
void | Smooth (void) |
Does rounds of smoothing, two passes of RefineDefPoints(), as long as they return true. More... | |
Private Attributes | |
int | m_MaxBlockX |
int | m_MaxBlockY |
int | m_MaxBlockZ |
int | m_MinBlockX |
int | m_MinBlockY |
int | m_MinBlockZ |
cCaveTunnel::cCaveTunnel | ( | int | a_BlockStartX, |
int | a_BlockStartY, | ||
int | a_BlockStartZ, | ||
int | a_StartRadius, | ||
int | a_BlockEndX, | ||
int | a_BlockEndY, | ||
int | a_BlockEndZ, | ||
int | a_EndRadius, | ||
cNoise & | a_Noise | ||
) |
|
private |
|
private |
void cCaveTunnel::ProcessChunk | ( | int | a_ChunkX, |
int | a_ChunkZ, | ||
cChunkDef::BlockTypes & | a_BlockTypes, | ||
cChunkDesc::BlockNibbleBytes & | a_BlockMetas, | ||
cChunkDef::HeightMap & | a_HeightMap | ||
) |
|
private |
|
private |
|
private |
Does rounds of smoothing, two passes of RefineDefPoints(), as long as they return true.
cCaveDefPoints cCaveTunnel::m_Points |