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

Classes

struct  sRavineDefPoint
 

Public Member Functions

 cRoughRavine (int a_Seed, size_t a_Size, float a_CenterWidth, float a_Roughness, float a_FloorHeightEdge1, float a_FloorHeightEdge2, float a_FloorHeightCenter, float a_CeilingHeightEdge1, float a_CeilingHeightEdge2, float a_CeilingHeightCenter, int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ)
 
- Public Member Functions inherited from cGridStructGen::cStructure
 cStructure (int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ)
 Creates a structure that has its origin set at the specified coords. More...
 
virtual size_t GetCacheCost (void) const
 Returns the cost of keeping this structure in the cache. More...
 
virtual ~cStructure ()
 

Protected Types

using sRavineDefPoints = std::vector< sRavineDefPoint >
 

Protected Member Functions

virtual void DrawIntoChunk (cChunkDesc &a_ChunkDesc) override
 Draws self into the specified chunk. More...
 
void InitPerHeightRadius (int a_GridX, int a_GridZ)
 
void SubdivideLine (size_t a_Idx1, size_t a_Idx2)
 Recursively subdivides the line between the points of the specified index. More...
 

Protected Attributes

sRavineDefPoints m_DefPoints
 
int m_MaxSize
 
cNoise m_Noise
 
float m_PerHeightRadius [cChunkDef::Height]
 Number to add to the radius based on the height. More...
 
float m_Roughness
 
int m_Seed
 

Private Types

using Super = cGridStructGen::cStructure
 

Additional Inherited Members

- Public Attributes inherited from cGridStructGen::cStructure
int m_GridX
 The grid point for which the structure is generated. More...
 
int m_GridZ
 
int m_OriginX
 The origin (the coords for which the structure is generated) More...
 
int m_OriginZ
 

Detailed Description

Definition at line 18 of file RoughRavines.cpp.

Member Typedef Documentation

◆ sRavineDefPoints

using cRoughRavine::sRavineDefPoints = std::vector<sRavineDefPoint>
protected

Definition at line 76 of file RoughRavines.cpp.

◆ Super

Definition at line 21 of file RoughRavines.cpp.

Constructor & Destructor Documentation

◆ cRoughRavine()

cRoughRavine::cRoughRavine ( int  a_Seed,
size_t  a_Size,
float  a_CenterWidth,
float  a_Roughness,
float  a_FloorHeightEdge1,
float  a_FloorHeightEdge2,
float  a_FloorHeightCenter,
float  a_CeilingHeightEdge1,
float  a_CeilingHeightEdge2,
float  a_CeilingHeightCenter,
int  a_GridX,
int  a_GridZ,
int  a_OriginX,
int  a_OriginZ 
)
inline

Definition at line 25 of file RoughRavines.cpp.

Member Function Documentation

◆ DrawIntoChunk()

virtual void cRoughRavine::DrawIntoChunk ( cChunkDesc a_ChunkDesc)
inlineoverrideprotectedvirtual

Draws self into the specified chunk.

Implements cGridStructGen::cStructure.

Definition at line 157 of file RoughRavines.cpp.

◆ InitPerHeightRadius()

void cRoughRavine::InitPerHeightRadius ( int  a_GridX,
int  a_GridZ 
)
inlineprotected

Definition at line 134 of file RoughRavines.cpp.

◆ SubdivideLine()

void cRoughRavine::SubdivideLine ( size_t  a_Idx1,
size_t  a_Idx2 
)
inlineprotected

Recursively subdivides the line between the points of the specified index.

Sets the midpoint to the center of the line plus or minus a random offset, then calls itself for each half of the new line.

Definition at line 95 of file RoughRavines.cpp.

Member Data Documentation

◆ m_DefPoints

sRavineDefPoints cRoughRavine::m_DefPoints
protected

Definition at line 84 of file RoughRavines.cpp.

◆ m_MaxSize

int cRoughRavine::m_MaxSize
protected

Definition at line 82 of file RoughRavines.cpp.

◆ m_Noise

cNoise cRoughRavine::m_Noise
protected

Definition at line 80 of file RoughRavines.cpp.

◆ m_PerHeightRadius

float cRoughRavine::m_PerHeightRadius[cChunkDef::Height]
protected

Number to add to the radius based on the height.

This creates the "ledges" in the ravine walls.

Definition at line 89 of file RoughRavines.cpp.

◆ m_Roughness

float cRoughRavine::m_Roughness
protected

Definition at line 86 of file RoughRavines.cpp.

◆ m_Seed

int cRoughRavine::m_Seed
protected

Definition at line 78 of file RoughRavines.cpp.


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