xoreos
0.0.5
|
The mesh manager. More...
#include <meshman.h>
Public Member Functions | |
MeshManager () | |
~MeshManager () | |
void | init () |
Initialise mesh management, including default mesh creation. More... | |
void | deinit () |
Deinitialise mesh management subsystem. More... | |
void | cleanup () |
Remove any resource that has a usage count of zero. More... | |
void | addMesh (Mesh *mesh) |
Adds a mesh to be managed. More... | |
void | delMesh (Mesh *mesh) |
Forcibly remove the mesh from the map. More... | |
Mesh * | getMesh (const Common::UString &name) |
Returns a mesh with the given name, or zero if it does not exist. More... | |
Private Member Functions | |
std::map< Common::UString, Mesh * >::iterator | delResource (std::map< Common::UString, Mesh *>::iterator iter) |
Private Attributes | |
std::map< Common::UString, Mesh * > | _resourceMap |
Additional Inherited Members | |
Static Public Member Functions inherited from Common::Singleton< MeshManager > | |
static MeshManager & | instance () |
static void | destroy () |
Protected Types inherited from Common::Singleton< MeshManager > | |
typedef MeshManager | SingletonBaseType |
Protected Member Functions inherited from Common::Singleton< MeshManager > | |
Singleton () | |
virtual | ~Singleton () |
Graphics::Mesh::MeshManager::MeshManager | ( | ) |
Definition at line 39 of file meshman.cpp.
Graphics::Mesh::MeshManager::~MeshManager | ( | ) |
Definition at line 42 of file meshman.cpp.
References deinit().
void Graphics::Mesh::MeshManager::addMesh | ( | Mesh * | mesh | ) |
Adds a mesh to be managed.
Cleanup will delete the mesh if usage count is zero.
Definition at line 84 of file meshman.cpp.
References _resourceMap.
void Graphics::Mesh::MeshManager::cleanup | ( | ) |
Remove any resource that has a usage count of zero.
Definition at line 72 of file meshman.cpp.
References _resourceMap, and delResource().
void Graphics::Mesh::MeshManager::deinit | ( | ) |
Deinitialise mesh management subsystem.
Definition at line 65 of file meshman.cpp.
References _resourceMap.
Referenced by ~MeshManager().
void Graphics::Mesh::MeshManager::delMesh | ( | Mesh * | mesh | ) |
Forcibly remove the mesh from the map.
Consider using cleanup instead.
Definition at line 95 of file meshman.cpp.
References _resourceMap, and delResource().
|
private |
Definition at line 115 of file meshman.cpp.
References _resourceMap.
Referenced by cleanup(), and delMesh().
Mesh * Graphics::Mesh::MeshManager::getMesh | ( | const Common::UString & | name | ) |
Returns a mesh with the given name, or zero if it does not exist.
Definition at line 106 of file meshman.cpp.
References _resourceMap.
void Graphics::Mesh::MeshManager::init | ( | ) |
Initialise mesh management, including default mesh creation.
Definition at line 46 of file meshman.cpp.
References _resourceMap, Graphics::Mesh::Mesh::getName(), Graphics::Mesh::Mesh::init(), Graphics::Mesh::Mesh::setName(), and status().
|
private |