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

Public Member Functions

 cRavine (int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, int a_Size, cNoise &a_Noise)
 
AString ExportAsSVG (int a_Color, int a_OffsetX=0, int a_OffsetZ=0) const
 Exports itself as a SVG line definition. More...
 
- 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 Member Functions

virtual void DrawIntoChunk (cChunkDesc &a_ChunkDesc) override
 Draws self into the specified chunk. More...
 

Private Types

using Super = cGridStructGen::cStructure
 

Private Member Functions

void FinishLinear (void)
 Linearly interpolates the points so that the maximum distance between two neighbors is max 1 block. More...
 
void GenerateBaseDefPoints (int a_BlockX, int a_BlockZ, int a_Size, cNoise &a_Noise)
 Generates the shaping defpoints for the ravine, based on the ravine block coords and noise. More...
 
void RefineDefPoints (const cRavDefPoints &a_Src, cRavDefPoints &a_Dst)
 Refines (adds and smooths) defpoints from a_Src into a_Dst. More...
 
void Smooth (void)
 Does one round of smoothing, two passes of RefineDefPoints() More...
 

Private Attributes

cRavDefPoints m_Points
 

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 42 of file Ravines.cpp.

Member Typedef Documentation

◆ Super

Definition at line 45 of file Ravines.cpp.

Constructor & Destructor Documentation

◆ cRavine()

cStructGenRavines::cRavine::cRavine ( int  a_GridX,
int  a_GridZ,
int  a_OriginX,
int  a_OriginZ,
int  a_Size,
cNoise a_Noise 
)

Definition at line 105 of file Ravines.cpp.

Member Function Documentation

◆ DrawIntoChunk()

void cStructGenRavines::cRavine::DrawIntoChunk ( cChunkDesc a_ChunkDesc)
overrideprotectedvirtual

Draws self into the specified chunk.

Implements cGridStructGen::cStructure.

Definition at line 326 of file Ravines.cpp.

◆ ExportAsSVG()

AString cStructGenRavines::cRavine::ExportAsSVG ( int  a_Color,
int  a_OffsetX = 0,
int  a_OffsetZ = 0 
) const

Exports itself as a SVG line definition.

Definition at line 281 of file Ravines.cpp.

◆ FinishLinear()

void cStructGenRavines::cRavine::FinishLinear ( void  )
private

Linearly interpolates the points so that the maximum distance between two neighbors is max 1 block.

Definition at line 230 of file Ravines.cpp.

◆ GenerateBaseDefPoints()

void cStructGenRavines::cRavine::GenerateBaseDefPoints ( int  a_BlockX,
int  a_BlockZ,
int  a_Size,
cNoise a_Noise 
)
private

Generates the shaping defpoints for the ravine, based on the ravine block coords and noise.

Definition at line 123 of file Ravines.cpp.

◆ RefineDefPoints()

void cStructGenRavines::cRavine::RefineDefPoints ( const cRavDefPoints a_Src,
cRavDefPoints a_Dst 
)
private

Refines (adds and smooths) defpoints from a_Src into a_Dst.

Definition at line 170 of file Ravines.cpp.

◆ Smooth()

void cStructGenRavines::cRavine::Smooth ( void  )
private

Does one round of smoothing, two passes of RefineDefPoints()

Definition at line 219 of file Ravines.cpp.

Member Data Documentation

◆ m_Points

cRavDefPoints cStructGenRavines::cRavine::m_Points
private

Definition at line 47 of file Ravines.cpp.


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