flimEngine
TerrainManager Class Reference

Manager for terrains. More...

#include <TerrainManager.h>

Collaboration diagram for TerrainManager:
Collaboration graph

Static Public Member Functions

static errcode LoadTerrain (std::string key, const char *heightMapPath, const char *texturePath="grid", float _sideLength=100.0f, float _maxHeight=10.0f, float _zeroAltitude=0.0f, float U=30.0f, float V=30.0f)
 Loads a Terrain. More...
 
static errcode GetTerrain (FlimTerrain *&output, std::string key)
 Gets a terrain. More...
 
static errcode UnloadTerrains ()
 Unload Terrains. More...
 

Private Member Functions

 TerrainManager ()=default
 
 TerrainManager (const TerrainManager &)=default
 
const TerrainManageroperator= (const TerrainManager &)=delete
 
 ~TerrainManager ()
 
errcode privLoadTerrain (std::string key, const char *heightMapPath, const char *texturePath="grid", float _sideLength=100.0f, float _maxHeight=10.0f, float _zeroAltitude=0.0f, float U=30.0f, float V=30.0f)
 
errcode privGetTerrain (FlimTerrain *&output, std::string key)
 
errcode privUnloadTerrains ()
 

Static Private Member Functions

static TerrainManagerInstance ()
 

Private Attributes

std::map< std::string, FlimTerrain * > TerrainPool
 
const std::string defaultPath = "Terrains/"
 

Static Private Attributes

static TerrainManagerinstance = nullptr
 

Detailed Description

Manager for terrains.

Author
Jack Campbell
Date
6/1/2017

Constructor & Destructor Documentation

◆ TerrainManager() [1/2]

TerrainManager::TerrainManager ( )
privatedefault

◆ TerrainManager() [2/2]

TerrainManager::TerrainManager ( const TerrainManager )
privatedefault

◆ ~TerrainManager()

TerrainManager::~TerrainManager ( )
private

Member Function Documentation

◆ Instance()

static TerrainManager& TerrainManager::Instance ( )
inlinestaticprivate

◆ operator=()

const TerrainManager& TerrainManager::operator= ( const TerrainManager )
privatedelete

◆ privGetTerrain()

errcode TerrainManager::privGetTerrain ( FlimTerrain *&  output,
std::string  key 
)
private

◆ privLoadTerrain()

errcode TerrainManager::privLoadTerrain ( std::string  key,
const char *  heightMapPath,
const char *  texturePath = "grid",
float  _sideLength = 100.0f,
float  _maxHeight = 10.0f,
float  _zeroAltitude = 0.0f,
float  U = 30.0f,
float  V = 30.0f 
)
private

◆ privUnloadTerrains()

errcode TerrainManager::privUnloadTerrains ( )
private

Member Data Documentation

◆ defaultPath

const std::string TerrainManager::defaultPath = "Terrains/"
private

◆ instance

TerrainManager * TerrainManager::instance = nullptr
staticprivate

◆ TerrainPool

std::map<std::string, FlimTerrain*> TerrainManager::TerrainPool
private

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