#include <map.h>
List of all members.
Public Member Functions |
| | Map (const std::string &identifier, RenderBackend *renderbackend, const std::vector< RendererBase * > &renderers, TimeProvider *tp_master=NULL) |
| | ~Map () |
| const std::string & | getId () const |
| void | setId (const std::string &id) |
| Layer * | createLayer (const std::string &identifier, CellGrid *grid) |
| void | deleteLayer (Layer *) |
| const std::list< Layer * > & | getLayers () const |
| Layer * | getLayer (const std::string &identifier) |
| uint32_t | getLayerCount () const |
| void | deleteLayers () |
| void | getMatchingCoordinates (const ModelCoordinate &coord_to_map, const Layer *from_layer, const Layer *to_layer, std::vector< ModelCoordinate > &matching_coords) const |
| void | getMinMaxCoordinates (ExactModelCoordinate &min, ExactModelCoordinate &max) |
| bool | update () |
| void | setTimeMultiplier (float multip) |
| float | getTimeMultiplier () const |
| TimeProvider * | getTimeProvider () |
| void | addChangeListener (MapChangeListener *listener) |
| void | removeChangeListener (MapChangeListener *listener) |
| bool | isChanged () |
| std::vector< Layer * > & | getChangedLayers () |
| Camera * | addCamera (const std::string &id, Layer *layer, const Rect &viewport) |
| void | removeCamera (const std::string &id) |
| Camera * | getCamera (const std::string &id) |
| std::vector< Camera * > & | getCameras () |
Detailed Description
A container of Layer(s).
The actual data is contained in Layer objects
- See also:
- Layer
Definition at line 86 of file map.h.
Constructor & Destructor Documentation
Construct a map To add map to model, one should call Model::addMap (otherwise map is not registered with the engine properly)
Definition at line 44 of file map.cpp.
Member Function Documentation
| Camera * FIFE::Map::addCamera |
( |
const std::string & |
id, |
|
|
Layer * |
layer, |
|
|
const Rect & |
viewport | |
|
) |
| | |
Adds new change listener
- Parameters:
-
Definition at line 191 of file map.cpp.
| Layer * FIFE::Map::createLayer |
( |
const std::string & |
identifier, |
|
|
CellGrid * |
grid | |
|
) |
| | |
Add a Layer to this Map. Map owns the returned pointer to the new Layer, so don't delete it!
Definition at line 81 of file map.cpp.
| void FIFE::Map::deleteLayer |
( |
Layer * |
layer |
) |
|
Delete a layer from the map
Definition at line 100 of file map.cpp.
| void FIFE::Map::deleteLayers |
( |
|
) |
|
Delete all layers from the map
Definition at line 117 of file map.cpp.
Referenced by ~Map().
| Camera * FIFE::Map::getCamera |
( |
const std::string & |
id |
) |
|
| std::vector< Camera * > & FIFE::Map::getCameras |
( |
|
) |
|
Get a list containing all cameras.
Definition at line 256 of file map.cpp.
| std::vector<Layer*>& FIFE::Map::getChangedLayers |
( |
|
) |
[inline] |
Returns layers that were changed during previous update round
Definition at line 176 of file map.h.
| const std::string& FIFE::Map::getId |
( |
|
) |
const [inline] |
Get the identifier for this map.
Definition at line 102 of file map.h.
| Layer * FIFE::Map::getLayer |
( |
const std::string & |
identifier |
) |
|
Get the layer with the given id.
Definition at line 67 of file map.cpp.
| uint32_t FIFE::Map::getLayerCount |
( |
|
) |
const |
Get the overall number of layers
Definition at line 77 of file map.cpp.
| const std::list<Layer*>& FIFE::Map::getLayers |
( |
|
) |
const [inline] |
Maps coordinate from one layer to another
Retrieves the minimum/maximum coordinates of instances on the map.
- Parameters:
-
| min | A reference to a ExactModelCoordinate that will hold the minimum coordinate. |
| max | A reference to a ExactModelCoordinate that will hold the maximum coordinate. |
Definition at line 130 of file map.cpp.
| float FIFE::Map::getTimeMultiplier |
( |
|
) |
const [inline] |
| bool FIFE::Map::isChanged |
( |
|
) |
[inline] |
Returns true, if map information was changed during previous update round
Definition at line 172 of file map.h.
| void FIFE::Map::removeCamera |
( |
const std::string & |
id |
) |
|
Removes a camera from the map
Definition at line 228 of file map.cpp.
Removes associated change listener
- Parameters:
-
Definition at line 195 of file map.cpp.
| void FIFE::Map::setId |
( |
const std::string & |
id |
) |
[inline] |
Sets the identifier for this map.
Definition at line 106 of file map.h.
| void FIFE::Map::setTimeMultiplier |
( |
float |
multip |
) |
[inline] |
| bool FIFE::Map::update |
( |
|
) |
|
Called periodically to update events on map
- Returns:
- true, if map was changed
Definition at line 161 of file map.cpp.
The documentation for this class was generated from the following files:
- engine/core/model/structures/map.h
- engine/core/model/structures/map.cpp