This is manager for terrains and their functions. More...
#include <terrainmanager.h>
Public Types | |
typedef TerrainContainer::const_iterator | ConstTerrainIterator |
Const Iterator type for TerrainBase instances stored by this class. | |
typedef std::vector< TerrainBase * > | TerrainContainer |
Basic container type for TerrainBase storage by this class. | |
typedef TerrainContainer::iterator | TerrainIterator |
Iterator type for TerrainBase instances stored by 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 | |
TerrainManager (World *Creator) | |
Class constructor. | |
TerrainManager (World *Creator, const XML::Node &XMLNode) | |
XML constructor. More... | |
virtual | ~TerrainManager () |
Class destructor. | |
virtual void | AddTerrain (TerrainBase *Terrain) |
Adds a pre-made terrain to the world and the manager. More... | |
virtual MeshTerrain * | CreateMeshTerrain (const Vector3 &InitPosition, const String &name, const String &file, const String &group) |
Creates a terrain based on a given mesh. More... | |
virtual void | Deinitialize () |
Removes this manager from any necessary configuration so it can be safely disposed of. More... | |
virtual void | DestroyAllTerrains () |
Removes and deletes all terrains currently in this manager from the world and the manager. | |
virtual void | DestroyTerrain (const Whole &Index) |
Destroys a terrain and removes it from world. More... | |
virtual void | DestroyTerrain (TerrainBase *ToBeDestroyed) |
Destroys a terrain and removes it from world. 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... | |
virtual Whole | GetNumTerrains () const |
Gets the number of terrains being stored in this manager. More... | |
virtual TerrainBase * | GetTerrainByIndex (const Whole &Index) |
Retrieves a MeshTerrain from the list of terrains. More... | |
virtual TerrainBase * | GetTerrainByName (const String &Name) |
Retrieves a Meshterrain from the list of terrains. More... | |
virtual void | Initialize () |
Configures this manager for use prior to entering the main loop. More... | |
virtual void | Pause (const UInt32 PL) |
Sets the pause state of this manager, or has no effect depending on the value passed in. More... | |
virtual void | RemoveAllTerrains () |
Removes all terrains currently in this manager from the world and the manager. More... | |
virtual void | RemoveTerrain (const Whole &Index) |
Removes a terrain from the world and this manager by index. More... | |
virtual void | RemoveTerrain (TerrainBase *ToBeRemoved) |
Removes a terrain from the world and this manager. More... | |
Public Member Functions inherited from Mezzanine::WorldManager | |
WorldManager (World *Creator) | |
Class constructor. More... | |
virtual | ~WorldManager () |
Class destructor. | |
virtual World * | GetWorld () const |
Gets the world this manager belongs to. More... | |
virtual Boole | IsPaused () const |
Gets whether or not this manager is currently paused. 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... | |
Boole | IsInitialized () const |
Gets whether or not this manager has been initialized. More... | |
Static Public Attributes | |
static const String | ImplementationName = "DefaultTerrainManager" |
A String containing the name of this manager implementation. | |
static const ManagerBase::ManagerType | InterfaceType = ManagerBase::MT_TerrainManager |
A ManagerType enum value used to describe the type of interface/functionality this manager provides. | |
Protected Attributes | |
TerrainContainer | Terrains |
A container of all terrain instances. More... | |
Protected Attributes inherited from Mezzanine::WorldManager | |
Boole | OperationsPaused |
This stores whether or not processing for some or all objects in this manager has been paused. More... | |
World * | ParentWorld |
A pointer to the world that created this manager. 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... | |
This is manager for terrains and their functions.
Definition at line 60 of file terrainmanager.h.
XML constructor.
XMLNode | The node of the xml document to construct from. |
Definition at line 58 of file terrainmanager.cpp.
|
virtual |
Adds a pre-made terrain to the world and the manager.
Terrain | The terrain to be added. |
Definition at line 90 of file terrainmanager.cpp.
|
virtual |
Creates a terrain based on a given mesh.
This method creates a terrain object and handles adding it to the world.
InitPosition | The location of the terrain. |
name | The name of the terrain. |
file | The 3d mesh file that contains the 3d model the actor will use. |
group | The resource group where the 3d mesh and other related files can be found. |
Definition at line 160 of file terrainmanager.cpp.
|
virtual |
Removes this manager from any necessary configuration so it can be safely disposed of.
Implements Mezzanine::ManagerBase.
Definition at line 191 of file terrainmanager.cpp.
|
virtual |
Destroys a terrain and removes it from world.
Index | Index of desired terrain in MeshTerrains. |
Definition at line 126 of file terrainmanager.cpp.
|
virtual |
Destroys a terrain and removes it from world.
Name | name of desired terrain in MeshTerrains. |
Definition at line 134 of file terrainmanager.cpp.
|
virtual |
This Allows any manager name to be sent to a stream. Primarily used for logging.
Implements Mezzanine::ManagerBase.
Definition at line 204 of file terrainmanager.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 201 of file terrainmanager.cpp.
|
virtual |
Gets the number of terrains being stored in this manager.
Definition at line 85 of file terrainmanager.cpp.
|
virtual |
Retrieves a MeshTerrain from the list of terrains.
index | Index of desired terrain in MeshTerrains. |
Definition at line 70 of file terrainmanager.cpp.
|
virtual |
Retrieves a Meshterrain from the list of terrains.
name | The name of the terrain. |
Definition at line 75 of file terrainmanager.cpp.
|
virtual |
Configures this manager for use prior to entering the main loop.
If | this is called while no valid world is set, this will throw an "INVALID_STATE_EXCEPTION". |
Reimplemented from Mezzanine::WorldManager.
Definition at line 183 of file terrainmanager.cpp.
|
virtual |
Sets the pause state of this manager, or has no effect depending on the value passed in.
PL | A bitfield describing the pause level being assigned to the parent world of this manager. |
Implements Mezzanine::WorldManager.
Definition at line 178 of file terrainmanager.cpp.
|
virtual |
Removes all terrains currently in this manager from the world and the manager.
Definition at line 116 of file terrainmanager.cpp.
|
virtual |
Removes a terrain from the world and this manager by index.
Index | The index at which to remove the terrain. |
Definition at line 96 of file terrainmanager.cpp.
|
virtual |
Removes a terrain from the world and this manager.
ToBeRemoved | The terrain to be removed. |
Definition at line 103 of file terrainmanager.cpp.
|
protected |
A container of all terrain instances.
Definition at line 77 of file terrainmanager.h.