Slippers Engine
 
Loading...
Searching...
No Matches
TerrainObjectManager Class Reference

Singleton responisble for loading and retrieving TerrainObjects. For more Terrain Tools go to Scene. More...

#include <TerrainObjectManager.h>

Collaboration diagram for TerrainObjectManager:
Collaboration graph

Static Public Member Functions

static void LoadTerrainObject (const MapKey &key, std::string TerrainMap, int len, int maxHeight, int minHeight, std::string TextureName, int us, int vs)
 Load Terrain.
 
static Terrain * GetTerrainObject (const MapKey &key)
 Returns terrain pointer with given KEY.
 

Private Types

using MapKey = std::string
 KEYS stored as STRINGS.
 

Detailed Description

Singleton responisble for loading and retrieving TerrainObjects. For more Terrain Tools go to Scene.

Member Typedef Documentation

◆ MapKey

using TerrainObjectManager::MapKey = std::string
private

KEYS stored as STRINGS.

Member Function Documentation

◆ GetTerrainObject()

static Terrain * TerrainObjectManager::GetTerrainObject ( const MapKey & key)
static

Returns terrain pointer with given KEY.

A function that returns a terrain pointer based on a user generated key. Checks if key already exists.

Parameters
key
Returns
Terrain*

◆ LoadTerrainObject()

static void TerrainObjectManager::LoadTerrainObject ( const MapKey & key,
std::string TerrainMap,
int len,
int maxHeight,
int minHeight,
std::string TextureName,
int us,
int vs )
static

Load Terrain.

A function callable in SlippersResources/LoadResources that takes in a String as a key for retrieval, as well as other parameters to generate a Terrain. Checks for repeated key use.

Warning
Requires a black and white uncompressed texture centered on the top left corner for the height map.
Parameters
key
TerrainMap
len
maxHeight
minHeight
TextureName
us
vs