#include <map.h>
List of all members.
Public Member Functions |
| Map (const std::string &identifier, RenderBackend *renderbackend, const std::vector< RendererBase * > &renderers, ImagePool *imagepool, AnimationPool *animpool, 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) |
size_t | getNumLayers () const |
void | deleteLayers () |
void | getMatchingCoordinates (const ModelCoordinate &coord_to_map, const Layer *from_layer, const Layer *to_layer, std::vector< ModelCoordinate > &matching_coords) const |
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, const ExactModelCoordinate &emc) |
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 88 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 46 of file map.cpp.
Member Function Documentation
Adds new change listener
- Parameters:
-
Definition at line 158 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 79 of file map.cpp.
void FIFE::Map::deleteLayer |
( |
Layer * |
layer |
) |
|
Delete a layer from the map
Definition at line 98 of file map.cpp.
void FIFE::Map::deleteLayers |
( |
|
) |
|
Delete all layers from the map
Definition at line 115 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 224 of file map.cpp.
std::vector<Layer*>& FIFE::Map::getChangedLayers |
( |
|
) |
[inline] |
Returns layers that were changed during previous update round
Definition at line 173 of file map.h.
const std::string& FIFE::Map::getId |
( |
|
) |
const [inline] |
Get the identifier for this map.
Definition at line 105 of file map.h.
Layer * FIFE::Map::getLayer |
( |
const std::string & |
identifier |
) |
|
Get the layer with the given id.
Definition at line 65 of file map.cpp.
const std::list<Layer*>& FIFE::Map::getLayers |
( |
|
) |
const [inline] |
Maps coordinate from one layer to another
size_t FIFE::Map::getNumLayers |
( |
|
) |
const |
Get the overall number of layers
Definition at line 75 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 169 of file map.h.
void FIFE::Map::removeCamera |
( |
const std::string & |
id |
) |
|
Removes a camera from the map
Definition at line 196 of file map.cpp.
Removes associated change listener
- Parameters:
-
Definition at line 162 of file map.cpp.
void FIFE::Map::setId |
( |
const std::string & |
id |
) |
[inline] |
Sets the identifier for this map.
Definition at line 109 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 128 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