This manager handles the storage, generation, and query of of Graphics Meshes. More...
#include <meshmanager.h>
Public Types | |
typedef MeshContainer::const_iterator | ConstMeshIterator |
Const Iterator type for Mesh instances stored in this class. | |
typedef std::map< String, Mesh * > | MeshContainer |
Basic container type for Mesh storage in this class. | |
typedef MeshContainer::iterator | MeshIterator |
Iterator type for Mesh instances stored in this class. | |
Public Types inherited from Mezzanine::ManagerBase | |
enum | ManagerType { MT_Undefined = 0, MT_AudioManager = 1, MT_AnimationManager = 2, MT_CollisionShapeManager = 3, MT_CompositorManager = 4, MT_GraphicsManager = 5, MT_EventManager = 6, MT_InputManager = 7, MT_LogManager = 8, MT_MaterialManager = 9, MT_MeshManager = 10, MT_NetworkManager = 11, MT_ResourceManager = 12, MT_ScriptingManager = 13, MT_TextureManager = 14, MT_UIManager = 15, MT_ActorManager = 101, MT_AreaEffectManager = 102, MT_DebrisManager = 103, MT_PagingManager = 104, MT_PhysicsManager = 105, MT_SceneManager = 106, MT_SoundScapeManager = 107, MT_TerrainManager = 108, MT_VehicleManager = 109, MT_UserCreated = 512 } |
A listing of Manager Types. More... | |
Public Member Functions | |
MeshManager () | |
Class constructor. | |
MeshManager (const XML::Node &XMLNode) | |
XML constructor. More... | |
virtual | ~MeshManager () |
Class destructor. | |
Ogre::MeshManager * | _GetInternalManager () const |
Gets the internal MeshManager. More... | |
Mesh * | _WrapInternalMesh (Ogre::MeshPtr ToWrap) |
Wraps and stores an Ogre Mesh instance. More... | |
virtual void | Deinitialize () |
Removes this manager from any necessary configuration so it can be safely disposed of. More... | |
virtual String | GetImplementationTypeName () const |
This Allows any manager name to be sent to a stream. Primarily used for logging. More... | |
virtual ManagerType | GetInterfaceType () const |
This returns the type of this manager. More... | |
Mesh * | GetMesh (const String &MeshName) |
Gets a Mesh stored in this manager. More... | |
Whole | GetNumMeshes () |
Gets the number of currently loaded meshes. More... | |
virtual void | Initialize () |
Configures this manager for use prior to entering the main loop. More... | |
Mesh * | LoadMesh (const String &ResourceName, const String &ResourceGroup) |
Loads a Mesh file from an asset group and prepares it for use. More... | |
Mesh * | LoadMesh (const String &FilePathAndName) |
Loads a Mesh file from disk and prepares it for use. More... | |
Mesh * | LoadMesh (std::istream *Stream) |
Loads an Mesh from an input stream. More... | |
void | SaveMesh (Mesh *ToSave, const String &FileName, const String &GroupName) |
Writes a Mesh to the asset group. More... | |
void | SaveMesh (Mesh *ToSave, const String &FilePathAndName) |
Writes a Mesh to the disk. More... | |
void | SaveMesh (Mesh *ToSave, std::ostream *Stream) |
Writes a Mesh in a final serializable form to an output stream. More... | |
void | UnloadAllMeshes () |
Unloads every Mesh that is currently loaded. | |
void | UnloadMesh (const String &MeshName) |
Unloads a Mesh from memory. More... | |
Public Member Functions inherited from Mezzanine::EntresolManager | |
EntresolManager () | |
Class constructor. | |
virtual | ~EntresolManager () |
Class destructor. | |
Public Member Functions inherited from Mezzanine::ManagerBase | |
ManagerBase () | |
Class constructor. | |
virtual | ~ManagerBase () |
Class destructor. | |
virtual String | GetInterfaceTypeAsString () const |
Gets a string of the interface type of this manager. More... | |
Boole | IsInitialized () const |
Gets whether or not this manager has been initialized. More... | |
Public Member Functions inherited from Mezzanine::Singleton< MeshManager > | |
~Singleton () | |
Class destructor. | |
Static Public Attributes | |
static const String | ImplementationName = "DefaultMeshManager" |
A String containing the name of this manager implementation. | |
static const ManagerBase::ManagerType | InterfaceType = ManagerBase::MT_MeshManager |
A ManagerType enum value used to describe the type of interface/functionality this manager provides. | |
Protected Member Functions | |||
virtual void | AddMesh (Mesh *ToAdd) | ||
Adds a Mesh to this manager.
| |||
Protected Member Functions inherited from Mezzanine::Singleton< MeshManager > | |||
Singleton () | |||
Class constructor. | |||
Protected Attributes | |
MeshContainer | Meshes |
Container storing all of the currently loaded Meshes. More... | |
Protected Attributes inherited from Mezzanine::ManagerBase | |
Boole | Initialized |
Simple Boole indicating whether or not this manager has been initialized. More... | |
Entresol * | TheEntresol |
The actual pointer to the Entresol core class. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Mezzanine::ManagerBase | |
static String | GetTypeAsString (const ManagerType &ManagerType) |
Gets the string form of the type of manager. More... | |
static ManagerType | GetTypeFromString (const String &ManagerName) |
Gets the type of manager requested from a string. More... | |
Static Public Member Functions inherited from Mezzanine::Singleton< MeshManager > | |
static MeshManager * | GetSingletonPtr () |
Fetches a pointer to the singleton. More... | |
static Boole | SingletonValid () |
Checks to see if the singleton pointer is valid. More... | |
Static Protected Attributes inherited from Mezzanine::Singleton< MeshManager > | |
static MeshManager * | SingletonPtr |
The one and only pointer to the single object. More... | |
This manager handles the storage, generation, and query of of Graphics Meshes.
Definition at line 76 of file meshmanager.h.
Mezzanine::Graphics::MeshManager::MeshManager | ( | const XML::Node & | XMLNode | ) |
XML constructor.
XMLNode | The node of the xml document to construct from. |
Definition at line 65 of file meshmanager.cpp.
Ogre::MeshManager * Mezzanine::Graphics::MeshManager::_GetInternalManager | ( | ) | const |
Gets the internal MeshManager.
Definition at line 200 of file meshmanager.cpp.
Mesh * Mezzanine::Graphics::MeshManager::_WrapInternalMesh | ( | Ogre::MeshPtr | ToWrap | ) |
|
protectedvirtual |
Adds a Mesh to this manager.
If | the name of the Mesh being added is not unique a II_DUPLICATE_IDENTITY_EXCEPTION will be thrown. |
ToAdd | The Mesh to be added. |
Definition at line 76 of file meshmanager.cpp.
|
virtual |
Removes this manager from any necessary configuration so it can be safely disposed of.
Implements Mezzanine::ManagerBase.
Definition at line 178 of file meshmanager.cpp.
|
virtual |
This Allows any manager name to be sent to a stream. Primarily used for logging.
Implements Mezzanine::ManagerBase.
Definition at line 187 of file meshmanager.cpp.
|
virtual |
This returns the type of this manager.
This is intended to make using and casting from Manager base easier. With this is is possible to cast from ManagerBase to the correct Manager Type.
Implements Mezzanine::ManagerBase.
Definition at line 184 of file meshmanager.cpp.
Gets a Mesh stored in this manager.
MeshName | The name of the Mesh to retrieve. |
Definition at line 158 of file meshmanager.cpp.
Whole Mezzanine::Graphics::MeshManager::GetNumMeshes | ( | ) |
Gets the number of currently loaded meshes.
Definition at line 167 of file meshmanager.cpp.
|
virtual |
Configures this manager for use prior to entering the main loop.
Implements Mezzanine::ManagerBase.
Definition at line 175 of file meshmanager.cpp.
Loads a Mesh file from disk and prepares it for use.
FilePathAndName | The full path and filename of the Mesh to be read. |
Definition at line 99 of file meshmanager.cpp.
Mesh * Mezzanine::Graphics::MeshManager::LoadMesh | ( | std::istream * | Stream | ) |
Loads an Mesh from an input stream.
Stream | A pointer to the stream to load the Mesh from. |
Definition at line 114 of file meshmanager.cpp.
Writes a Mesh to the disk.
ToSave | The Mesh to be saved. |
FilePathAndName | The full path and filename of the Mesh to be written. |
Definition at line 145 of file meshmanager.cpp.
void Mezzanine::Graphics::MeshManager::SaveMesh | ( | Mesh * | ToSave, |
std::ostream * | Stream | ||
) |
Writes a Mesh in a final serializable form to an output stream.
Definition at line 151 of file meshmanager.cpp.
void Mezzanine::Graphics::MeshManager::UnloadMesh | ( | const String & | MeshName | ) |
Unloads a Mesh from memory.
MeshName | The name of the Mesh to be unloaded. |
Definition at line 121 of file meshmanager.cpp.
|
protected |
Container storing all of the currently loaded Meshes.
Definition at line 93 of file meshmanager.h.