FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
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>
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... | |
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 * > | getBlockingCellsInRect (const Rect &rec) |
Returns all blocking 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 | 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_sizeUpdate |
indicates size 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 611 of file cellcache.h.
|
private |
Definition at line 610 of file cellcache.h.
|
private |
Definition at line 612 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 417 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 690 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.
id | A const reference to string that contains the area id. |
cells | A const reference to vector which contains the cells. |
Definition at line 1409 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 1043 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.
id | A const reference to string that contains the area id. |
cell | A pointer to the cell which should be added. |
Definition at line 1405 of file cellcache.cpp.
References m_cellAreas.
Referenced by addCellsToArea(), FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), and FIFE::MapLoader::load().
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 1030 of file cellcache.cpp.
References existsCost(), and m_costsToCells.
Referenced by addCellsToCost(), FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), and FIFE::MapLoader::load().
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 737 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 1370 of file cellcache.cpp.
References FIFE::Cell::addChangeListener(), m_cellZoneListener, and m_narrowCells.
Referenced by createCells(), and FIFE::MapLoader::load().
void FIFE::CellCache::addTransition | ( | Cell * | cell | ) |
Adds a cell as transition.
cell | A pointer to transition cell. |
Definition at line 1229 of file cellcache.cpp.
References m_transitions.
Referenced by FIFE::Cell::createTransition().
|
private |
Returns the current size.
Definition at line 1502 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().
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 833 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().
ModelCoordinate FIFE::CellCache::convertIntToCoord | ( | const int32_t | cell | ) | const |
Convertes unique identifier to coordinate.
cell | A const reference to the integer id which should be converted. |
Definition at line 838 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().
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 695 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().
void FIFE::CellCache::createCells | ( | ) |
Creates cells for this CellCache based on the size of the assigned layer.
Definition at line 584 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().
Zone * FIFE::CellCache::createZone | ( | ) |
Creates zone.
Definition at line 1260 of file cellcache.cpp.
References m_zones.
Referenced by createCells(), and splitZone().
bool FIFE::CellCache::existsArea | ( | const std::string & | id | ) |
Checks whether the area exists.
id | A const reference to string that contains the area id. |
Definition at line 1449 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 1008 of file cellcache.cpp.
References m_costsTable.
Referenced by addCellToCost().
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 1100 of file cellcache.cpp.
References m_costsToCells.
Referenced by getAdjacentCost(), and FIFE::MapSaver::save().
void FIFE::CellCache::forceUpdate | ( | ) |
Updates all cells.
Definition at line 680 of file cellcache.cpp.
References m_cells.
Referenced by FIFE::Map::finalizeCellCaches().
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 1111 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().
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 1124 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.
id | A const reference to string that contains the area id. |
Definition at line 1481 of file cellcache.cpp.
References m_cellAreas.
std::vector< std::string > FIFE::CellCache::getAreas | ( | ) |
Returns all area ids.
Definition at line 1457 of file cellcache.cpp.
References m_cellAreas.
Returns all blocking cells in the rect.
rec | A const reference to the Rect which specifies the size. |
Definition at line 891 of file cellcache.cpp.
References FIFE::CTYPE_NO_BLOCKER, getCell(), FIFE::Cell::getCellType(), 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.
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 704 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(), getBlockingCellsInRect(), 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::Cell::resetNeighbors(), resize(), FIFE::RoutePatherSearch::RoutePatherSearch(), FIFE::MultiLayerSearch::searchBetweenTargetsMap(), FIFE::MultiLayerSearch::searchBetweenTargetsNeighbor(), FIFE::RoutePather::solveRoute(), FIFE::SingleLayerSearch::updateSearch(), and FIFE::MultiLayerSearch::updateSearch().
std::vector< std::string > FIFE::CellCache::getCellAreas | ( | Cell * | cell | ) |
Returns all areas of a cell.
cell | A pointer to the cell. |
Definition at line 1470 of file cellcache.cpp.
References m_cellAreas.
Referenced by FIFE::MapSaver::save().
LayerChangeListener * FIFE::CellCache::getCellCacheChangeListener | ( | ) |
Returns change listener.
Definition at line 796 of file cellcache.cpp.
References m_cellListener.
Referenced by FIFE::Layer::destroyCellCache(), and FIFE::Layer::removeInteractLayer().
std::vector< std::string > FIFE::CellCache::getCellCosts | ( | Cell * | cell | ) |
Returns cost identifiers for cell.
cell | A pointer to the cell. |
Definition at line 1089 of file cellcache.cpp.
References m_costsToCells.
Referenced by FIFE::CellRenderer::render().
const std::vector< std::vector< Cell * > > & FIFE::CellCache::getCells | ( | ) |
Returns all cells of this CellCache.
Definition at line 715 of file cellcache.cpp.
References m_cells.
Referenced by FIFE::BlockingInfoRenderer::render(), and FIFE::MapSaver::save().
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 909 of file cellcache.cpp.
References utf8::distance(), getCell(), FIFE::PointType3D< T >::x, and FIFE::PointType3D< T >::y.
Referenced by getCellsInCircleSegment().
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 961 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 856 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 873 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::TriggerController::createTriggerOnRect(), FIFE::TriggerController::removeTriggerFromRect(), and FIFE::CellRenderer::render().
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 1141 of file cellcache.cpp.
References FIFE::Cell::defaultSpeed(), getCell(), FIFE::Cell::getSpeedMultiplier(), and m_defaultSpeedMulti.
Referenced by FIFE::RoutePather::followRoute().
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 1000 of file cellcache.cpp.
References m_costsTable.
Referenced by getAdjacentCost(), FIFE::CellRenderer::render(), and FIFE::MapSaver::save().
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 1079 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 1186 of file cellcache.cpp.
References m_costMultipliers.
Referenced by FIFE::Cell::getCostMultiplier().
std::list< std::string > FIFE::CellCache::getCosts | ( | ) |
Returns all registered cost ids.
Definition at line 1016 of file cellcache.cpp.
References m_costsTable.
Referenced by FIFE::MapSaver::save().
double FIFE::CellCache::getDefaultCostMultiplier | ( | ) |
Gets default cost for this CellCache.
Definition at line 1157 of file cellcache.cpp.
References m_defaultCostMulti.
Referenced by FIFE::MapSaver::save().
double FIFE::CellCache::getDefaultSpeedMultiplier | ( | ) |
Gets default speed for this CellCache.
Definition at line 1165 of file cellcache.cpp.
References m_defaultSpeedMulti.
Referenced by FIFE::RoutePather::followRoute(), and FIFE::MapSaver::save().
uint32_t FIFE::CellCache::getHeight | ( | ) |
Returns height of the CellCache.
Definition at line 816 of file cellcache.cpp.
References m_height.
Layer * FIFE::CellCache::getLayer | ( | ) |
Returns layer.
Definition at line 800 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().
int32_t FIFE::CellCache::getMaxIndex | ( | ) | const |
Returns the number of cells on this CellCache.
Definition at line 843 of file cellcache.cpp.
References m_height, and m_width.
Referenced by FIFE::MultiLayerSearch::createSearchFrontier(), and FIFE::SingleLayerSearch::SingleLayerSearch().
int32_t FIFE::CellCache::getMaxNeighborZ | ( | ) |
Gets maximal z range for neighbors.
By default disabled with the value -1.
Definition at line 852 of file cellcache.cpp.
References m_neighborZ.
const std::set< Cell * > & FIFE::CellCache::getNarrowCells | ( | ) |
Returns narrow cells.
Definition at line 1377 of file cellcache.cpp.
References m_narrowCells.
Referenced by FIFE::MapSaver::save().
const Rect & FIFE::CellCache::getSize | ( | ) |
Returns CellCache size.
Definition at line 804 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 1216 of file cellcache.cpp.
References m_speedMultipliers.
Referenced by FIFE::Cell::getSpeedMultiplier().
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 1243 of file cellcache.cpp.
References FIFE::TransitionInfo::m_layer, and m_transitions.
Referenced by FIFE::MultiLayerSearch::searchBetweenTargetsMap(), and FIFE::MultiLayerSearch::searchBetweenTargetsNeighbor().
uint32_t FIFE::CellCache::getWidth | ( | ) |
Returns width of the CellCache.
Definition at line 812 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 1286 of file cellcache.cpp.
References m_zones.
const std::vector< Zone * > & FIFE::CellCache::getZones | ( | ) |
Returns zones of this CellCache.
Definition at line 1282 of file cellcache.cpp.
References m_zones.
Referenced by FIFE::MultiLayerSearch::searchBetweenTargetsMap().
bool FIFE::CellCache::isCellInArea | ( | const std::string & | id, |
Cell * | cell | ||
) |
Returns true if cell is part of the area, otherwise false.
id | A const reference to string that contains the area id. |
cell | A pointer to the cell which is used for the check. |
Definition at line 1491 of file cellcache.cpp.
References m_cellAreas.
Referenced by FIFE::RoutePather::solveRoute(), FIFE::SingleLayerSearch::updateSearch(), and FIFE::MultiLayerSearch::updateSearch().
bool FIFE::CellCache::isDefaultCost | ( | Cell * | cell | ) |
Gets if cell uses default cost multiplier.
cell | A pointer to the cell. |
Definition at line 1169 of file cellcache.cpp.
References m_costMultipliers.
Referenced by FIFE::Cell::defaultCost().
bool FIFE::CellCache::isDefaultSpeed | ( | Cell * | cell | ) |
Gets if cell uses default speed multiplier.
cell | A pointer to the cell. |
Definition at line 1199 of file cellcache.cpp.
References m_speedMultipliers.
Referenced by FIFE::Cell::defaultSpeed().
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 820 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().
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 1397 of file cellcache.cpp.
References m_searchNarrow.
Referenced by FIFE::MapSaver::save().
bool FIFE::CellCache::isStaticSize | ( | ) |
Returns if the cache size is static.
Definition at line 1527 of file cellcache.cpp.
References m_staticSize.
Merges two zones to one.
zone1 | A pointer to the first zone. |
zone2 | A pointer to the second zone. |
Definition at line 1356 of file cellcache.cpp.
References FIFE::Zone::getCellCount(), FIFE::Zone::mergeZone(), and removeZone().
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 983 of file cellcache.cpp.
References m_costsTable.
Referenced by FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), and FIFE::MapLoader::load().
void FIFE::CellCache::removeArea | ( | const std::string & | id | ) |
Removes a area.
id | A const reference to string that contains the area id. |
Definition at line 1445 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 719 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().
void FIFE::CellCache::removeCellFromArea | ( | Cell * | cell | ) |
Removes the cell from all areas.
cell | A pointer to the cell which should be removed. |
Definition at line 1416 of file cellcache.cpp.
References m_cellAreas.
Referenced by removeCell(), removeCellsFromArea(), and FIFE::Cell::removeInstance().
void FIFE::CellCache::removeCellFromArea | ( | const std::string & | id, |
Cell * | cell | ||
) |
Removes the cell from a area.
id | A const reference to string that contains the area id. |
cell | A pointer to the cell which should be removed. |
Definition at line 1427 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 1050 of file cellcache.cpp.
References m_costsToCells.
Referenced by removeCell(), removeCellsFromCost(), and FIFE::Cell::removeInstance().
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 1061 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.
id | A const reference to string that contains the area id. |
cells | A const reference to vector which contains the cells. |
Definition at line 1438 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 1072 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 766 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 1381 of file cellcache.cpp.
References m_cellZoneListener, and m_narrowCells.
Referenced by removeCell().
void FIFE::CellCache::removeTransition | ( | Cell * | cell | ) |
Removes a cell as transition.
cell | A pointer to transition cell. |
Definition at line 1233 of file cellcache.cpp.
References m_transitions.
Referenced by FIFE::Cell::deleteTransition().
void FIFE::CellCache::removeZone | ( | Zone * | zone | ) |
Removes zone.
zone | A pointer to the zone which should be removed. |
Definition at line 1303 of file cellcache.cpp.
References m_zones.
Referenced by mergeZones(), and splitZone().
void FIFE::CellCache::reset | ( | ) |
Resets the CellCache.
Definition at line 434 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().
void FIFE::CellCache::resetCostMultiplier | ( | Cell * | cell | ) |
Resets the cost multiplier for the cell.
cell | A pointer to the cell. |
Definition at line 1195 of file cellcache.cpp.
References m_costMultipliers.
Referenced by removeCell(), and FIFE::Cell::resetCostMultiplier().
void FIFE::CellCache::resetNarrowCells | ( | ) |
Resets narrow cells.
Definition at line 1389 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 1225 of file cellcache.cpp.
References m_speedMultipliers.
Referenced by removeCell(), FIFE::Cell::removeInstance(), and FIFE::Cell::resetSpeedMultiplier().
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 473 of file cellcache.cpp.
References calculateCurrentSize(), and m_staticSize.
Referenced by addInteractOnRuntime(), FIFE::CellCacheChangeListener::onInstanceCreate(), removeInteractOnRuntime(), setSize(), and update().
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 482 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 1531 of file cellcache.cpp.
References m_blockingUpdate, and update().
Referenced by FIFE::Cell::updateCellBlockingInfo().
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 1177 of file cellcache.cpp.
References m_costMultipliers.
Referenced by FIFE::Cell::setCostMultiplier().
void FIFE::CellCache::setDefaultCostMultiplier | ( | double | multi | ) |
Sets default cost for this CellCache.
multi | A double, the cost. |
Definition at line 1153 of file cellcache.cpp.
References m_defaultCostMulti.
Referenced by FIFE::MapLoader::load().
void FIFE::CellCache::setDefaultSpeedMultiplier | ( | double | multi | ) |
Sets default speed for this CellCache.
multi | A double, the speed. |
Definition at line 1161 of file cellcache.cpp.
References m_defaultSpeedMulti.
Referenced by FIFE::MapLoader::load().
void FIFE::CellCache::setMaxNeighborZ | ( | int32_t | z | ) |
Sets maximal z range for neighbors.
z | The maximal z range as int. |
Definition at line 848 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 1401 of file cellcache.cpp.
References m_searchNarrow.
Referenced by FIFE::MapLoader::load().
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 808 of file cellcache.cpp.
References resize().
void FIFE::CellCache::setSizeUpdate | ( | bool | update | ) |
Definition at line 1535 of file cellcache.cpp.
References m_sizeUpdate, and update().
Referenced by FIFE::CellCacheChangeListener::onInstanceDelete().
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 1207 of file cellcache.cpp.
References m_speedMultipliers.
Referenced by FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), FIFE::Cell::removeInstance(), and FIFE::Cell::setSpeedMultiplier().
void FIFE::CellCache::setStaticSize | ( | bool | staticSize | ) |
Sets the cache size to static so that automatic resize is disabled.
staticSize | A boolean, true if the cache size is static, otherwise false. |
Definition at line 1523 of file cellcache.cpp.
References m_staticSize.
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 1313 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().
void FIFE::CellCache::unregisterAllCosts | ( | ) |
Removes all costs.
Definition at line 1025 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 992 of file cellcache.cpp.
References m_costsTable, and m_costsToCells.
void FIFE::CellCache::update | ( | ) |
Definition at line 1539 of file cellcache.cpp.
References m_blockingUpdate, m_sizeUpdate, and resize().
Referenced by setBlockingUpdate(), setSizeUpdate(), and FIFE::Map::update().
|
private |
indicates blocking update
Definition at line 648 of file cellcache.h.
Referenced by setBlockingUpdate(), and update().
|
private |
areas with assigned cells
Definition at line 669 of file cellcache.h.
Referenced by addCellToArea(), existsArea(), getAreaCells(), getAreas(), getCellAreas(), isCellInArea(), removeArea(), removeCell(), removeCellFromArea(), and reset().
|
private |
change listener
Definition at line 629 of file cellcache.h.
Referenced by addInteractOnRuntime(), CellCache(), getCellCacheChangeListener(), and ~CellCache().
|
private |
Definition at line 632 of file cellcache.h.
Referenced by addCell(), CellCache(), createCell(), createCells(), forceUpdate(), getCell(), getCells(), reset(), and resize().
|
private |
listener for zones
Definition at line 672 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 681 of file cellcache.h.
Referenced by getCostMultiplier(), isDefaultCost(), removeCell(), reset(), resetCostMultiplier(), and setCostMultiplier().
|
private |
holds cost table
Definition at line 675 of file cellcache.h.
Referenced by existsCost(), getCost(), getCosts(), registerCost(), reset(), unregisterAllCosts(), and unregisterCost().
|
private |
holds cells for each cost
Definition at line 678 of file cellcache.h.
Referenced by addCellToCost(), existsCostForCell(), getCellCosts(), getCostCells(), removeCell(), removeCellFromCost(), reset(), unregisterAllCosts(), and unregisterCost().
|
private |
default cost
Definition at line 623 of file cellcache.h.
Referenced by getAdjacentCost(), getDefaultCostMultiplier(), reset(), and setDefaultCostMultiplier().
|
private |
default speed
Definition at line 626 of file cellcache.h.
Referenced by getCellSpeedMultiplier(), getDefaultSpeedMultiplier(), reset(), and setDefaultSpeedMultiplier().
|
private |
cache height
Definition at line 642 of file cellcache.h.
Referenced by addInteractOnRuntime(), CellCache(), createCells(), getCell(), getHeight(), getMaxIndex(), isInCellCache(), removeInteractOnRuntime(), reset(), and resize().
|
private |
walkable layer
Definition at line 620 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 666 of file cellcache.h.
Referenced by addNarrowCell(), getNarrowCells(), removeCell(), removeNarrowCell(), reset(), and resetNarrowCells().
|
private |
max z value for neighbors
Definition at line 645 of file cellcache.h.
Referenced by getMaxNeighborZ(), resize(), and setMaxNeighborZ().
|
private |
is automatic seach enabled
Definition at line 654 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 636 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 651 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 684 of file cellcache.h.
Referenced by getSpeedMultiplier(), isDefaultSpeed(), removeCell(), reset(), resetSpeedMultiplier(), and setSpeedMultiplier().
|
private |
is automatic size update enabled/disabled
Definition at line 657 of file cellcache.h.
Referenced by isStaticSize(), resize(), and setStaticSize().
|
private |
cells with transitions
Definition at line 660 of file cellcache.h.
Referenced by addTransition(), getTransitionCells(), and removeTransition().
|
private |
cache width
Definition at line 639 of file cellcache.h.
Referenced by addInteractOnRuntime(), CellCache(), convertCoordToInt(), convertIntToCoord(), createCells(), getCell(), getMaxIndex(), getWidth(), isInCellCache(), removeInteractOnRuntime(), reset(), and resize().
|
private |
zones
Definition at line 663 of file cellcache.h.
Referenced by createZone(), getZone(), getZones(), removeZone(), and reset().