Classes | |
| struct | ImageCache |
| A structure to hold the loaded images. More... | |
| struct | MarkerCache |
| A structure to hold the markers. More... | |
Public Member Functions | |
| VgMyTextureLoader (VgApplication::VgIApplication *pVgApplication, const std::string &pImageResourceDirectory) | |
| Constructor. | |
| virtual | ~VgMyTextureLoader () |
| VgEngine::VgRefPtr < VgEngine::VgITexture > | getTextureBuffer (const std::string &pImageName) |
| Returns a texture buffer. | |
| VgEngine::VgRefPtr < Vg3DModule::VgIconMarkerDescriptor > | getMarker (const std::string &pMarkerName) |
| Returns an icon marker. | |
| void | setImage (const std::string &pImageName, const std::string &pFilename) |
| Associates an image file with an identifier. | |
| void | setMarker (const std::string &pMarkerName, const std::string &pImageName) |
| Associates an icon marker with an image. | |
| void | resetImage (const std::string &pImageName) |
| Resets an image. | |
| void | resetImage (std::hash_map< std::string, ImageCache >::iterator pImageIter) |
| void | resetMarker (const std::string &pType) |
| Resets a marker. | |
| void | resetMarker (std::hash_map< std::string, MarkerCache >::iterator pMarkerIter) |
| bool | isImageSet (const std::string &pImageName) const |
| Tells whether an image with the provided name has been set. | |
| bool | isMarkerSet (const std::string &pMarkerName) const |
| Tells whether a marker with the provided name has been set. | |
Public Attributes | |
| std::hash_map< std::string, ImageCache > | mImageCache |
| The map of image textures. | |
| std::hash_map< std::string, MarkerCache > | mMarkerCache |
| The markers map. | |
Protected Attributes | |
| VgApplication::VgIApplication * | mVgApplication |
| The VgApplication instance this texture loader was created for. | |
| std::string | mImageResourceDirectory |
| The path of the image resource directory. | |
| VgMyTextureLoader::VgMyTextureLoader | ( | VgApplication::VgIApplication * | pVgApplication, |
| const std::string & | pImageResourceDirectory | ||
| ) |
Constructor.
| VgApplication | pointer |
| Path | to image, the path ends with "/" |
| virtual VgMyTextureLoader::~VgMyTextureLoader | ( | ) | [virtual] |
| VgEngine::VgRefPtr< Vg3DModule::VgIconMarkerDescriptor > VgMyTextureLoader::getMarker | ( | const std::string & | pMarkerName ) |
Returns an icon marker.
If it has not been loaded, it loads it. NULL if an error occurs.
| pMarkerName | The name of the marker to retrieve. |
| VgEngine::VgRefPtr< VgEngine::VgITexture > VgMyTextureLoader::getTextureBuffer | ( | const std::string & | pImageName ) |
Returns a texture buffer.
If it has not been loaded, it loads it. NULL if an error occurs.
| pImageName | The name of the texture to retrieve. |
| bool VgMyTextureLoader::isImageSet | ( | const std::string & | pImageName ) | const |
Tells whether an image with the provided name has been set.
| pImageName | The identifier to test. |
| bool VgMyTextureLoader::isMarkerSet | ( | const std::string & | pMarkerName ) | const |
Tells whether a marker with the provided name has been set.
| pMarkerName | The identifier to test. |
| void VgMyTextureLoader::resetImage | ( | const std::string & | pImageName ) |
Resets an image.
| The | identifier of the image to reset. |
| void VgMyTextureLoader::resetImage | ( | std::hash_map< std::string, ImageCache >::iterator | pImageIter ) |
| void VgMyTextureLoader::resetMarker | ( | std::hash_map< std::string, MarkerCache >::iterator | pMarkerIter ) |
| void VgMyTextureLoader::resetMarker | ( | const std::string & | pType ) |
Resets a marker.
| The | identifier of the marker to reset. |
| void VgMyTextureLoader::setImage | ( | const std::string & | pImageName, |
| const std::string & | pFilename | ||
| ) |
Associates an image file with an identifier.
| pImageName | The image identifier. |
| pFilename | The path of the file to load. |
| void VgMyTextureLoader::setMarker | ( | const std::string & | pMarkerName, |
| const std::string & | pImageName | ||
| ) |
Associates an icon marker with an image.
| pMarkerName | The identifier of the marker to associate with the image. |
| pImageName | The identifier of the image to associate with the marker. |
| std::hash_map<std::string, ImageCache> VgMyTextureLoader::mImageCache |
The map of image textures.
std::string VgMyTextureLoader::mImageResourceDirectory [protected] |
The path of the image resource directory.
| std::hash_map<std::string, MarkerCache> VgMyTextureLoader::mMarkerCache |
The markers map.
VgApplication::VgIApplication* VgMyTextureLoader::mVgApplication [protected] |
The VgApplication instance this texture loader was created for.