System manager for saving and accessing external model resources. More...
#include <ModelAssets.h>
Detailed Description
System manager for saving and accessing external model resources.
The ModelAssets is a singleton that allows the user to resuse saved external model resources throughout their project.
Models are saved via the Load() functions in the IonEngine::LoadResources() function. They can then be accessed by using the Get() functions and the associated key that the user defined upon loading.
Public Types | |
typedef std::string | ModelKey |
Static Public Member Functions | |
static void | Load (const ModelKey &Model_Map_Key, const char *Model_File_Path) |
Function saves a model created from the desired path. More... | |
static Model * | Get (const ModelKey &Model_Map_Key) |
Function returns model pointer based off of the passed in key. More... | |
Member Typedef Documentation
typedef std::string ModelAssets::ModelKey |
Typedef of an std::string for an easier to read name.
Member Function Documentation
|
inlinestatic |
Function returns model pointer based off of the passed in key.
This Get() function uses it's Model_Map_Key parameter to search the model map and return the model saved under the same key string.
- Parameters
-
Model_Map_Key An std::string for use as a key to access the stored Model
- Returns
- Pointer to Model at stored key
|
inlinestatic |
Function saves a model created from the desired path.
This Load() function creates and stores a model pointer based off of the Model_File_Path parameter. The Model_Map_Key parameter is a key string for access later when using the Get() command.
NOTE: The file paths start within the "Assets" directory of the root project directory
- Parameters
-
Model_Map_Key An std::string for use as a storage key Model_File_Path A char string to the file path (starting in the "Assets" directory)