Manages the loading, retrieval, and deletion of Model objects.
More...
#include <ModelManager.h>
|
static Model * | Get (const std::string &key) |
| Retrieves a Model object by its key (private implementation).
|
|
static void | Load (const std::string &key, const Model::PreMadeModels model) |
| Loads a pre-made Model object (private implementation).
|
|
static void | Load (const std::string &key, const std::string &path) |
| Loads a Model object from a file path (private implementation).
|
|
static void | Load (const std::string &key, int planeSize, int u, int v) |
| Loads a Model object with specified parameters (private implementation).
|
|
|
static const std::string | defaultSpriteModelKey = AssetDefaults::DefaultModelSpriteKey |
| Default key for sprite models.
|
|
|
| ModelManager (const ModelManager &)=delete |
|
ModelManager & | operator= (const ModelManager &)=delete |
|
void | privDelete () |
|
Model * | privGet (const std::string &key) |
|
void | privLoad (const std::string &key, const Model::PreMadeModels model) |
|
void | privLoad (const std::string &key, const std::string &path) |
|
void | privLoad (const std::string &key, int planeSize, int u, int v) |
|
|
static ModelManager & | Instance () |
|
static void | Delete () |
| Deletes all managed Model objects and the singleton instance.
|
|
|
const std::string | DefaultPath |
| Default path for loading models.
|
|
std::map< std::string, Model * > | storageMap |
| Map storing Model objects associated with their keys.
|
|
|
class | ModelManagerAttorney |
|
Manages the loading, retrieval, and deletion of Model objects.
The ModelManager class is responsible for managing Model objects, including loading models from various sources, retrieving models by key, and deleting all managed models. It follows the Singleton design pattern.
◆ Get()
static Model * ModelManager::Get |
( |
const std::string & | key | ) |
|
|
inlinestatic |
Retrieves a Model object by its key (private implementation).
- Parameters
-
key | The key associated with the Model object. |
- Returns
- A pointer to the Model object, or nullptr if the key is not found.
◆ Load() [1/3]
static void ModelManager::Load |
( |
const std::string & | key, |
|
|
const Model::PreMadeModels | model ) |
|
inlinestatic |
Loads a pre-made Model object (private implementation).
- Parameters
-
key | The key to associate with the Model object. |
model | The pre-made model to load. |
◆ Load() [2/3]
static void ModelManager::Load |
( |
const std::string & | key, |
|
|
const std::string & | path ) |
|
inlinestatic |
Loads a Model object from a file path (private implementation).
- Parameters
-
key | The key to associate with the Model object. |
path | The file path to load the model from. |
◆ Load() [3/3]
static void ModelManager::Load |
( |
const std::string & | key, |
|
|
int | planeSize, |
|
|
int | u, |
|
|
int | v ) |
|
inlinestatic |
Loads a Model object with specified parameters (private implementation).
- Parameters
-
key | The key to associate with the Model object. |
planeSize | The size of the plane. |
u | The U parameter. |
v | The V parameter. |
The documentation for this class was generated from the following files: