Wraith  0.1.5
Basic 3D game engine in C++
ModelManager Class Reference

Manager for models. For loading models and accessing them within user defined games object More...

#include <ModelManager.h>

Collaboration diagram for ModelManager:
Collaboration graph

Public Types

enum class  DefaultModel { SPRITE }
 Values that represent default models. More...
 

Static Public Member Functions

static void SetDefaultPath (const std::string &defaultPath)
 Sets default file path to access model files. More...
 
static void LoadModelAndAssignKey (const std::string &fileName, const MapKey &key)
 Loads model from azul file and assigns a user define key. More...
 
static void LoadModelAndAssignKey (const Model::PreMadeModels preMadeModel, const MapKey &key)
 Loads model a premade model and assigns it to a user define key. More...
 
static Model * GetDefaultModel (DefaultModel defaultModel)
 Gets a default preloaded model. More...
 
static Model * GetModel (const MapKey &key)
 Gets a model with user defined key. More...
 

Private Types

typedef std::string MapKey
 
typedef std::map< MapKey, Model * > ModelMap
 

Private Member Functions

 ModelManager (const ModelManager &)=delete
 
ModelManageroperator= (const ModelManager &)=delete
 
 ModelManager (const ModelManager &&)=delete
 
ModelManageroperator= (ModelManager &&)=delete
 
void loadDefaultModels ()
 
void privSetDefaultPath (const std::string &defaultPath)
 
void privLoadModelAndAssignKey (const Model::PreMadeModels, const MapKey &key)
 
void privLoadModelAndAssignKey (const std::string &fileName, const MapKey &key)
 
bool hasKeyBeenAssigned (const MapKey &key) const
 
void printKeyAssignedErrorAndTerminate (const MapKey &key) const
 
bool isFilePathValid (const std::string &fileName) const
 
void printFileNameErrorAndTerminate (const std::string &fileName) const
 
void printModelLoadedSuccessfully (const Model::PreMadeModels &preMadeModel) const
 
void printModelLoadedSuccessfully (const std::string &fileName) const
 
Model * getModel (const MapKey &key) const
 
Model * getDefaultModel (DefaultModel) const
 
Model * tryToGetModel (const MapKey &key) const
 
MapKey getDefaultModelKey (DefaultModel) const
 
void deleteAllModels ()
 

Static Private Member Functions

static ModelManagerGetInstance ()
 
static void Delete ()
 
static void DebugPrint (const std::string &message)
 
template<typename ... Args>
static void DebugPrintf (const char *format, Args... args)
 

Private Attributes

std::string _defaultPath
 
ModelMap _modelStorageMap
 

Static Private Attributes

static ModelManagerpModelManagerInstance = nullptr
 
static const std::string DEBUG_TITLE_MESSAGE = "ModelManager_DEBUG: "
 

Friends

class ModelManagerAttorney
 

Detailed Description

Manager for models. For loading models and accessing them within user defined games object


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