TextureProcessor Class Reference

AssetProcessor for processing textures in an AssetGroup. In order to properly reload a texture from an asset group the class that uses the texture needs to implement a event method for the "textures/<filename>" event. When the texture is reloaded a event will be emitted to the appropriate slot with the new texture as the parameter. See SceneComponent::onTexture or ImageComponent::onTexture for an example. More...

Inheritance diagram for TextureProcessor:

Inheritance graph
[legend]
Collaboration diagram for TextureProcessor:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 TextureProcessor (AssetGroup *parent)
 Constructor.
 ~TextureProcessor ()
 Deconstructor.
ITexture * getTexture (const std::string &fileName)
 Gets the texture with the given filename.
bool reloadAsset (const std::string &fileName)
 Reloads the asset with the given filename.
void reloadAssets ()
 Reloads all assets.
bool removeAsset (const std::string &fileName)
 Removes the asset with the given filename.
void removeAssets ()
 Removes all assets.

Static Public Member Functions

static AssetProcessorcreateProcessor (AssetGroup *parent)
 Creates a new TextureProcessor.

Protected Member Functions

bool loadAsset (const std::string &fileName)
 Loads the asset with the given filename.
void loadAssets ()
 Loads all assets.


Detailed Description

AssetProcessor for processing textures in an AssetGroup. In order to properly reload a texture from an asset group the class that uses the texture needs to implement a event method for the "textures/<filename>" event. When the texture is reloaded a event will be emitted to the appropriate slot with the new texture as the parameter. See SceneComponent::onTexture or ImageComponent::onTexture for an example.

Definition at line 30 of file TextureProcessor.h.


Constructor & Destructor Documentation

TextureProcessor::TextureProcessor ( AssetGroup parent  ) 

Constructor.

Definition at line 23 of file TextureProcessor.cpp.

TextureProcessor::~TextureProcessor (  ) 

Deconstructor.

Definition at line 29 of file TextureProcessor.cpp.


Member Function Documentation

AssetProcessor * TextureProcessor::createProcessor ( AssetGroup parent  )  [static]

Creates a new TextureProcessor.

Note:
For internal use only!

Definition at line 222 of file TextureProcessor.cpp.

ITexture * TextureProcessor::getTexture ( const std::string &  fileName  ) 

Gets the texture with the given filename.

Parameters:
fileName Filename of the texture.

Definition at line 35 of file TextureProcessor.cpp.

bool TextureProcessor::loadAsset ( const std::string &  fileName  )  [protected, virtual]

Loads the asset with the given filename.

Parameters:
fileName Filename of the asset.
Returns:
True on succesful loading, false otherwise.

Reimplemented from AssetProcessor.

Definition at line 46 of file TextureProcessor.cpp.

void TextureProcessor::loadAssets (  )  [protected, virtual]

Loads all assets.

Reimplemented from AssetProcessor.

Definition at line 88 of file TextureProcessor.cpp.

bool TextureProcessor::reloadAsset ( const std::string &  fileName  )  [virtual]

Reloads the asset with the given filename.

Parameters:
fileName Filename of the asset.
Returns:
True on succesful removal, false otherwise.

Reimplemented from AssetProcessor.

Definition at line 142 of file TextureProcessor.cpp.

void TextureProcessor::reloadAssets (  )  [virtual]

Reloads all assets.

Reimplemented from AssetProcessor.

Definition at line 155 of file TextureProcessor.cpp.

bool TextureProcessor::removeAsset ( const std::string &  fileName  )  [virtual]

Removes the asset with the given filename.

Parameters:
fileName Filename of the asset.
Returns:
True on succesful removal, false otherwise.

Reimplemented from AssetProcessor.

Definition at line 166 of file TextureProcessor.cpp.

void TextureProcessor::removeAssets (  )  [virtual]

Removes all assets.

Reimplemented from AssetProcessor.

Definition at line 196 of file TextureProcessor.cpp.


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

Generated on Fri Aug 21 23:55:18 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8