|
FIFE
|
A CellCache is an abstract depiction of one or a few layers and contains additional information, such as different cost and speed and so on. More...
#include <cellcache.h>
Inheritance diagram for FIFE::CellCache:
Collaboration diagram for FIFE::CellCache:Public Member Functions | |
| CellCache (Layer *layer) | |
| Constructor. More... | |
| ~CellCache () | |
| Destructor. More... | |
| void | reset () |
| Resets the CellCache. More... | |
| void | resize () |
| Checks the layer size and if the size is different with current size then the cache size is adjusted. More... | |
| void | resize (const Rect &rec) |
| Checks the given size and if the size is different with current size then the cache is adjusted. More... | |
| void | createCells () |
| Creates cells for this CellCache based on the size of the assigned layer. More... | |
| void | forceUpdate () |
| Updates all cells. More... | |
| void | addCell (Cell *cell) |
| Adds cell to this CellCache. More... | |
| Cell * | createCell (const ModelCoordinate &mc) |
| Creates cell on this CellCache. More... | |
| Cell * | getCell (const ModelCoordinate &mc) |
| Returns cell on this coordinate. More... | |
| const std::vector< std::vector < Cell * > > & | getCells () |
| Returns all cells of this CellCache. More... | |
| void | removeCell (Cell *cell) |
| Removes cell from CellCache. More... | |
| void | addInteractOnRuntime (Layer *interact) |
| Adds a interact layer to the CellCache on runtime and sets all needed layer properties. More... | |
| void | removeInteractOnRuntime (Layer *interact) |
| Removes a interact layer from the CellCache on runtime and sets all needed layer properties. More... | |
| LayerChangeListener * | getCellCacheChangeListener () |
| Returns change listener. More... | |
| Layer * | getLayer () |
| Returns layer. More... | |
| const Rect & | getSize () |
| Returns CellCache size. More... | |
| void | setSize (const Rect &rec) |
| Sets CellCache size. More... | |
| uint32_t | getWidth () |
| Returns width of the CellCache. More... | |
| uint32_t | getHeight () |
| Returns height of the CellCache. More... | |
| bool | isInCellCache (const Location &location) const |
| Checks whether the location is in CellCache range. More... | |
| int32_t | convertCoordToInt (const ModelCoordinate &coord) const |
| Convertes coordinate to unique identifier. More... | |
| ModelCoordinate | convertIntToCoord (const int32_t cell) const |
| Convertes unique identifier to coordinate. More... | |
| int32_t | getMaxIndex () const |
| Returns the number of cells on this CellCache. More... | |
| void | setMaxNeighborZ (int32_t z) |
| Sets maximal z range for neighbors. More... | |
| int32_t | getMaxNeighborZ () |
| Gets maximal z range for neighbors. More... | |
| void | setUpdated (bool updated) |
| Sets whether the CellCache need to be updated. More... | |
| bool | isUpdated () |
| Gets whether the CellCache need to be updated. More... | |
| std::vector< Cell * > | getCellsInLine (const ModelCoordinate &pt1, const ModelCoordinate &pt2, bool blocker=false) |
| Returns all cells in the line. More... | |
| std::vector< Cell * > | getCellsInRect (const Rect &rec) |
| Returns all cells in the rect. More... | |
| std::vector< Cell * > | getCellsInCircle (const ModelCoordinate ¢er, uint16_t radius) |
| Returns all cells in the circle. More... | |
| std::vector< Cell * > | getCellsInCircleSegment (const ModelCoordinate ¢er, uint16_t radius, int32_t sangle, int32_t eangle) |
| Returns all cells in the circle segment. More... | |
| void | registerCost (const std::string &costId, double cost) |
| Adds a cost with the given id and value. More... | |
| void | unregisterCost (const std::string &costId) |
| Removes a cost with the given id. More... | |
| double | getCost (const std::string &costId) |
| Returns the cost value for the given id. More... | |
| bool | existsCost (const std::string &costId) |
| Returns if the cost for the given id exists. More... | |
| std::list< std::string > | getCosts () |
| Returns all registered cost ids. More... | |
| void | unregisterAllCosts () |
| Removes all costs. More... | |
| void | addCellToCost (const std::string &costId, Cell *cell) |
| Assigns a cell to a cost identifier. More... | |
| void | addCellsToCost (const std::string &costId, const std::vector< Cell * > &cells) |
| Assigns cells to a cost identifier. More... | |
| void | removeCellFromCost (Cell *cell) |
| Removes a cell from costs. More... | |
| void | removeCellFromCost (const std::string &costId, Cell *cell) |
| Removes a cell from a cost identifier. More... | |
| void | removeCellsFromCost (const std::string &costId, const std::vector< Cell * > &cells) |
| Removes cells from a cost identifier. More... | |
| std::vector< Cell * > | getCostCells (const std::string &costId) |
| Returns cells for a cost identifier. More... | |
| std::vector< std::string > | getCellCosts (Cell *cell) |
| Returns cost identifiers for cell. More... | |
| bool | existsCostForCell (const std::string &costId, Cell *cell) |
| Gets if cell is assigned to cost identifier. More... | |
| double | getAdjacentCost (const ModelCoordinate &adjacent, const ModelCoordinate &next) |
| Returns cost for movement between these two adjacent coordinates. More... | |
| double | getAdjacentCost (const ModelCoordinate &adjacent, const ModelCoordinate &next, const std::string &costId) |
| Returns cost for movement between these two adjacent coordinates. More... | |
| bool | getCellSpeedMultiplier (const ModelCoordinate &cell, double &multiplier) |
| Returns speed value from cell. More... | |
| void | setDefaultCostMultiplier (double multi) |
| Sets default cost for this CellCache. More... | |
| double | getDefaultCostMultiplier () |
| Gets default cost for this CellCache. More... | |
| void | setDefaultSpeedMultiplier (double multi) |
| Sets default speed for this CellCache. More... | |
| double | getDefaultSpeedMultiplier () |
| Gets default speed for this CellCache. More... | |
| bool | isDefaultCost (Cell *cell) |
| Gets if cell uses default cost multiplier. More... | |
| void | setCostMultiplier (Cell *cell, double multi) |
| Sets cost multiplier for the cell. More... | |
| double | getCostMultiplier (Cell *cell) |
| Returns cost multiplier for the cell. More... | |
| void | resetCostMultiplier (Cell *cell) |
| Resets the cost multiplier for the cell. More... | |
| bool | isDefaultSpeed (Cell *cell) |
| Gets if cell uses default speed multiplier. More... | |
| void | setSpeedMultiplier (Cell *cell, double multi) |
| Sets speed multiplier for the cell. More... | |
| double | getSpeedMultiplier (Cell *cell) |
| Returns speed multiplier for the cell. More... | |
| void | resetSpeedMultiplier (Cell *cell) |
| Resets the speed multiplier for the cell. More... | |
| void | addTransition (Cell *cell) |
| Adds a cell as transition. More... | |
| void | removeTransition (Cell *cell) |
| Removes a cell as transition. More... | |
| std::vector< Cell * > | getTransitionCells (Layer *layer=NULL) |
| Returns transistion cells of this CellCache. More... | |
| const std::vector< Zone * > & | getZones () |
| Returns zones of this CellCache. More... | |
| Zone * | getZone (uint32_t id) |
| Gets zone by identifier. More... | |
| Zone * | createZone () |
| Creates zone. More... | |
| void | removeZone (Zone *zone) |
| Removes zone. More... | |
| void | splitZone (Cell *cell) |
| Splits zone on the cell. More... | |
| void | mergeZones (Zone *zone1, Zone *zone2) |
| Merges two zones to one. More... | |
| void | addNarrowCell (Cell *cell) |
| Adds cell to narrow cells. More... | |
| const std::set< Cell * > & | getNarrowCells () |
| Returns narrow cells. More... | |
| void | removeNarrowCell (Cell *cell) |
| Removes cell from narrow cells. More... | |
| void | resetNarrowCells () |
| Resets narrow cells. More... | |
| bool | isSearchNarrowCells () |
| Gets if narrow cells should be searched automatic. More... | |
| void | setSearchNarrowCells (bool search) |
| Sets if narrow cells should be searched automatic. More... | |
| void | addCellToArea (const std::string &id, Cell *cell) |
| Adds a cell to a specific area group. More... | |
| void | addCellsToArea (const std::string &id, const std::vector< Cell * > &cells) |
| Adds few cell to a specific area group. More... | |
| void | removeCellFromArea (Cell *cell) |
| Removes the cell from all areas. More... | |
| void | removeCellFromArea (const std::string &id, Cell *cell) |
| Removes the cell from a area. More... | |
| void | removeCellsFromArea (const std::string &id, const std::vector< Cell * > &cells) |
| Removes few cells from a area. More... | |
| void | removeArea (const std::string &id) |
| Removes a area. More... | |
| bool | existsArea (const std::string &id) |
| Checks whether the area exists. More... | |
| std::vector< std::string > | getAreas () |
| Returns all area ids. More... | |
| std::vector< std::string > | getCellAreas (Cell *cell) |
| Returns all areas of a cell. More... | |
| std::vector< Cell * > | getAreaCells (const std::string &id) |
| Returns all cells of an area. More... | |
| bool | isCellInArea (const std::string &id, Cell *cell) |
| Returns true if cell is part of the area, otherwise false. More... | |
| void | setStaticSize (bool staticSize) |
| Sets the cache size to static so that automatic resize is disabled. More... | |
| bool | isStaticSize () |
| Returns if the cache size is static. More... | |
| void | setBlockingUpdate (bool update) |
| void | setFowUpdate (bool update) |
| void | setSizeUpdate (bool update) |
| void | update () |
Public Member Functions inherited from FIFE::FifeClass | |
| FifeClass () | |
| virtual | ~FifeClass () |
| fifeid_t | getFifeId () |
| Gets unique id of this instance inside the engine. More... | |
Private Types | |
| typedef std::multimap < std::string, Cell * > | StringCellMultimap |
| typedef StringCellMultimap::iterator | StringCellIterator |
| typedef std::pair < StringCellIterator, StringCellIterator > | StringCellPair |
Private Member Functions | |
| Rect | calculateCurrentSize () |
| Returns the current size. More... | |
Private Attributes | |
| Layer * | m_layer |
| walkable layer More... | |
| double | m_defaultCostMulti |
| default cost More... | |
| double | m_defaultSpeedMulti |
| default speed More... | |
| LayerChangeListener * | m_cellListener |
| change listener More... | |
| std::vector< std::vector< Cell * > > | m_cells |
| Rect | m_size |
| Rect holds the min and max size x = min.x, w = max.x, y = min.y, h = max.y. More... | |
| uint32_t | m_width |
| cache width More... | |
| uint32_t | m_height |
| cache height More... | |
| int32_t | m_neighborZ |
| max z value for neighbors More... | |
| bool | m_blockingUpdate |
| indicates blocking update More... | |
| bool | m_fowUpdate |
| indicates fow update More... | |
| bool | m_sizeUpdate |
| indicates size update More... | |
| bool | m_updated |
| need update More... | |
| bool | m_searchNarrow |
| is automatic seach enabled More... | |
| bool | m_staticSize |
| is automatic size update enabled/disabled More... | |
| std::vector< Cell * > | m_transitions |
| cells with transitions More... | |
| std::vector< Zone * > | m_zones |
| zones More... | |
| std::set< Cell * > | m_narrowCells |
| special cells which are monitored (zone split and merge) More... | |
| StringCellMultimap | m_cellAreas |
| areas with assigned cells More... | |
| CellChangeListener * | m_cellZoneListener |
| listener for zones More... | |
| std::map< std::string, double > | m_costsTable |
| holds cost table More... | |
| StringCellMultimap | m_costsToCells |
| holds cells for each cost More... | |
| std::map< Cell *, double > | m_costMultipliers |
| holds default cost multiplier, only if it is not default(1.0) More... | |
| std::map< Cell *, double > | m_speedMultipliers |
| holds default speed multiplier, only if it is not default(1.0) More... | |
A CellCache is an abstract depiction of one or a few layers and contains additional information, such as different cost and speed and so on.
Definition at line 111 of file cellcache.h.
|
private |
Definition at line 616 of file cellcache.h.
|
private |
Definition at line 615 of file cellcache.h.
|
private |
Definition at line 617 of file cellcache.h.
| FIFE::CellCache::CellCache | ( | Layer * | layer | ) |
Constructor.
| layer | A pointer to the associated layer. |
Definition at line 371 of file cellcache.cpp.
References ABS, FIFE::Layer::addChangeListener(), FIFE::Layer::getInteractLayers(), FIFE::Layer::getMinMaxCoordinates(), FIFE::RectType< T >::h, m_cellListener, m_cells, m_cellZoneListener, m_height, m_layer, m_size, m_width, FIFE::RectType< T >::w, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.
| FIFE::CellCache::~CellCache | ( | ) |
Destructor.
Definition at line 419 of file cellcache.cpp.
References FIFE::Layer::getInteractLayers(), m_cellListener, m_cellZoneListener, m_layer, FIFE::Layer::removeChangeListener(), and reset().
| void FIFE::CellCache::addCell | ( | Cell * | cell | ) |
Adds cell to this CellCache.
| cell | A pointer to cell which should be added. |
Definition at line 692 of file cellcache.cpp.
References FIFE::Cell::getLayerCoordinates(), m_cells, m_size, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.
| void FIFE::CellCache::addCellsToArea | ( | const std::string & | id, |
| const std::vector< Cell * > & | cells | ||
| ) |
Adds few cell to a specific area group.
With an area you can group cells without the need of checking the underlying instances or similar.
| A | const reference to string that contains the area id. |
| A | const reference to vector which contains the cells. |
Definition at line 1400 of file cellcache.cpp.
References addCellToArea().
| void FIFE::CellCache::addCellsToCost | ( | const std::string & | costId, |
| const std::vector< Cell * > & | cells | ||
| ) |
Assigns cells to a cost identifier.
| costId | A const reference to the cost identifier. |
| cells | A const reference to a vector which contains the cells. |
Definition at line 1034 of file cellcache.cpp.
References addCellToCost().
| void FIFE::CellCache::addCellToArea | ( | const std::string & | id, |
| Cell * | cell | ||
| ) |
Adds a cell to a specific area group.
With an area you can group cells without the need of checking the underlying instances or similar.
| A | const reference to string that contains the area id. |
| A | pointer to the cell which should be added. |
Definition at line 1396 of file cellcache.cpp.
References m_cellAreas.
Referenced by addCellsToArea(), FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), and FIFE::MapLoader::load().
Here is the caller graph for this function:| void FIFE::CellCache::addCellToCost | ( | const std::string & | costId, |
| Cell * | cell | ||
| ) |
Assigns a cell to a cost identifier.
| costId | A const reference to the cost identifier. |
| cell | A pointer to the cell. |
Definition at line 1021 of file cellcache.cpp.
References existsCost(), and m_costsToCells.
Referenced by addCellsToCost(), FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), and FIFE::MapLoader::load().
Here is the caller graph for this function:| void FIFE::CellCache::addInteractOnRuntime | ( | Layer * | interact | ) |
Adds a interact layer to the CellCache on runtime and sets all needed layer properties.
| interact | A pointer to the interact layer. |
Definition at line 739 of file cellcache.cpp.
References FIFE::Layer::addChangeListener(), FIFE::Cell::addInstances(), FIFE::Layer::addInteractLayer(), calculateCurrentSize(), FIFE::InstanceTree::findInstances(), getCell(), FIFE::Layer::getCellGrid(), FIFE::Layer::getId(), FIFE::Layer::getInstanceTree(), FIFE::RectType< T >::h, FIFE::intPt2doublePt(), m_cellListener, m_height, m_layer, m_size, m_width, resize(), FIFE::Layer::setInteract(), FIFE::CellGrid::toLayerCoordinates(), FIFE::CellGrid::toMapCoordinates(), FIFE::RectType< T >::w, FIFE::RectType< T >::x, and FIFE::RectType< T >::y.
| void FIFE::CellCache::addNarrowCell | ( | Cell * | cell | ) |
Adds cell to narrow cells.
Narrow cells are observed. On blocking change, the underlying zones are merged or splitted.
| cell | A pointer to the cell. |
Definition at line 1361 of file cellcache.cpp.
References FIFE::Cell::addChangeListener(), m_cellZoneListener, and m_narrowCells.
Referenced by createCells(), and FIFE::MapLoader::load().
Here is the caller graph for this function:| void FIFE::CellCache::addTransition | ( | Cell * | cell | ) |
Adds a cell as transition.
| cell | A pointer to transition cell. |
Definition at line 1220 of file cellcache.cpp.
References m_transitions.
Referenced by FIFE::Cell::createTransition().
Here is the caller graph for this function:
|
private |
Returns the current size.
Definition at line 1493 of file cellcache.cpp.
References FIFE::Layer::getInteractLayers(), FIFE::Layer::getMinMaxCoordinates(), FIFE::RectType< T >::h, m_layer, FIFE::RectType< T >::w, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.
Referenced by addInteractOnRuntime(), removeInteractOnRuntime(), and resize().
Here is the caller graph for this function:| int32_t FIFE::CellCache::convertCoordToInt | ( | const ModelCoordinate & | coord | ) | const |
Convertes coordinate to unique identifier.
| coord | A const reference to ModelCoordinate which should be converted. |
Definition at line 835 of file cellcache.cpp.
References m_size, m_width, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.
Referenced by createCell(), createCells(), and FIFE::MultiLayerSearch::updateSearch().
Here is the caller graph for this function:| ModelCoordinate FIFE::CellCache::convertIntToCoord | ( | const int32_t | cell | ) | const |
Convertes unique identifier to coordinate.
| coord | A const reference the integer id which should be converted. |
Definition at line 840 of file cellcache.cpp.
References m_size, m_width, FIFE::RectType< T >::x, and FIFE::RectType< T >::y.
Referenced by FIFE::SingleLayerSearch::calcPath(), FIFE::MultiLayerSearch::calcPath(), FIFE::MultiLayerSearch::calcPathStep(), FIFE::SingleLayerSearch::updateSearch(), and FIFE::MultiLayerSearch::updateSearch().
Here is the caller graph for this function:| Cell * FIFE::CellCache::createCell | ( | const ModelCoordinate & | mc | ) |
Creates cell on this CellCache.
| mc | A const reference to ModelCoordinate where the cell should be created. |
Definition at line 697 of file cellcache.cpp.
References convertCoordToInt(), getCell(), m_cells, m_layer, m_size, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.
Referenced by FIFE::MapLoader::load().
Here is the caller graph for this function:| void FIFE::CellCache::createCells | ( | ) |
Creates cells for this CellCache based on the size of the assigned layer.
Definition at line 586 of file cellcache.cpp.
References FIFE::Zone::addCell(), FIFE::Cell::addInstances(), addNarrowCell(), convertCoordToInt(), createZone(), FIFE::CTYPE_CELL_BLOCKER, FIFE::CTYPE_STATIC_BLOCKER, FIFE::InstanceTree::findInstances(), FIFE::CellGrid::getAccessibleCoordinates(), getCell(), FIFE::Layer::getCellGrid(), FIFE::Cell::getCellType(), FIFE::Layer::getInstanceTree(), FIFE::Layer::getInteractLayers(), FIFE::Cell::getNeighbors(), FIFE::Cell::getZone(), FIFE::intPt2doublePt(), FIFE::Cell::isInserted(), m_cells, m_height, m_layer, m_searchNarrow, m_size, m_width, FIFE::Cell::setInserted(), FIFE::CellGrid::toMapCoordinates(), FIFE::RectType< T >::x, and FIFE::RectType< T >::y.
Referenced by FIFE::Map::finalizeCellCaches().
Here is the caller graph for this function:| Zone * FIFE::CellCache::createZone | ( | ) |
Creates zone.
Definition at line 1251 of file cellcache.cpp.
References m_zones.
Referenced by createCells(), and splitZone().
Here is the caller graph for this function:| bool FIFE::CellCache::existsArea | ( | const std::string & | id | ) |
Checks whether the area exists.
| A | const reference to string that contains the area id. |
Definition at line 1440 of file cellcache.cpp.
References m_cellAreas.
| bool FIFE::CellCache::existsCost | ( | const std::string & | costId | ) |
Returns if the cost for the given id exists.
Definition at line 999 of file cellcache.cpp.
References m_costsTable.
Referenced by addCellToCost().
Here is the caller graph for this function:| bool FIFE::CellCache::existsCostForCell | ( | const std::string & | costId, |
| Cell * | cell | ||
| ) |
Gets if cell is assigned to cost identifier.
| costId | A const reference to the cost identifier. |
| cell | A pointer to the cell. |
Definition at line 1091 of file cellcache.cpp.
References m_costsToCells.
Referenced by getAdjacentCost(), and FIFE::MapSaver::save().
Here is the caller graph for this function:| void FIFE::CellCache::forceUpdate | ( | ) |
Updates all cells.
Definition at line 682 of file cellcache.cpp.
References m_cells.
Referenced by FIFE::Map::finalizeCellCaches().
Here is the caller graph for this function:| double FIFE::CellCache::getAdjacentCost | ( | const ModelCoordinate & | adjacent, |
| const ModelCoordinate & | next | ||
| ) |
Returns cost for movement between these two adjacent coordinates.
| adjacent | A const reference to the start ModelCoordinate. |
| next | A const reference to the end ModelCoordinate. |
Definition at line 1102 of file cellcache.cpp.
References FIFE::Cell::defaultCost(), FIFE::CellGrid::getAdjacentCost(), getCell(), FIFE::Layer::getCellGrid(), FIFE::Cell::getCostMultiplier(), m_defaultCostMulti, and m_layer.
Referenced by FIFE::SingleLayerSearch::updateSearch(), and FIFE::MultiLayerSearch::updateSearch().
Here is the caller graph for this function:| double FIFE::CellCache::getAdjacentCost | ( | const ModelCoordinate & | adjacent, |
| const ModelCoordinate & | next, | ||
| const std::string & | costId | ||
| ) |
Returns cost for movement between these two adjacent coordinates.
| adjacent | A const reference to the start ModelCoordinate. |
| next | A const reference to the end ModelCoordinate. |
| costId | A const reference to the string that contain a cost identifier. |
Definition at line 1115 of file cellcache.cpp.
References FIFE::Cell::defaultCost(), existsCostForCell(), FIFE::CellGrid::getAdjacentCost(), getCell(), FIFE::Layer::getCellGrid(), getCost(), FIFE::Cell::getCostMultiplier(), m_defaultCostMulti, and m_layer.
| std::vector< Cell * > FIFE::CellCache::getAreaCells | ( | const std::string & | id | ) |
Returns all cells of an area.
| A | const reference to string that contains the area id. |
Definition at line 1472 of file cellcache.cpp.
References m_cellAreas.
| std::vector< std::string > FIFE::CellCache::getAreas | ( | ) |
Returns all area ids.
Definition at line 1448 of file cellcache.cpp.
References m_cellAreas.
| Cell * FIFE::CellCache::getCell | ( | const ModelCoordinate & | mc | ) |
Returns cell on this coordinate.
| mc | A const reference to ModelCoordinate where the cell should be. |
Definition at line 706 of file cellcache.cpp.
References m_cells, m_height, m_size, m_width, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.
Referenced by addInteractOnRuntime(), FIFE::Trigger::assign(), FIFE::MultiLayerSearch::calcPath(), FIFE::Layer::cellContainsBlockingInstance(), createCell(), createCells(), FIFE::Cell::createTransition(), FIFE::Cell::deleteTransition(), FIFE::RoutePather::followRoute(), getAdjacentCost(), FIFE::Layer::getBlockingInstances(), getCellsInCircle(), getCellsInLine(), getCellsInRect(), getCellSpeedMultiplier(), FIFE::MapLoader::load(), FIFE::Trigger::moveTo(), FIFE::MultiLayerSearch::MultiLayerSearch(), FIFE::CellCacheChangeListener::onInstanceCreate(), FIFE::CellCacheChangeListener::onInstanceDelete(), FIFE::CellCacheChangeListener::onLayerChanged(), FIFE::Trigger::remove(), removeInteractOnRuntime(), FIFE::InstanceRenderer::renderAlreadySorted(), FIFE::InstanceRenderer::renderUnsorted(), FIFE::Cell::resetNeighbors(), resize(), FIFE::RoutePatherSearch::RoutePatherSearch(), FIFE::MultiLayerSearch::searchBetweenTargetsMap(), FIFE::MultiLayerSearch::searchBetweenTargetsNeighbor(), FIFE::RoutePather::solveRoute(), FIFE::SingleLayerSearch::updateSearch(), and FIFE::MultiLayerSearch::updateSearch().
Here is the caller graph for this function:| std::vector< std::string > FIFE::CellCache::getCellAreas | ( | Cell * | cell | ) |
Returns all areas of a cell.
| A | pointer to the cell. |
Definition at line 1461 of file cellcache.cpp.
References m_cellAreas.
Referenced by FIFE::MapSaver::save().
Here is the caller graph for this function:| LayerChangeListener * FIFE::CellCache::getCellCacheChangeListener | ( | ) |
Returns change listener.
Definition at line 798 of file cellcache.cpp.
References m_cellListener.
Referenced by FIFE::Layer::destroyCellCache(), and FIFE::Layer::removeInteractLayer().
Here is the caller graph for this function:| std::vector< std::string > FIFE::CellCache::getCellCosts | ( | Cell * | cell | ) |
Returns cost identifiers for cell.
| cell | A pointer to the cell. |
Definition at line 1080 of file cellcache.cpp.
References m_costsToCells.
Referenced by FIFE::CellRenderer::render().
Here is the caller graph for this function:| const std::vector< std::vector< Cell * > > & FIFE::CellCache::getCells | ( | ) |
Returns all cells of this CellCache.
Definition at line 717 of file cellcache.cpp.
References m_cells.
Referenced by FIFE::BlockingInfoRenderer::render(), and FIFE::MapSaver::save().
Here is the caller graph for this function:| std::vector< Cell * > FIFE::CellCache::getCellsInCircle | ( | const ModelCoordinate & | center, |
| uint16_t | radius | ||
| ) |
Returns all cells in the circle.
| center | A const reference to the ModelCoordinate where the center of the circle is. |
| radius | A unsigned integer, radius of the circle. |
Definition at line 900 of file cellcache.cpp.
References utf8::distance(), getCell(), FIFE::PointType3D< T >::x, and FIFE::PointType3D< T >::y.
Referenced by FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), getCellsInCircleSegment(), FIFE::Cell::removeInstance(), and FIFE::Cell::updateCellFowInfo().
Here is the caller graph for this function:| std::vector< Cell * > FIFE::CellCache::getCellsInCircleSegment | ( | const ModelCoordinate & | center, |
| uint16_t | radius, | ||
| int32_t | sangle, | ||
| int32_t | eangle | ||
| ) |
Returns all cells in the circle segment.
| center | A const reference to the ModelCoordinate where the center of the circle is. |
| radius | A unsigned integer, radius of the circle. |
| sangle | A interger, start angle of the segment. |
| eangle | A interger, end angle of the segment. |
Definition at line 952 of file cellcache.cpp.
References FIFE::getAngleBetween(), getCellsInCircle(), FIFE::intPt2doublePt(), FIFE::PointType3D< T >::x, and FIFE::PointType3D< T >::y.
| std::vector< Cell * > FIFE::CellCache::getCellsInLine | ( | const ModelCoordinate & | pt1, |
| const ModelCoordinate & | pt2, | ||
| bool | blocker = false |
||
| ) |
Returns all cells in the line.
| pt1 | A const reference to the ModelCoordinate where the line begin. |
| pt2 | A const reference to the ModelCoordinate where the line end. |
| blocker | A boolean, true stops when a blocker is found, false ignored blocker. |
Definition at line 866 of file cellcache.cpp.
References FIFE::CTYPE_NO_BLOCKER, getCell(), FIFE::Layer::getCellGrid(), FIFE::Cell::getCellType(), FIFE::CellGrid::getCoordinatesInLine(), and m_layer.
Returns all cells in the rect.
| rec | A const reference to the Rect which specifies the size. |
Definition at line 883 of file cellcache.cpp.
References getCell(), FIFE::RectType< T >::h, FIFE::RectType< T >::w, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.
Referenced by FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), FIFE::TriggerController::createTrigger(), FIFE::Cell::removeInstance(), FIFE::TriggerController::removeTrigger(), FIFE::CellRenderer::render(), and FIFE::Cell::updateCellFowInfo().
Here is the caller graph for this function:| bool FIFE::CellCache::getCellSpeedMultiplier | ( | const ModelCoordinate & | cell, |
| double & | multiplier | ||
| ) |
Returns speed value from cell.
| cell | A const reference to the cell ModelCoordinate. |
| multiplier | A reference to a double which receives the speed value. |
Definition at line 1132 of file cellcache.cpp.
References FIFE::Cell::defaultSpeed(), getCell(), FIFE::Cell::getSpeedMultiplier(), and m_defaultSpeedMulti.
Referenced by FIFE::RoutePather::followRoute().
Here is the caller graph for this function:| double FIFE::CellCache::getCost | ( | const std::string & | costId | ) |
Returns the cost value for the given id.
| costId | A const reference to a string that refs to the cost id. |
Definition at line 991 of file cellcache.cpp.
References m_costsTable.
Referenced by getAdjacentCost(), FIFE::CellRenderer::render(), and FIFE::MapSaver::save().
Here is the caller graph for this function:| std::vector< Cell * > FIFE::CellCache::getCostCells | ( | const std::string & | costId | ) |
Returns cells for a cost identifier.
| costId | A const reference to the cost identifier. |
Definition at line 1070 of file cellcache.cpp.
References m_costsToCells.
| double FIFE::CellCache::getCostMultiplier | ( | Cell * | cell | ) |
Returns cost multiplier for the cell.
| cell | A pointer to the cell. |
Definition at line 1177 of file cellcache.cpp.
References m_costMultipliers.
Referenced by FIFE::Cell::getCostMultiplier().
Here is the caller graph for this function:| std::list< std::string > FIFE::CellCache::getCosts | ( | ) |
Returns all registered cost ids.
Definition at line 1007 of file cellcache.cpp.
References m_costsTable.
Referenced by FIFE::MapSaver::save().
Here is the caller graph for this function:| double FIFE::CellCache::getDefaultCostMultiplier | ( | ) |
Gets default cost for this CellCache.
Definition at line 1148 of file cellcache.cpp.
References m_defaultCostMulti.
Referenced by FIFE::MapSaver::save().
Here is the caller graph for this function:| double FIFE::CellCache::getDefaultSpeedMultiplier | ( | ) |
Gets default speed for this CellCache.
Definition at line 1156 of file cellcache.cpp.
References m_defaultSpeedMulti.
Referenced by FIFE::RoutePather::followRoute(), and FIFE::MapSaver::save().
Here is the caller graph for this function:| uint32_t FIFE::CellCache::getHeight | ( | ) |
Returns height of the CellCache.
Definition at line 818 of file cellcache.cpp.
References m_height.
| Layer * FIFE::CellCache::getLayer | ( | ) |
Returns layer.
Definition at line 802 of file cellcache.cpp.
References m_layer.
Referenced by FIFE::SingleLayerSearch::calcPath(), FIFE::MultiLayerSearch::calcPath(), FIFE::MultiLayerSearch::calcPathStep(), FIFE::MultiLayerSearch::searchBetweenTargetsNeighbor(), FIFE::SingleLayerSearch::updateSearch(), and FIFE::MultiLayerSearch::updateSearch().
Here is the caller graph for this function:| int32_t FIFE::CellCache::getMaxIndex | ( | ) | const |
Returns the number of cells on this CellCache.
Definition at line 845 of file cellcache.cpp.
References m_height, and m_width.
Referenced by FIFE::MultiLayerSearch::createSearchFrontier(), and FIFE::SingleLayerSearch::SingleLayerSearch().
Here is the caller graph for this function:| int32_t FIFE::CellCache::getMaxNeighborZ | ( | ) |
Gets maximal z range for neighbors.
By default disabled with the value -1.
Definition at line 854 of file cellcache.cpp.
References m_neighborZ.
| const std::set< Cell * > & FIFE::CellCache::getNarrowCells | ( | ) |
Returns narrow cells.
Definition at line 1368 of file cellcache.cpp.
References m_narrowCells.
Referenced by FIFE::MapSaver::save().
Here is the caller graph for this function:| const Rect & FIFE::CellCache::getSize | ( | ) |
Returns CellCache size.
Definition at line 806 of file cellcache.cpp.
References m_size.
| double FIFE::CellCache::getSpeedMultiplier | ( | Cell * | cell | ) |
Returns speed multiplier for the cell.
| cell | A pointer to the cell. |
Definition at line 1207 of file cellcache.cpp.
References m_speedMultipliers.
Referenced by FIFE::Cell::getSpeedMultiplier().
Here is the caller graph for this function:Returns transistion cells of this CellCache.
| layer | A pointer to the layer which should be the target of the transition. If NULL all transistions be returned. |
Definition at line 1234 of file cellcache.cpp.
References FIFE::TransitionInfo::m_layer, and m_transitions.
Referenced by FIFE::MultiLayerSearch::searchBetweenTargetsMap(), and FIFE::MultiLayerSearch::searchBetweenTargetsNeighbor().
Here is the caller graph for this function:| uint32_t FIFE::CellCache::getWidth | ( | ) |
Returns width of the CellCache.
Definition at line 814 of file cellcache.cpp.
References m_width.
| Zone * FIFE::CellCache::getZone | ( | uint32_t | id | ) |
Gets zone by identifier.
| id | A unsigned integer which is used as zone identifier, |
Definition at line 1277 of file cellcache.cpp.
References m_zones.
| const std::vector< Zone * > & FIFE::CellCache::getZones | ( | ) |
Returns zones of this CellCache.
Definition at line 1273 of file cellcache.cpp.
References m_zones.
Referenced by FIFE::MultiLayerSearch::searchBetweenTargetsMap().
Here is the caller graph for this function:| bool FIFE::CellCache::isCellInArea | ( | const std::string & | id, |
| Cell * | cell | ||
| ) |
Returns true if cell is part of the area, otherwise false.
| A | const reference to string that contains the area id. |
| A | pointer to the cell which is used for the check. |
Definition at line 1482 of file cellcache.cpp.
References m_cellAreas.
Referenced by FIFE::RoutePather::solveRoute(), FIFE::SingleLayerSearch::updateSearch(), and FIFE::MultiLayerSearch::updateSearch().
Here is the caller graph for this function:| bool FIFE::CellCache::isDefaultCost | ( | Cell * | cell | ) |
Gets if cell uses default cost multiplier.
| cell | A pointer to the cell. |
Definition at line 1160 of file cellcache.cpp.
References m_costMultipliers.
Referenced by FIFE::Cell::defaultCost().
Here is the caller graph for this function:| bool FIFE::CellCache::isDefaultSpeed | ( | Cell * | cell | ) |
Gets if cell uses default speed multiplier.
| cell | A pointer to the cell. |
Definition at line 1190 of file cellcache.cpp.
References m_speedMultipliers.
Referenced by FIFE::Cell::defaultSpeed().
Here is the caller graph for this function:| bool FIFE::CellCache::isInCellCache | ( | const Location & | location | ) | const |
Checks whether the location is in CellCache range.
| location | A const reference to location which should be checked. |
Definition at line 822 of file cellcache.cpp.
References FIFE::Location::getLayer(), FIFE::Location::getLayerCoordinates(), m_height, m_layer, m_size, m_width, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.
Referenced by FIFE::CellCacheChangeListener::onInstanceCreate(), and FIFE::RoutePather::solveRoute().
Here is the caller graph for this function:| bool FIFE::CellCache::isSearchNarrowCells | ( | ) |
Gets if narrow cells should be searched automatic.
Note that narrow cells will only saved if this is disabled.
Definition at line 1388 of file cellcache.cpp.
References m_searchNarrow.
Referenced by FIFE::MapSaver::save().
Here is the caller graph for this function:| bool FIFE::CellCache::isStaticSize | ( | ) |
Returns if the cache size is static.
Definition at line 1518 of file cellcache.cpp.
References m_staticSize.
| bool FIFE::CellCache::isUpdated | ( | ) |
Gets whether the CellCache need to be updated.
Definition at line 862 of file cellcache.cpp.
References m_updated.
Referenced by FIFE::CellRenderer::render().
Here is the caller graph for this function:Merges two zones to one.
| zone1 | A pointer to the first zone. |
| zone2 | A pointer to the second zone. |
Definition at line 1347 of file cellcache.cpp.
References FIFE::Zone::getCellCount(), FIFE::Zone::mergeZone(), and removeZone().
Referenced by FIFE::ZoneCellChangeListener::onBlockingChangedCell().
Here is the caller graph for this function:| void FIFE::CellCache::registerCost | ( | const std::string & | costId, |
| double | cost | ||
| ) |
Adds a cost with the given id and value.
| costId | A const reference to a string that refs to the cost id. |
| cost | A double that contains the cost value. Used as multiplier for default cost. |
Definition at line 974 of file cellcache.cpp.
References m_costsTable.
Referenced by FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), and FIFE::MapLoader::load().
Here is the caller graph for this function:| void FIFE::CellCache::removeArea | ( | const std::string & | id | ) |
Removes a area.
| A | const reference to string that contains the area id. |
Definition at line 1436 of file cellcache.cpp.
References m_cellAreas.
| void FIFE::CellCache::removeCell | ( | Cell * | cell | ) |
Removes cell from CellCache.
Removes cell from cost table, special cost and speed, futhermore from areas and narrows.
| cell | A pointer to the cell. |
Definition at line 721 of file cellcache.cpp.
References m_cellAreas, m_costMultipliers, m_costsToCells, m_narrowCells, m_speedMultipliers, removeCellFromArea(), removeCellFromCost(), removeNarrowCell(), resetCostMultiplier(), and resetSpeedMultiplier().
Referenced by FIFE::Cell::~Cell().
Here is the caller graph for this function:| void FIFE::CellCache::removeCellFromArea | ( | Cell * | cell | ) |
Removes the cell from all areas.
| A | pointer to the cell which should be removed. |
Definition at line 1407 of file cellcache.cpp.
References m_cellAreas.
Referenced by removeCell(), removeCellsFromArea(), and FIFE::Cell::removeInstance().
Here is the caller graph for this function:| void FIFE::CellCache::removeCellFromArea | ( | const std::string & | id, |
| Cell * | cell | ||
| ) |
Removes the cell from a area.
| A | const reference to string that contains the area id. |
| A | pointer to the cell which should be removed. |
Definition at line 1418 of file cellcache.cpp.
References m_cellAreas.
| void FIFE::CellCache::removeCellFromCost | ( | Cell * | cell | ) |
Removes a cell from costs.
| cell | A pointer to the cell. |
Definition at line 1041 of file cellcache.cpp.
References m_costsToCells.
Referenced by removeCell(), removeCellsFromCost(), and FIFE::Cell::removeInstance().
Here is the caller graph for this function:| void FIFE::CellCache::removeCellFromCost | ( | const std::string & | costId, |
| Cell * | cell | ||
| ) |
Removes a cell from a cost identifier.
| costId | A const reference to the cost identifier. |
| cell | A pointer to the cell. |
Definition at line 1052 of file cellcache.cpp.
References m_costsToCells.
| void FIFE::CellCache::removeCellsFromArea | ( | const std::string & | id, |
| const std::vector< Cell * > & | cells | ||
| ) |
Removes few cells from a area.
| A | const reference to string that contains the area id. |
| A | const reference to vector which contains the cells. |
Definition at line 1429 of file cellcache.cpp.
References removeCellFromArea().
| void FIFE::CellCache::removeCellsFromCost | ( | const std::string & | costId, |
| const std::vector< Cell * > & | cells | ||
| ) |
Removes cells from a cost identifier.
| costId | A const reference to the cost identifier. |
| cells | A const reference to a vector which contains the cells. |
Definition at line 1063 of file cellcache.cpp.
References removeCellFromCost().
| void FIFE::CellCache::removeInteractOnRuntime | ( | Layer * | interact | ) |
Removes a interact layer from the CellCache on runtime and sets all needed layer properties.
| interact | A pointer to the interact layer. |
Definition at line 768 of file cellcache.cpp.
References calculateCurrentSize(), FIFE::InstanceTree::findInstances(), getCell(), FIFE::Layer::getCellGrid(), FIFE::Layer::getInstanceTree(), FIFE::RectType< T >::h, FIFE::intPt2doublePt(), m_height, m_layer, m_size, m_width, FIFE::Cell::removeInstance(), FIFE::Layer::removeInteractLayer(), resize(), FIFE::Layer::setInteract(), FIFE::CellGrid::toLayerCoordinates(), FIFE::CellGrid::toMapCoordinates(), FIFE::RectType< T >::w, FIFE::RectType< T >::x, and FIFE::RectType< T >::y.
| void FIFE::CellCache::removeNarrowCell | ( | Cell * | cell | ) |
Removes cell from narrow cells.
| cell | A pointer to the cell. |
Definition at line 1372 of file cellcache.cpp.
References m_cellZoneListener, and m_narrowCells.
Referenced by removeCell().
Here is the caller graph for this function:| void FIFE::CellCache::removeTransition | ( | Cell * | cell | ) |
Removes a cell as transition.
| cell | A pointer to transition cell. |
Definition at line 1224 of file cellcache.cpp.
References m_transitions.
Referenced by FIFE::Cell::deleteTransition().
Here is the caller graph for this function:| void FIFE::CellCache::removeZone | ( | Zone * | zone | ) |
Removes zone.
| zone | A pointer to the zone which should be removed. |
Definition at line 1294 of file cellcache.cpp.
References m_zones.
Referenced by mergeZones(), and splitZone().
Here is the caller graph for this function:| void FIFE::CellCache::reset | ( | ) |
Resets the CellCache.
Definition at line 436 of file cellcache.cpp.
References FIFE::RectType< T >::h, m_cellAreas, m_cells, m_costMultipliers, m_costsTable, m_costsToCells, m_defaultCostMulti, m_defaultSpeedMulti, m_height, m_narrowCells, m_size, m_speedMultipliers, m_width, m_zones, FIFE::RectType< T >::w, FIFE::RectType< T >::x, and FIFE::RectType< T >::y.
Referenced by ~CellCache().
Here is the caller graph for this function:| void FIFE::CellCache::resetCostMultiplier | ( | Cell * | cell | ) |
Resets the cost multiplier for the cell.
| cell | A pointer to the cell. |
Definition at line 1186 of file cellcache.cpp.
References m_costMultipliers.
Referenced by removeCell(), and FIFE::Cell::resetCostMultiplier().
Here is the caller graph for this function:| void FIFE::CellCache::resetNarrowCells | ( | ) |
Resets narrow cells.
Definition at line 1380 of file cellcache.cpp.
References m_cellZoneListener, and m_narrowCells.
| void FIFE::CellCache::resetSpeedMultiplier | ( | Cell * | cell | ) |
Resets the speed multiplier for the cell.
| cell | A pointer to the cell. |
Definition at line 1216 of file cellcache.cpp.
References m_speedMultipliers.
Referenced by removeCell(), FIFE::Cell::removeInstance(), and FIFE::Cell::resetSpeedMultiplier().
Here is the caller graph for this function:| void FIFE::CellCache::resize | ( | ) |
Checks the layer size and if the size is different with current size then the cache size is adjusted.
Definition at line 475 of file cellcache.cpp.
References calculateCurrentSize(), and m_staticSize.
Referenced by addInteractOnRuntime(), FIFE::CellCacheChangeListener::onInstanceCreate(), removeInteractOnRuntime(), setSize(), and update().
Here is the caller graph for this function:| void FIFE::CellCache::resize | ( | const Rect & | rec | ) |
Checks the given size and if the size is different with current size then the cache is adjusted.
| rec | A rect that contains the new size in layer coordinates. |
Definition at line 484 of file cellcache.cpp.
References ABS, FIFE::Cell::addInstances(), FIFE::InstanceTree::findInstances(), FIFE::CellGrid::getAccessibleCoordinates(), getCell(), FIFE::Layer::getCellGrid(), FIFE::Layer::getInstanceTree(), FIFE::Layer::getInteractLayers(), FIFE::Cell::getLayerCoordinates(), FIFE::RectType< T >::h, FIFE::intPt2doublePt(), m_cells, m_height, m_layer, m_neighborZ, m_size, m_width, FIFE::Cell::resetNeighbors(), FIFE::Cell::setCellId(), FIFE::CellGrid::toMapCoordinates(), FIFE::RectType< T >::w, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, FIFE::PointType3D< T >::y, and FIFE::PointType3D< T >::z.
| void FIFE::CellCache::setBlockingUpdate | ( | bool | update | ) |
Definition at line 1522 of file cellcache.cpp.
References m_blockingUpdate, and update().
Referenced by FIFE::Cell::updateCellBlockingInfo().
Here is the caller graph for this function:| void FIFE::CellCache::setCostMultiplier | ( | Cell * | cell, |
| double | multi | ||
| ) |
Sets cost multiplier for the cell.
| cell | A pointer to the cell. |
| multi | A double, the cost multiplier. |
Definition at line 1168 of file cellcache.cpp.
References m_costMultipliers.
Referenced by FIFE::Cell::setCostMultiplier().
Here is the caller graph for this function:| void FIFE::CellCache::setDefaultCostMultiplier | ( | double | multi | ) |
Sets default cost for this CellCache.
| multi | A double, the cost. |
Definition at line 1144 of file cellcache.cpp.
References m_defaultCostMulti.
Referenced by FIFE::MapLoader::load().
Here is the caller graph for this function:| void FIFE::CellCache::setDefaultSpeedMultiplier | ( | double | multi | ) |
Sets default speed for this CellCache.
| multi | A double, the speed. |
Definition at line 1152 of file cellcache.cpp.
References m_defaultSpeedMulti.
Referenced by FIFE::MapLoader::load().
Here is the caller graph for this function:| void FIFE::CellCache::setFowUpdate | ( | bool | update | ) |
Definition at line 1526 of file cellcache.cpp.
References m_fowUpdate, and update().
Referenced by FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), and FIFE::Cell::removeInstance().
Here is the caller graph for this function:| void FIFE::CellCache::setMaxNeighborZ | ( | int32_t | z | ) |
Sets maximal z range for neighbors.
| z | The maximal z range as int. |
Definition at line 850 of file cellcache.cpp.
References m_neighborZ.
| void FIFE::CellCache::setSearchNarrowCells | ( | bool | search | ) |
Sets if narrow cells should be searched automatic.
| search | A boolean, if true the automatic search is enabled, otherwise false. |
Definition at line 1392 of file cellcache.cpp.
References m_searchNarrow.
Referenced by FIFE::MapLoader::load().
Here is the caller graph for this function:| void FIFE::CellCache::setSize | ( | const Rect & | rec | ) |
Sets CellCache size.
| rec | A const reference to a rect that contain new min, max coordinates. rec.x = min.x, rec.w = max.x, rec.y = min.y, rec.h = max.y |
Definition at line 810 of file cellcache.cpp.
References resize().
| void FIFE::CellCache::setSizeUpdate | ( | bool | update | ) |
Definition at line 1530 of file cellcache.cpp.
References m_sizeUpdate, and update().
Referenced by FIFE::CellCacheChangeListener::onInstanceDelete().
Here is the caller graph for this function:| void FIFE::CellCache::setSpeedMultiplier | ( | Cell * | cell, |
| double | multi | ||
| ) |
Sets speed multiplier for the cell.
| cell | A pointer to the cell. |
| multi | A double, the speed multiplier. |
Definition at line 1198 of file cellcache.cpp.
References m_speedMultipliers.
Referenced by FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), FIFE::Cell::removeInstance(), and FIFE::Cell::setSpeedMultiplier().
Here is the caller graph for this function:| void FIFE::CellCache::setStaticSize | ( | bool | staticSize | ) |
Sets the cache size to static so that automatic resize is disabled.
| A | boolean, true if the cache size is static, otherwise false. |
Definition at line 1514 of file cellcache.cpp.
References m_staticSize.
| void FIFE::CellCache::setUpdated | ( | bool | updated | ) |
Sets whether the CellCache need to be updated.
| updated | A boolean, true means no update is needed, false indicates a update. |
Definition at line 858 of file cellcache.cpp.
References m_updated.
| void FIFE::CellCache::splitZone | ( | Cell * | cell | ) |
Splits zone on the cell.
| cell | A pointer to the cell where the zone should be splited. |
Definition at line 1304 of file cellcache.cpp.
References FIFE::Zone::addCell(), createZone(), FIFE::CTYPE_CELL_BLOCKER, FIFE::CTYPE_STATIC_BLOCKER, FIFE::Zone::getCellCount(), FIFE::Cell::getCellType(), FIFE::Cell::getNeighbors(), FIFE::Cell::getZone(), FIFE::Cell::isInserted(), FIFE::Cell::isZoneProtected(), FIFE::Zone::removeCell(), removeZone(), and FIFE::Cell::setInserted().
Referenced by FIFE::ZoneCellChangeListener::onBlockingChangedCell().
Here is the caller graph for this function:| void FIFE::CellCache::unregisterAllCosts | ( | ) |
Removes all costs.
Definition at line 1016 of file cellcache.cpp.
References m_costsTable, and m_costsToCells.
| void FIFE::CellCache::unregisterCost | ( | const std::string & | costId | ) |
Removes a cost with the given id.
| costId | A const reference to a string that refs to the cost id. |
Definition at line 983 of file cellcache.cpp.
References m_costsTable, and m_costsToCells.
| void FIFE::CellCache::update | ( | ) |
Definition at line 1534 of file cellcache.cpp.
References m_blockingUpdate, m_fowUpdate, m_sizeUpdate, m_updated, and resize().
Referenced by setBlockingUpdate(), setFowUpdate(), setSizeUpdate(), and FIFE::Map::update().
Here is the caller graph for this function:
|
private |
indicates blocking update
Definition at line 653 of file cellcache.h.
Referenced by setBlockingUpdate(), and update().
|
private |
areas with assigned cells
Definition at line 680 of file cellcache.h.
Referenced by addCellToArea(), existsArea(), getAreaCells(), getAreas(), getCellAreas(), isCellInArea(), removeArea(), removeCell(), removeCellFromArea(), and reset().
|
private |
change listener
Definition at line 634 of file cellcache.h.
Referenced by addInteractOnRuntime(), CellCache(), getCellCacheChangeListener(), and ~CellCache().
|
private |
Definition at line 637 of file cellcache.h.
Referenced by addCell(), CellCache(), createCell(), createCells(), forceUpdate(), getCell(), getCells(), reset(), and resize().
|
private |
listener for zones
Definition at line 683 of file cellcache.h.
Referenced by addNarrowCell(), CellCache(), removeNarrowCell(), resetNarrowCells(), and ~CellCache().
|
private |
holds default cost multiplier, only if it is not default(1.0)
Definition at line 692 of file cellcache.h.
Referenced by getCostMultiplier(), isDefaultCost(), removeCell(), reset(), resetCostMultiplier(), and setCostMultiplier().
|
private |
holds cost table
Definition at line 686 of file cellcache.h.
Referenced by existsCost(), getCost(), getCosts(), registerCost(), reset(), unregisterAllCosts(), and unregisterCost().
|
private |
holds cells for each cost
Definition at line 689 of file cellcache.h.
Referenced by addCellToCost(), existsCostForCell(), getCellCosts(), getCostCells(), removeCell(), removeCellFromCost(), reset(), unregisterAllCosts(), and unregisterCost().
|
private |
default cost
Definition at line 628 of file cellcache.h.
Referenced by getAdjacentCost(), getDefaultCostMultiplier(), reset(), and setDefaultCostMultiplier().
|
private |
default speed
Definition at line 631 of file cellcache.h.
Referenced by getCellSpeedMultiplier(), getDefaultSpeedMultiplier(), reset(), and setDefaultSpeedMultiplier().
|
private |
indicates fow update
Definition at line 656 of file cellcache.h.
Referenced by setFowUpdate(), and update().
|
private |
cache height
Definition at line 647 of file cellcache.h.
Referenced by addInteractOnRuntime(), CellCache(), createCells(), getCell(), getHeight(), getMaxIndex(), isInCellCache(), removeInteractOnRuntime(), reset(), and resize().
|
private |
walkable layer
Definition at line 625 of file cellcache.h.
Referenced by addInteractOnRuntime(), calculateCurrentSize(), CellCache(), createCell(), createCells(), getAdjacentCost(), getCellsInLine(), getLayer(), isInCellCache(), removeInteractOnRuntime(), resize(), and ~CellCache().
|
private |
special cells which are monitored (zone split and merge)
Definition at line 677 of file cellcache.h.
Referenced by addNarrowCell(), getNarrowCells(), removeCell(), removeNarrowCell(), reset(), and resetNarrowCells().
|
private |
max z value for neighbors
Definition at line 650 of file cellcache.h.
Referenced by getMaxNeighborZ(), resize(), and setMaxNeighborZ().
|
private |
is automatic seach enabled
Definition at line 665 of file cellcache.h.
Referenced by createCells(), isSearchNarrowCells(), and setSearchNarrowCells().
|
private |
Rect holds the min and max size x = min.x, w = max.x, y = min.y, h = max.y.
Definition at line 641 of file cellcache.h.
Referenced by addCell(), addInteractOnRuntime(), CellCache(), convertCoordToInt(), convertIntToCoord(), createCell(), createCells(), getCell(), getSize(), isInCellCache(), removeInteractOnRuntime(), reset(), and resize().
|
private |
indicates size update
Definition at line 659 of file cellcache.h.
Referenced by setSizeUpdate(), and update().
|
private |
holds default speed multiplier, only if it is not default(1.0)
Definition at line 695 of file cellcache.h.
Referenced by getSpeedMultiplier(), isDefaultSpeed(), removeCell(), reset(), resetSpeedMultiplier(), and setSpeedMultiplier().
|
private |
is automatic size update enabled/disabled
Definition at line 668 of file cellcache.h.
Referenced by isStaticSize(), resize(), and setStaticSize().
|
private |
cells with transitions
Definition at line 671 of file cellcache.h.
Referenced by addTransition(), getTransitionCells(), and removeTransition().
|
private |
need update
Definition at line 662 of file cellcache.h.
Referenced by isUpdated(), setUpdated(), and update().
|
private |
cache width
Definition at line 644 of file cellcache.h.
Referenced by addInteractOnRuntime(), CellCache(), convertCoordToInt(), convertIntToCoord(), createCells(), getCell(), getMaxIndex(), getWidth(), isInCellCache(), removeInteractOnRuntime(), reset(), and resize().
|
private |
zones
Definition at line 674 of file cellcache.h.
Referenced by createZone(), getZone(), getZones(), removeZone(), and reset().