System manager for saving and accessing Images from external resources. More...
#include <ImageAssets.h>
Detailed Description
System manager for saving and accessing Images from external resources.
The ImageAssets is a singleton that allows the user to resuse saved Images from external Texture resources throughout their project.
Images 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 | ImageKey |
Static Public Member Functions | |
static void | Load (const ImageKey &Image_Map_Key, Texture *pTexture) |
Function saves a Image created from the desired texture. More... | |
static void | Load (const ImageKey &Image_Map_Key, Texture *pTexture, const Rect &Sub_Image_Rect) |
Function saves a Image created from the desired tecture. More... | |
static Image * | Get (const ImageKey &Image_Map_Key) |
Function returns Image pointer based off of the passed in key. More... | |
Member Typedef Documentation
typedef std::string ImageAssets::ImageKey |
Typedef of an std::string for an easier to read name.
Member Function Documentation
|
inlinestatic |
Function returns Image pointer based off of the passed in key.
This Get() function uses it's Image_Map_Key parameter to search the Image map and return the Image saved under the same key string.
- Parameters
-
Image_Map_Key An std::string for use as a key to access the stored Image
- Returns
- Pointer to Image at stored key
|
inlinestatic |
Function saves a Image created from the desired texture.
This Load() function creates and stores a Image pointer based off of the pTexture parameter. The Image_Map_Key parameter is a key string for access later when using the Get() command. This function grabs the entire texture as an image.
- Parameters
-
Image_Map_Key An std::string for use as a storage key pTexture A Texture pointer to grab the image from
|
inlinestatic |
Function saves a Image created from the desired tecture.
This Load() function creates and stores a Image pointer based off of the pTexture and Sub_Image_Rect parameters. The Image_Map_Key parameter is a key string for access later when using the Get() command. This function grabs a specific sub-image from the texture (based on the Sub_Image_Rect).
- Parameters
-
Image_Map_Key An std::string for use as a storage key pTexture A Texture pointer to grab the image from Sub_Image_Rect A rectangle to specify the sub-image to gram from the texture