#include <ModelManager.h>
|
static Model * | Get (std::string key) |
| Gets a model* using the given key. More...
|
|
static void | Load (std::string key, const char *path) |
| Loads. More...
|
|
static void | Load (std::string key, Model::PreMadeModels preFab) |
| Loads. More...
|
|
static void | LoadSpriteModel (std::string key) |
| Loads the default sprite model. More...
|
|
◆ MapKey
Defines an alias representing the map key.
◆ StorageMap
Defines an alias representing the storage map.
◆ ModelManager() [1/3]
ModelManager::ModelManager |
( |
| ) |
|
|
private |
◆ ModelManager() [2/3]
◆ ModelManager() [3/3]
◆ ~ModelManager()
ModelManager::~ModelManager |
( |
| ) |
|
|
privatedefault |
◆ Delete()
static void ModelManager::Delete |
( |
| ) |
|
|
inlinestaticprivate |
Deletes ModelManager's pointer instance. Only to be called by engine code.
◆ Get()
static Model * ModelManager::Get |
( |
std::string |
key | ) |
|
|
inlinestatic |
Gets a model* using the given key.
- Parameters
-
- Returns
- Assertion if it fails, else a pointer to a Model.
◆ Instance()
◆ Load() [1/2]
static void ModelManager::Load |
( |
std::string |
key, |
|
|
const char * |
path |
|
) |
| |
|
inlinestatic |
Loads.
- Parameters
-
key | The key. |
path | Partial pathname of the file. |
◆ Load() [2/2]
static void ModelManager::Load |
( |
std::string |
key, |
|
|
Model::PreMadeModels |
preFab |
|
) |
| |
|
inlinestatic |
Loads.
- Parameters
-
key | The key. |
preFab | The prefabricated model. Details in Model::PreMadeModels. |
◆ LoadSpriteModel()
static void ModelManager::LoadSpriteModel |
( |
std::string |
key | ) |
|
|
inlinestatic |
Loads the default sprite model.
- Parameters
-
key | A unique key to verify the sprite has not already been loaded. |
The model manager will load the default Sprite model unit box and store this within the model map. The key is used to ensure that two sprites are not loaded under the same name.
◆ operator=() [1/2]
◆ operator=() [2/2]
Move assignment operator.
◆ privDelete()
void ModelManager::privDelete |
( |
| ) |
|
|
private |
Delete's ModelManager's pointer instance. Only to be called internally.
◆ privGet()
Model * ModelManager::privGet |
( |
std::string |
key | ) |
|
|
private |
Priv get.
- Parameters
-
- Returns
- Assertion if it fails, else a pointer to a Model.
◆ privInitialize()
void ModelManager::privInitialize |
( |
| ) |
|
|
private |
Initializes the Model manager.
Takes care of asset loading that needs to occur outside of the constructor
◆ privLoad() [1/2]
void ModelManager::privLoad |
( |
std::string |
key, |
|
|
const char * |
path |
|
) |
| |
|
private |
Priv load.
- Parameters
-
key | The key. |
path | Partial pathname of the file. |
◆ privLoad() [2/2]
void ModelManager::privLoad |
( |
std::string |
key, |
|
|
Model::PreMadeModels |
preFab |
|
) |
| |
|
private |
Private load.
- Parameters
-
key | The key. |
preFab | The prefabricated model. |
There are three premade models offered by the Model manager. Their keys are: UnitSquareXY UnitBox_WF and UnitSphere
◆ privLoadSpriteModel()
void ModelManager::privLoadSpriteModel |
( |
std::string |
key | ) |
|
|
private |
Private load sprite model.
- Parameters
-
Internal process for loading the sprite box. Checks to ensure the sprite does not already exist and if not, loads the box into the map under the specified key.
◆ ModelManagerAttorney
◆ defaultPath
std::string ModelManager::defaultPath |
|
private |
The default path where Models are stored.
◆ modelMap
The map containing models specified by a string key.
◆ ptrInstance
The documentation for this class was generated from the following files: