HeightmapProcessor Class Reference

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

Inheritance diagram for HeightmapProcessor:

Inheritance graph
[legend]
Collaboration diagram for HeightmapProcessor:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 HeightmapProcessor (AssetGroup *parent)
 Constructor.
 ~HeightmapProcessor ()
 Deconstructor.
IReadFile * getHeightMap (const std::string &fileName)
 Gets the heightmap 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 HeightmapProcessor.

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 heightmaps in an AssetGroup. In order to properly reload a heightmap from an asset group the class that uses the heightmap needs to implement a event method for the "heightmaps/<filename>" event. When the heightmaps is reloaded a event will be emitted to the appropriate slot with the new heightmap as the parameter. See TerrainComponent::onHeightMap.

Definition at line 30 of file HeightmapProcessor.h.


Constructor & Destructor Documentation

HeightmapProcessor::HeightmapProcessor ( AssetGroup parent  ) 

Constructor.

Definition at line 23 of file HeightmapProcessor.cpp.

HeightmapProcessor::~HeightmapProcessor (  ) 

Deconstructor.

Definition at line 29 of file HeightmapProcessor.cpp.


Member Function Documentation

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

Creates a new HeightmapProcessor.

Note:
For internal use only!

Definition at line 245 of file HeightmapProcessor.cpp.

IReadFile * HeightmapProcessor::getHeightMap ( const std::string &  fileName  ) 

Gets the heightmap with the given filename.

Parameters:
fileName Filename of the heightmap.
Note:
Don't forget to drop the file as soon as you're done with it.

Definition at line 35 of file HeightmapProcessor.cpp.

bool HeightmapProcessor::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 53 of file HeightmapProcessor.cpp.

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

Loads all assets.

Reimplemented from AssetProcessor.

Definition at line 103 of file HeightmapProcessor.cpp.

bool HeightmapProcessor::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 165 of file HeightmapProcessor.cpp.

void HeightmapProcessor::reloadAssets (  )  [virtual]

Reloads all assets.

Reimplemented from AssetProcessor.

Definition at line 178 of file HeightmapProcessor.cpp.

bool HeightmapProcessor::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 189 of file HeightmapProcessor.cpp.

void HeightmapProcessor::removeAssets (  )  [virtual]

Removes all assets.

Reimplemented from AssetProcessor.

Definition at line 219 of file HeightmapProcessor.cpp.


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

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