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 Member Functions | |||
TerrainManager () | |||
Class constructor. | |||
TerrainManager (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 () | |||
Class constructor. | |||
virtual | ~WorldManager () | ||
Class destructor. | |||
virtual void | _SetWorld (World *Parent) | ||
Sets the world this manager belongs to.
| |||
virtual World * | GetWorld () const | ||
Gets the world this manager belongs to. More... | |||
virtual bool | 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... | |||
bool | IsInitialized () const | ||
Gets whether or not this manager has been initialized. More... | |||
Protected Attributes | |
TerrainContainer | Terrains |
A container of all terrain instances. | |
Protected Attributes inherited from Mezzanine::WorldManager | |
bool | 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 | |
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... | |
This is manager for terrains and their functions.
Definition at line 60 of file terrainmanager.h.
Mezzanine::TerrainManager::TerrainManager | ( | XML::Node & | XMLNode) |
XML constructor.
XMLNode | The node of the xml document to construct from. |
Definition at line 55 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 86 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 156 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 189 of file terrainmanager.cpp.
|
virtual |
Destroys a terrain and removes it from world.
Index | Index of desired terrain in MeshTerrains. |
Definition at line 122 of file terrainmanager.cpp.
|
virtual |
Destroys a terrain and removes it from world.
Name | name of desired terrain in MeshTerrains. |
Definition at line 130 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 203 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 200 of file terrainmanager.cpp.
|
virtual |
Gets the number of terrains being stored in this manager.
Definition at line 81 of file terrainmanager.cpp.
|
virtual |
Retrieves a MeshTerrain from the list of terrains.
index | Index of desired terrain in MeshTerrains. |
Definition at line 66 of file terrainmanager.cpp.
|
virtual |
Retrieves a Meshterrain from the list of terrains.
name | The name of the terrain. |
Definition at line 71 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 179 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 174 of file terrainmanager.cpp.
|
virtual |
Removes all terrains currently in this manager from the world and the manager.
Definition at line 112 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 92 of file terrainmanager.cpp.
|
virtual |
Removes a terrain from the world and this manager.
ToBeRemoved | The terrain to be removed. |
Definition at line 99 of file terrainmanager.cpp.