MeshProcessor Class Reference

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

Inheritance diagram for MeshProcessor:

Inheritance graph
[legend]
Collaboration diagram for MeshProcessor:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MeshProcessor (AssetGroup *parent)
 Constructor.
 ~MeshProcessor ()
 Deconstructor.
IAnimatedMesh * getMesh (const std::string &fileName)
 Gets the mesh 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 MeshProcessor.

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

Definition at line 30 of file MeshProcessor.h.


Constructor & Destructor Documentation

MeshProcessor::MeshProcessor ( AssetGroup parent  ) 

Constructor.

Definition at line 23 of file MeshProcessor.cpp.

MeshProcessor::~MeshProcessor (  ) 

Deconstructor.

Definition at line 29 of file MeshProcessor.cpp.


Member Function Documentation

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

Creates a new MeshProcessor.

Note:
For internal use only!

Definition at line 222 of file MeshProcessor.cpp.

IAnimatedMesh * MeshProcessor::getMesh ( const std::string &  fileName  ) 

Gets the mesh with the given filename.

Parameters:
fileName Filename of the mesh.

Definition at line 35 of file MeshProcessor.cpp.

bool MeshProcessor::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 MeshProcessor.cpp.

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

Loads all assets.

Reimplemented from AssetProcessor.

Definition at line 88 of file MeshProcessor.cpp.

bool MeshProcessor::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 MeshProcessor.cpp.

void MeshProcessor::reloadAssets (  )  [virtual]

Reloads all assets.

Reimplemented from AssetProcessor.

Definition at line 155 of file MeshProcessor.cpp.

bool MeshProcessor::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 MeshProcessor.cpp.

void MeshProcessor::removeAssets (  )  [virtual]

Removes all assets.

Reimplemented from AssetProcessor.

Definition at line 196 of file MeshProcessor.cpp.


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

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