This manager handles the storage, generation, and query of of Graphics Meshes. More...
#include <meshmanager.h>
Public Types | |
typedef MeshContainer::const_iterator | ConstMeshIterator |
typedef std::map< String, Mesh * > | MeshContainer |
typedef MeshContainer::iterator | MeshIterator |
Public Types inherited from Mezzanine::ManagerBase | |
enum | ManagerType { MT_AudioManager = 1, MT_AnimationManager, MT_CollisionShapeManager, MT_CompositorManager, MT_GraphicsManager, MT_EventManager, MT_InputManager, MT_LogManager, MT_MaterialManager, MT_MeshManager, MT_NetworkManager, MT_ResourceManager, MT_ScriptingManager, MT_UIManager, MT_ActorManager = 100, MT_AreaEffectManager, MT_CameraManager, MT_DebrisManager, MT_PagingManager, MT_PhysicsManager, MT_SceneManager, MT_SoundScapeManager, MT_TerrainManager, MT_VehicleManager, MT_UserCreated = 512 } |
Public Member Functions | |
MeshManager () | |
Class constructor. | |
MeshManager (XML::Node &XMLNode) | |
XML constructor. More... | |
virtual | ~MeshManager () |
Class destructor. | |
virtual Mesh * | CreateBoxCornerMesh (const String &MeshName, const String &MaterialName, const Vector3 &HalfExtents, const Real &BoxThickness) |
Creates a mesh composed of boxes that outline the corner edges of a larger box. More... | |
virtual Mesh * | CreateBoxCornerMesh (const String &MeshName, const ColourValue &Colour, const Vector3 &HalfExtents, const Real &BoxThickness) |
Creates a mesh composed of boxes that outline the corner edges of a larger box. More... | |
virtual Mesh * | CreateBoxMesh (const String &MeshName, const String &MaterialName, const Vector3 &HalfExtents) |
Creates a box graphical mesh. More... | |
virtual Mesh * | CreateBoxMesh (const String &MeshName, const ColourValue &Colour, const Vector3 &HalfExtents) |
Creates a box graphical mesh. More... | |
virtual const String & | CreateColouredMaterial (const String &MatName, const ColourValue &Colour, const String &Group="") |
Creates a basic material in code using the provided colour. More... | |
virtual Mesh * | CreateCylinderMesh (const String &MeshName, const String &MaterialName, const Vector3 &HalfExtents, const Vector3 &AxisOrientation, const Whole &CircleRes=16, const Whole &Segments=1) |
Creates a cylinder graphical mesh. More... | |
virtual Mesh * | CreateCylinderMesh (const String &MeshName, const ColourValue &Colour, const Vector3 &HalfExtents, const Vector3 &AxisOrientation, const Whole &CircleRes=16, const Whole &Segments=1) |
Creates a cylinder graphical mesh and simple material. More... | |
virtual Mesh * | CreateMeshFromShape (const String &MeshName, const String &MaterialName, Physics::CollisionShape *Shape) |
Generates a mesh based on a collision shape. More... | |
virtual Mesh * | CreateSphereMesh (const String &MeshName, const String &MaterialName, const Real &Radius, const Real &Rings=16, const Real &Segments=16) |
Creates a sphere graphical mesh. More... | |
virtual Mesh * | CreateSphereMesh (const String &MeshName, const ColourValue &Colour, const Real &Radius, const Real &Rings=16, const Real &Segments=16) |
Creates a sphere graphical mesh and simple material. More... | |
virtual void | Deinitialize () |
Removes this manager from any necessary configuration so it can be safely disposed of. More... | |
virtual void | DestroyAllGeneratedMeshes () |
Destroys all the meshes generated by this generator. | |
void | DestroyAllMeshes () |
Clears this manager of all meshes, both loaded and generated. | |
virtual void | DestroyGeneratedMesh (const String &MeshName) |
Destroys a named Mesh, freeing it's resources. 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... | |
virtual Whole | GetNumGeneratedMeshes () |
Gets the number of meshes this generator has created and are in use. More... | |
virtual Whole | GetNumLoadedMeshes () |
Gets the number of currently loaded mesh files. More... | |
virtual void | Initialize () |
Configures this manager for use prior to entering the main loop. More... | |
virtual Mesh * | LoadMesh (const String &MeshName, const String &Group) |
Loads a mesh file from disk and prepares it for use. More... | |
virtual void | UnloadAllLoadedMeshes () |
Unloads every mesh that is currently loaded. | |
virtual void | UnloadMesh (const String &MeshName) |
Unloads a mesh file. More... | |
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... | |
bool | IsInitialized () const |
Gets whether or not this manager has been initialized. More... | |
Public Member Functions inherited from Mezzanine::Singleton< MeshManager > | |
Singleton () | |
Class constructor. | |
~Singleton () | |
Class destructor. | |
Protected Attributes | |
MeshContainer | GeneratedMeshes |
MeshContainer | LoadedMeshes |
Protected Attributes inherited from Mezzanine::ManagerBase | |
bool | Initialized |
Simple bool 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 bool | SingletonValid () |
Checks to see if the singleton pointer is valid. More... | |
Static Protected Attributes inherited from Mezzanine::Singleton< MeshManager > | |
static MeshManager * | SingletonPtr |
This manager handles the storage, generation, and query of of Graphics Meshes.
Definition at line 69 of file meshmanager.h.
Mezzanine::Graphics::MeshManager::MeshManager | ( | XML::Node & | XMLNode) |
XML constructor.
XMLNode | The node of the xml document to construct from. |
Definition at line 59 of file meshmanager.cpp.
|
virtual |
Creates a mesh composed of boxes that outline the corner edges of a larger box.
MeshName | The name for the mesh which will be created. Use this to reference the mesh when creating other objects that need a mesh. |
MaterialName | The name of the material script which will be applied to this mesh. |
HalfExtents | Half of the full dimentions of the final object in world units. This allows the objects origin to be it's center. |
BoxThickness | The width/thickness of the smaller boxes that will outline the corners of the larger box. |
Definition at line 422 of file meshmanager.cpp.
|
virtual |
Creates a mesh composed of boxes that outline the corner edges of a larger box.
MeshName | The name for the mesh which will be created. Use this to reference the mesh when creating other objects that need a mesh. |
Colour | The colour to generate the material with that will be applied to the mesh. The created material's name will be autogenerated to "[Meshname]+Mat". |
HalfExtents | Half of the full dimentions of the final object in world units. This allows the objects origin to be it's center. |
BoxThickness | The width/thickness of the smaller boxes that will outline the corners of the larger box. |
Definition at line 629 of file meshmanager.cpp.
|
virtual |
Creates a box graphical mesh.
MeshName | The name for the mesh which will be created. Use this to reference the mesh when creating other objects that need a mesh. |
MaterialName | The name of the material script which will be applied to this mesh. |
HalfExtents | Half of the full dimentions of the final object in world units. This allows the objects origin to be it's center. |
Definition at line 160 of file meshmanager.cpp.
|
virtual |
Creates a box graphical mesh.
MeshName | The name for the mesh which will be created. Use this to reference the mesh when creating other objects that need a mesh. |
Colour | The colour to generate the material with that will be applied to the mesh. The created material's name will be autogenerated to "[Meshname]+Mat". |
HalfExtents | Half of the full dimentions of the final object in world units. This allows the objects origin to be it's center. |
Definition at line 218 of file meshmanager.cpp.
|
virtual |
Creates a basic material in code using the provided colour.
MatName | The name to assign to the created material. |
Colour | The colour to assign to the created material. |
Group | The resource group where to place this material. Will be placed in an internal resouce group if left blank. |
Definition at line 644 of file meshmanager.cpp.
|
virtual |
Creates a cylinder graphical mesh.
MeshName | The name for the mesh which will be created. Use this to reference the mesh when creating other objects that need a mesh. |
MaterialName | The name of the material script which will be applied to this mesh. |
HalfExtents | Half of the full dimentions of the final object in world units. This allows the objects origin to be it's center. |
AxisOrientation | Vector3 representing which axis the cylinder should be aligned on. Should be one of the three: (1,0,0), (0,1,0), (0,0,1). |
CircleRes | The number of segments the circle should be comprised of. Determines the "resolution" of the cylinder. |
Segments | Optional parameter to specify the number of segments the cylinder should be comprised of. Mostly just useful if a special material is made for his. |
Start of MIT(Ogre Proceadural) License ///
End of MIT(Ogre Proceadural) License ///
Definition at line 225 of file meshmanager.cpp.
|
virtual |
Creates a cylinder graphical mesh and simple material.
MeshName | The name for the mesh which will be created. Use this to reference the mesh when creating other objects that need a mesh. |
Colour | The colour to generate the material with that will be applied to the mesh. The created material's name will be autogenerated to "[Meshname]+Mat". |
HalfExtents | Half of the full dimentions of the final object in world units. This allows the objects origin to be it's center. |
AxisOrientation | Vector3 representing which axis the cylinder should be aligned on. Should be one of the three: (1,0,0), (0,1,0), (0,0,1). |
CircleRes | The number of segments the circle should be comprised of. Determines the "resolution" of the cylinder. |
Segments | Optional parameter to specify the number of segments the cylinder should be comprised of. Mostly just useful if a special material is made for his. |
Definition at line 341 of file meshmanager.cpp.
|
virtual |
Generates a mesh based on a collision shape.
MeshName | The name that will be given to the generated mesh. |
MaterialName | The name of the material to use with this mesh. |
Shape | The shape to base the mesh on. |
Definition at line 636 of file meshmanager.cpp.
|
virtual |
Creates a sphere graphical mesh.
MeshName | The name for the mesh which will be created. Use this to reference the mesh when creating other objects that need a mesh. |
MaterialName | The name of the material script which will be applied to this mesh. |
Radius | The radius to generate the sphere with in world units. |
Rings | The number of horizontal rings the sphere is to be comprised of. This along with the segments parameter controls the overall resolution of the sphere. Less then 16 is not recommended. |
Segments | The number of vertical rings the sphere is to be comprised of. This along with the rings parameter controls the overall resolution of the sphere. Less then 16 is not recommended. |
Definition at line 348 of file meshmanager.cpp.
|
virtual |
Creates a sphere graphical mesh and simple material.
MeshName | The name for the mesh which will be created. Use this to reference the mesh when creating other objects that need a mesh. |
Colour | The colour to generate the material with that will be applied to the mesh. The created material's name will be autogenerated to "[Meshname]+Mat". |
Radius | The radius to generate the sphere with in world units. |
Rings | The number of horizontal rings the sphere is to be comprised of. This along with the segments parameter controls the overall resolution of the sphere. Less then 16 is not recommended. |
Segments | The number of vertical rings the sphere is to be comprised of. This along with the rings parameter controls the overall resolution of the sphere. Less then 16 is not recommended. |
Definition at line 397 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 667 of file meshmanager.cpp.
|
virtual |
Destroys a named Mesh, freeing it's resources.
MeshName | The name of the mesh to be destroyed. |
Definition at line 136 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 676 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 673 of file meshmanager.cpp.
Gets a mesh stored in this manager.
MeshName | The name of the mesh to retrieve. |
Definition at line 73 of file meshmanager.cpp.
|
virtual |
Gets the number of meshes this generator has created and are in use.
Definition at line 131 of file meshmanager.cpp.
|
virtual |
Gets the number of currently loaded mesh files.
Definition at line 113 of file meshmanager.cpp.
|
virtual |
Configures this manager for use prior to entering the main loop.
Implements Mezzanine::ManagerBase.
Definition at line 664 of file meshmanager.cpp.
|
virtual |
Loads a mesh file from disk and prepares it for use.
MeshName | The name of the mesh file to be loaded. |
Group | The resource group from which the mesh file should be loaded. |
Definition at line 93 of file meshmanager.cpp.
|
virtual |
Unloads a mesh file.
MeshName | The name of the mesh to be unloaded. |
Definition at line 103 of file meshmanager.cpp.