Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | List of all members
cBioGenMulticache Class Reference

#include <BioGen.h>

Inheritance diagram for cBioGenMulticache:
Inheritance graph
[legend]
Collaboration diagram for cBioGenMulticache:
Collaboration graph
[legend]

Public Member Functions

 cBioGenMulticache (std::unique_ptr< cBiomeGen > a_BioGenToCache, size_t a_SubCacheSize, size_t a_NumSubCaches)
 
- Public Member Functions inherited from cBiomeGen
virtual ~cBiomeGen ()
 

Protected Member Functions

virtual void GenBiomes (cChunkCoords a_ChunkCoords, cChunkDef::BiomeMap &a_BiomeMap) override
 Generates biomes for the given chunk. More...
 
virtual void InitializeBiomeGen (cIniFile &a_IniFile) override
 Reads parameters from the ini file, prepares generator for use. More...
 

Protected Attributes

std::vector< std::unique_ptr< cBioGenCache > > m_Caches
 Individual sub-caches. More...
 
size_t m_NumSubCaches
 Number of sub-caches. More...
 
std::unique_ptr< cBiomeGenm_Underlying
 The underlying biome generator. More...
 

Private Types

using Super = cBiomeGen
 

Additional Inherited Members

- Static Public Member Functions inherited from cBiomeGen
static std::unique_ptr< cBiomeGenCreateBiomeGen (cIniFile &a_IniFile, int a_Seed, bool &a_CacheOffByDefault)
 Creates the correct BiomeGen descendant based on the ini file settings. More...
 

Detailed Description

Definition at line 90 of file BioGen.h.

Member Typedef Documentation

◆ Super

Definition at line 93 of file BioGen.h.

Constructor & Destructor Documentation

◆ cBioGenMulticache()

cBioGenMulticache::cBioGenMulticache ( std::unique_ptr< cBiomeGen a_BioGenToCache,
size_t  a_SubCacheSize,
size_t  a_NumSubCaches 
)

Definition at line 141 of file BioGen.cpp.

Member Function Documentation

◆ GenBiomes()

void cBioGenMulticache::GenBiomes ( cChunkCoords  a_ChunkCoords,
cChunkDef::BiomeMap a_BiomeMap 
)
overrideprotectedvirtual

Generates biomes for the given chunk.

Implements cBiomeGen.

Definition at line 156 of file BioGen.cpp.

◆ InitializeBiomeGen()

void cBioGenMulticache::InitializeBiomeGen ( cIniFile a_IniFile)
overrideprotectedvirtual

Reads parameters from the ini file, prepares generator for use.

Reimplemented from cBiomeGen.

Definition at line 168 of file BioGen.cpp.

Member Data Documentation

◆ m_Caches

std::vector<std::unique_ptr<cBioGenCache> > cBioGenMulticache::m_Caches
protected

Individual sub-caches.

Definition at line 108 of file BioGen.h.

◆ m_NumSubCaches

size_t cBioGenMulticache::m_NumSubCaches
protected

Number of sub-caches.

Pulled out of m_Caches.size() for faster access.

Definition at line 105 of file BioGen.h.

◆ m_Underlying

std::unique_ptr<cBiomeGen> cBioGenMulticache::m_Underlying
protected

The underlying biome generator.

Definition at line 111 of file BioGen.h.


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