FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
FIFE::CellCache Class Reference

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...
 
CellcreateCell (const ModelCoordinate &mc)
 Creates cell on this CellCache. More...
 
CellgetCell (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...
 
LayerChangeListenergetCellCacheChangeListener ()
 Returns change listener. More...
 
LayergetLayer ()
 Returns layer. More...
 
const RectgetSize ()
 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 &center, uint16_t radius)
 Returns all cells in the circle. More...
 
std::vector< Cell * > getCellsInCircleSegment (const ModelCoordinate &center, 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...
 
ZonegetZone (uint32_t id)
 Gets zone by identifier. More...
 
ZonecreateZone ()
 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, StringCellIteratorStringCellPair
 

Private Member Functions

Rect calculateCurrentSize ()
 Returns the current size. More...
 

Private Attributes

Layerm_layer
 walkable layer More...
 
double m_defaultCostMulti
 default cost More...
 
double m_defaultSpeedMulti
 default speed More...
 
LayerChangeListenerm_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...
 
CellChangeListenerm_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...
 

Detailed Description

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.

Member Typedef Documentation

◆ StringCellIterator

typedef StringCellMultimap::iterator FIFE::CellCache::StringCellIterator
private

Definition at line 611 of file cellcache.h.

◆ StringCellMultimap

typedef std::multimap<std::string, Cell*> FIFE::CellCache::StringCellMultimap
private

Definition at line 610 of file cellcache.h.

◆ StringCellPair

Definition at line 612 of file cellcache.h.

Constructor & Destructor Documentation

◆ CellCache()

◆ ~CellCache()

FIFE::CellCache::~CellCache ( )

Member Function Documentation

◆ addCell()

void FIFE::CellCache::addCell ( Cell cell)

Adds cell to this CellCache.

Parameters
cellA 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.

◆ addCellsToArea()

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.

Parameters
idA const reference to string that contains the area id.
cellsA const reference to vector which contains the cells.

Definition at line 1409 of file cellcache.cpp.

References addCellToArea().

◆ addCellsToCost()

void FIFE::CellCache::addCellsToCost ( const std::string &  costId,
const std::vector< Cell *> &  cells 
)

Assigns cells to a cost identifier.

Parameters
costIdA const reference to the cost identifier.
cellsA const reference to a vector which contains the cells.

Definition at line 1043 of file cellcache.cpp.

References addCellToCost().

◆ addCellToArea()

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.

Parameters
idA const reference to string that contains the area id.
cellA 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().

+ Here is the caller graph for this function:

◆ addCellToCost()

void FIFE::CellCache::addCellToCost ( const std::string &  costId,
Cell cell 
)

Assigns a cell to a cost identifier.

Parameters
costIdA const reference to the cost identifier.
cellA 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().

+ Here is the caller graph for this function:

◆ addInteractOnRuntime()

◆ addNarrowCell()

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.

Parameters
cellA 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().

+ Here is the caller graph for this function:

◆ addTransition()

void FIFE::CellCache::addTransition ( Cell cell)

Adds a cell as transition.

Parameters
cellA pointer to transition cell.

Definition at line 1229 of file cellcache.cpp.

References m_transitions.

Referenced by FIFE::Cell::createTransition().

+ Here is the caller graph for this function:

◆ calculateCurrentSize()

Rect FIFE::CellCache::calculateCurrentSize ( )
private

Returns the current size.

Returns
A rect that contains the min, max coordinates.

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().

+ Here is the caller graph for this function:

◆ convertCoordToInt()

int32_t FIFE::CellCache::convertCoordToInt ( const ModelCoordinate coord) const

Convertes coordinate to unique identifier.

Parameters
coordA const reference to ModelCoordinate which should be converted.
Returns
A integer, the cell identifier.

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().

+ Here is the caller graph for this function:

◆ convertIntToCoord()

ModelCoordinate FIFE::CellCache::convertIntToCoord ( const int32_t  cell) const

Convertes unique identifier to coordinate.

Parameters
cellA const reference to the integer id which should be converted.
Returns
A ModelCoordinate, contain the cell coordinate.

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().

+ Here is the caller graph for this function:

◆ createCell()

Cell * FIFE::CellCache::createCell ( const ModelCoordinate mc)

Creates cell on this CellCache.

Parameters
mcA const reference to ModelCoordinate where the cell should be created.
Returns
A pointer to the new cell.

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().

+ Here is the caller graph for this function:

◆ createCells()

◆ createZone()

Zone * FIFE::CellCache::createZone ( )

Creates zone.

Returns
A pointer to the new zone.

Definition at line 1260 of file cellcache.cpp.

References m_zones.

Referenced by createCells(), and splitZone().

+ Here is the caller graph for this function:

◆ existsArea()

bool FIFE::CellCache::existsArea ( const std::string &  id)

Checks whether the area exists.

Parameters
idA const reference to string that contains the area id.
Returns
A boolean, true if the area id exists, otherwise false.

Definition at line 1449 of file cellcache.cpp.

References m_cellAreas.

◆ existsCost()

bool FIFE::CellCache::existsCost ( const std::string &  costId)

Returns if the cost for the given id exists.

Returns
True if cost id could be found otherwise false.

Definition at line 1008 of file cellcache.cpp.

References m_costsTable.

Referenced by addCellToCost().

+ Here is the caller graph for this function:

◆ existsCostForCell()

bool FIFE::CellCache::existsCostForCell ( const std::string &  costId,
Cell cell 
)

Gets if cell is assigned to cost identifier.

Parameters
costIdA const reference to the cost identifier.
cellA pointer to the cell.
Returns
A boolean, true if the cell is assigned to the cost identifier, otherwise false.

Definition at line 1100 of file cellcache.cpp.

References m_costsToCells.

Referenced by getAdjacentCost(), and FIFE::MapSaver::save().

+ Here is the caller graph for this function:

◆ forceUpdate()

void FIFE::CellCache::forceUpdate ( )

Updates all cells.

Definition at line 680 of file cellcache.cpp.

References m_cells.

Referenced by FIFE::Map::finalizeCellCaches().

+ Here is the caller graph for this function:

◆ getAdjacentCost() [1/2]

double FIFE::CellCache::getAdjacentCost ( const ModelCoordinate adjacent,
const ModelCoordinate next 
)

Returns cost for movement between these two adjacent coordinates.

Parameters
adjacentA const reference to the start ModelCoordinate.
nextA const reference to the end ModelCoordinate.
Returns
A double which represents the cost.

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().

+ Here is the caller graph for this function:

◆ getAdjacentCost() [2/2]

double FIFE::CellCache::getAdjacentCost ( const ModelCoordinate adjacent,
const ModelCoordinate next,
const std::string &  costId 
)

Returns cost for movement between these two adjacent coordinates.

Parameters
adjacentA const reference to the start ModelCoordinate.
nextA const reference to the end ModelCoordinate.
costIdA const reference to the string that contain a cost identifier.
Returns
A double which represents the cost.

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.

◆ getAreaCells()

std::vector< Cell * > FIFE::CellCache::getAreaCells ( const std::string &  id)

Returns all cells of an area.

Parameters
idA const reference to string that contains the area id.
Returns
A vector that contains the cells from the area.

Definition at line 1481 of file cellcache.cpp.

References m_cellAreas.

◆ getAreas()

std::vector< std::string > FIFE::CellCache::getAreas ( )

Returns all area ids.

Returns
A vector that contains the area ids.

Definition at line 1457 of file cellcache.cpp.

References m_cellAreas.

◆ getBlockingCellsInRect()

std::vector< Cell * > FIFE::CellCache::getBlockingCellsInRect ( const Rect rec)

Returns all blocking cells in the rect.

Parameters
recA const reference to the Rect which specifies the size.
Returns
A vector that contain the cells.

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.

◆ getCell()

Cell * FIFE::CellCache::getCell ( const ModelCoordinate mc)

◆ getCellAreas()

std::vector< std::string > FIFE::CellCache::getCellAreas ( Cell cell)

Returns all areas of a cell.

Parameters
cellA pointer to the cell.
Returns
A vector that contains the area ids.

Definition at line 1470 of file cellcache.cpp.

References m_cellAreas.

Referenced by FIFE::MapSaver::save().

+ Here is the caller graph for this function:

◆ getCellCacheChangeListener()

LayerChangeListener * FIFE::CellCache::getCellCacheChangeListener ( )

Returns change listener.

Returns
A pointer to the change listener.

Definition at line 796 of file cellcache.cpp.

References m_cellListener.

Referenced by FIFE::Layer::destroyCellCache(), and FIFE::Layer::removeInteractLayer().

+ Here is the caller graph for this function:

◆ getCellCosts()

std::vector< std::string > FIFE::CellCache::getCellCosts ( Cell cell)

Returns cost identifiers for cell.

Parameters
cellA pointer to the cell.
Returns
A vector which contains the cost ids.

Definition at line 1089 of file cellcache.cpp.

References m_costsToCells.

Referenced by FIFE::CellRenderer::render().

+ Here is the caller graph for this function:

◆ getCells()

const std::vector< std::vector< Cell * > > & FIFE::CellCache::getCells ( )

Returns all cells of this CellCache.

Returns
A const reference to a two dimensional vector which contain all cells.

Definition at line 715 of file cellcache.cpp.

References m_cells.

Referenced by FIFE::BlockingInfoRenderer::render(), and FIFE::MapSaver::save().

+ Here is the caller graph for this function:

◆ getCellsInCircle()

std::vector< Cell * > FIFE::CellCache::getCellsInCircle ( const ModelCoordinate center,
uint16_t  radius 
)

Returns all cells in the circle.

Parameters
centerA const reference to the ModelCoordinate where the center of the circle is.
radiusA unsigned integer, radius of the circle.
Returns
A vector that contain the cells.

Definition at line 909 of file cellcache.cpp.

References utf8::distance(), getCell(), FIFE::PointType3D< T >::x, and FIFE::PointType3D< T >::y.

Referenced by getCellsInCircleSegment().

+ Here is the caller graph for this function:

◆ 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.

Parameters
centerA const reference to the ModelCoordinate where the center of the circle is.
radiusA unsigned integer, radius of the circle.
sangleA interger, start angle of the segment.
eangleA interger, end angle of the segment.
Returns
A vector that contain the cells.

Definition at line 961 of file cellcache.cpp.

References FIFE::getAngleBetween(), getCellsInCircle(), FIFE::intPt2doublePt(), FIFE::PointType3D< T >::x, and FIFE::PointType3D< T >::y.

◆ getCellsInLine()

std::vector< Cell * > FIFE::CellCache::getCellsInLine ( const ModelCoordinate pt1,
const ModelCoordinate pt2,
bool  blocker = false 
)

Returns all cells in the line.

Parameters
pt1A const reference to the ModelCoordinate where the line begin.
pt2A const reference to the ModelCoordinate where the line end.
blockerA boolean, true stops when a blocker is found, false ignored blocker.
Returns
A vector that contain the cells.

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.

◆ getCellsInRect()

std::vector< Cell * > FIFE::CellCache::getCellsInRect ( const Rect rec)

Returns all cells in the rect.

Parameters
recA const reference to the Rect which specifies the size.
Returns
A vector that contain the cells.

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().

+ Here is the caller graph for this function:

◆ getCellSpeedMultiplier()

bool FIFE::CellCache::getCellSpeedMultiplier ( const ModelCoordinate cell,
double &  multiplier 
)

Returns speed value from cell.

Parameters
cellA const reference to the cell ModelCoordinate.
multiplierA reference to a double which receives the speed value.
Returns
A boolean, true if on next cell use special speed, otherwise false.

Definition at line 1141 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:

◆ getCost()

double FIFE::CellCache::getCost ( const std::string &  costId)

Returns the cost value for the given id.

Parameters
costIdA const reference to a string that refs to the cost id.
Returns
cost value as a double, if cost id can not be found 1.0 is returned.

Definition at line 1000 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:

◆ getCostCells()

std::vector< Cell * > FIFE::CellCache::getCostCells ( const std::string &  costId)

Returns cells for a cost identifier.

Parameters
costIdA const reference to the cost identifier.
Returns
A vector which contains the cells.

Definition at line 1079 of file cellcache.cpp.

References m_costsToCells.

◆ getCostMultiplier()

double FIFE::CellCache::getCostMultiplier ( Cell cell)

Returns cost multiplier for the cell.

Parameters
cellA pointer to the cell.
Returns
A double, the cost multiplier. 1.0 is default.

Definition at line 1186 of file cellcache.cpp.

References m_costMultipliers.

Referenced by FIFE::Cell::getCostMultiplier().

+ Here is the caller graph for this function:

◆ getCosts()

std::list< std::string > FIFE::CellCache::getCosts ( )

Returns all registered cost ids.

Returns
A list that contains the cost ids.

Definition at line 1016 of file cellcache.cpp.

References m_costsTable.

Referenced by FIFE::MapSaver::save().

+ Here is the caller graph for this function:

◆ getDefaultCostMultiplier()

double FIFE::CellCache::getDefaultCostMultiplier ( )

Gets default cost for this CellCache.

Returns
A double, the cost.

Definition at line 1157 of file cellcache.cpp.

References m_defaultCostMulti.

Referenced by FIFE::MapSaver::save().

+ Here is the caller graph for this function:

◆ getDefaultSpeedMultiplier()

double FIFE::CellCache::getDefaultSpeedMultiplier ( )

Gets default speed for this CellCache.

Returns
A double, the speed.

Definition at line 1165 of file cellcache.cpp.

References m_defaultSpeedMulti.

Referenced by FIFE::RoutePather::followRoute(), and FIFE::MapSaver::save().

+ Here is the caller graph for this function:

◆ getHeight()

uint32_t FIFE::CellCache::getHeight ( )

Returns height of the CellCache.

Returns
A unsigned integer that is the height.

Definition at line 816 of file cellcache.cpp.

References m_height.

◆ getLayer()

Layer * FIFE::CellCache::getLayer ( )

Returns layer.

Returns
A pointer to the layer this CellCache is based on.

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().

+ Here is the caller graph for this function:

◆ getMaxIndex()

int32_t FIFE::CellCache::getMaxIndex ( ) const

Returns the number of cells on this CellCache.

Returns
A integer value, the number of cells.

Definition at line 843 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:

◆ getMaxNeighborZ()

int32_t FIFE::CellCache::getMaxNeighborZ ( )

Gets maximal z range for neighbors.

By default disabled with the value -1.

Returns
The maximal z range as int.

Definition at line 852 of file cellcache.cpp.

References m_neighborZ.

◆ getNarrowCells()

const std::set< Cell * > & FIFE::CellCache::getNarrowCells ( )

Returns narrow cells.

Returns
A const reference to a set which contains the cells.

Definition at line 1377 of file cellcache.cpp.

References m_narrowCells.

Referenced by FIFE::MapSaver::save().

+ Here is the caller graph for this function:

◆ getSize()

const Rect & FIFE::CellCache::getSize ( )

Returns CellCache size.

Returns
A const reference to rect that contain the min and max coordinates.

Definition at line 804 of file cellcache.cpp.

References m_size.

◆ getSpeedMultiplier()

double FIFE::CellCache::getSpeedMultiplier ( Cell cell)

Returns speed multiplier for the cell.

Parameters
cellA pointer to the cell.
Returns
A double, the speed multiplier. 1.0 is default.

Definition at line 1216 of file cellcache.cpp.

References m_speedMultipliers.

Referenced by FIFE::Cell::getSpeedMultiplier().

+ Here is the caller graph for this function:

◆ getTransitionCells()

std::vector< Cell * > FIFE::CellCache::getTransitionCells ( Layer layer = NULL)

Returns transistion cells of this CellCache.

Parameters
layerA pointer to the layer which should be the target of the transition. If NULL all transistions be returned.
Returns
A vector which contains the transition cells.

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().

+ Here is the caller graph for this function:

◆ getWidth()

uint32_t FIFE::CellCache::getWidth ( )

Returns width of the CellCache.

Returns
A unsigned integer that is the width.

Definition at line 812 of file cellcache.cpp.

References m_width.

◆ getZone()

Zone * FIFE::CellCache::getZone ( uint32_t  id)

Gets zone by identifier.

Parameters
idA unsigned integer which is used as zone identifier,
Returns
A pointer to the zone.

Definition at line 1286 of file cellcache.cpp.

References m_zones.

◆ getZones()

const std::vector< Zone * > & FIFE::CellCache::getZones ( )

Returns zones of this CellCache.

Returns
A vector which contains the zones.

Definition at line 1282 of file cellcache.cpp.

References m_zones.

Referenced by FIFE::MultiLayerSearch::searchBetweenTargetsMap().

+ Here is the caller graph for this function:

◆ isCellInArea()

bool FIFE::CellCache::isCellInArea ( const std::string &  id,
Cell cell 
)

Returns true if cell is part of the area, otherwise false.

Parameters
idA const reference to string that contains the area id.
cellA pointer to the cell which is used for the check.
Returns
A boolean, true if the cell is part of the area, otherwise false.

Definition at line 1491 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:

◆ isDefaultCost()

bool FIFE::CellCache::isDefaultCost ( Cell cell)

Gets if cell uses default cost multiplier.

Parameters
cellA pointer to the cell.
Returns
A boolean, true if the cell uses default cost multiplier, otherwise false.

Definition at line 1169 of file cellcache.cpp.

References m_costMultipliers.

Referenced by FIFE::Cell::defaultCost().

+ Here is the caller graph for this function:

◆ isDefaultSpeed()

bool FIFE::CellCache::isDefaultSpeed ( Cell cell)

Gets if cell uses default speed multiplier.

Parameters
cellA pointer to the cell.
Returns
A boolean, true if the cell uses default speed multiplier, otherwise false.

Definition at line 1199 of file cellcache.cpp.

References m_speedMultipliers.

Referenced by FIFE::Cell::defaultSpeed().

+ Here is the caller graph for this function:

◆ isInCellCache()

bool FIFE::CellCache::isInCellCache ( const Location location) const

Checks whether the location is in CellCache range.

Parameters
locationA const reference to location which should be checked.
Returns
A boolean, true if the location is in range, otherwise false.

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().

+ Here is the caller graph for this function:

◆ isSearchNarrowCells()

bool FIFE::CellCache::isSearchNarrowCells ( )

Gets if narrow cells should be searched automatic.

Note that narrow cells will only saved if this is disabled.

Returns
A boolean, if true the automatic search is enabled, otherwise false.

Definition at line 1397 of file cellcache.cpp.

References m_searchNarrow.

Referenced by FIFE::MapSaver::save().

+ Here is the caller graph for this function:

◆ isStaticSize()

bool FIFE::CellCache::isStaticSize ( )

Returns if the cache size is static.

Returns
A boolean, true if the cache size is static, otherwise false.

Definition at line 1527 of file cellcache.cpp.

References m_staticSize.

◆ mergeZones()

void FIFE::CellCache::mergeZones ( Zone zone1,
Zone zone2 
)

Merges two zones to one.

Parameters
zone1A pointer to the first zone.
zone2A pointer to the second zone.

Definition at line 1356 of file cellcache.cpp.

References FIFE::Zone::getCellCount(), FIFE::Zone::mergeZone(), and removeZone().

◆ registerCost()

void FIFE::CellCache::registerCost ( const std::string &  costId,
double  cost 
)

Adds a cost with the given id and value.

Parameters
costIdA const reference to a string that refs to the cost id.
costA 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().

+ Here is the caller graph for this function:

◆ removeArea()

void FIFE::CellCache::removeArea ( const std::string &  id)

Removes a area.

Parameters
idA const reference to string that contains the area id.

Definition at line 1445 of file cellcache.cpp.

References m_cellAreas.

◆ removeCell()

void FIFE::CellCache::removeCell ( Cell cell)

Removes cell from CellCache.

Removes cell from cost table, special cost and speed, futhermore from areas and narrows.

Parameters
cellA 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().

+ Here is the caller graph for this function:

◆ removeCellFromArea() [1/2]

void FIFE::CellCache::removeCellFromArea ( Cell cell)

Removes the cell from all areas.

Parameters
cellA 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().

+ Here is the caller graph for this function:

◆ removeCellFromArea() [2/2]

void FIFE::CellCache::removeCellFromArea ( const std::string &  id,
Cell cell 
)

Removes the cell from a area.

Parameters
idA const reference to string that contains the area id.
cellA pointer to the cell which should be removed.

Definition at line 1427 of file cellcache.cpp.

References m_cellAreas.

◆ removeCellFromCost() [1/2]

void FIFE::CellCache::removeCellFromCost ( Cell cell)

Removes a cell from costs.

Parameters
cellA pointer to the cell.

Definition at line 1050 of file cellcache.cpp.

References m_costsToCells.

Referenced by removeCell(), removeCellsFromCost(), and FIFE::Cell::removeInstance().

+ Here is the caller graph for this function:

◆ removeCellFromCost() [2/2]

void FIFE::CellCache::removeCellFromCost ( const std::string &  costId,
Cell cell 
)

Removes a cell from a cost identifier.

Parameters
costIdA const reference to the cost identifier.
cellA pointer to the cell.

Definition at line 1061 of file cellcache.cpp.

References m_costsToCells.

◆ removeCellsFromArea()

void FIFE::CellCache::removeCellsFromArea ( const std::string &  id,
const std::vector< Cell *> &  cells 
)

Removes few cells from a area.

Parameters
idA const reference to string that contains the area id.
cellsA const reference to vector which contains the cells.

Definition at line 1438 of file cellcache.cpp.

References removeCellFromArea().

◆ removeCellsFromCost()

void FIFE::CellCache::removeCellsFromCost ( const std::string &  costId,
const std::vector< Cell *> &  cells 
)

Removes cells from a cost identifier.

Parameters
costIdA const reference to the cost identifier.
cellsA const reference to a vector which contains the cells.

Definition at line 1072 of file cellcache.cpp.

References removeCellFromCost().

◆ removeInteractOnRuntime()

◆ removeNarrowCell()

void FIFE::CellCache::removeNarrowCell ( Cell cell)

Removes cell from narrow cells.

Parameters
cellA pointer to the cell.

Definition at line 1381 of file cellcache.cpp.

References m_cellZoneListener, and m_narrowCells.

Referenced by removeCell().

+ Here is the caller graph for this function:

◆ removeTransition()

void FIFE::CellCache::removeTransition ( Cell cell)

Removes a cell as transition.

Parameters
cellA pointer to transition cell.

Definition at line 1233 of file cellcache.cpp.

References m_transitions.

Referenced by FIFE::Cell::deleteTransition().

+ Here is the caller graph for this function:

◆ removeZone()

void FIFE::CellCache::removeZone ( Zone zone)

Removes zone.

Parameters
zoneA pointer to the zone which should be removed.

Definition at line 1303 of file cellcache.cpp.

References m_zones.

Referenced by mergeZones(), and splitZone().

+ Here is the caller graph for this function:

◆ reset()

◆ resetCostMultiplier()

void FIFE::CellCache::resetCostMultiplier ( Cell cell)

Resets the cost multiplier for the cell.

Parameters
cellA pointer to the cell.

Definition at line 1195 of file cellcache.cpp.

References m_costMultipliers.

Referenced by removeCell(), and FIFE::Cell::resetCostMultiplier().

+ Here is the caller graph for this function:

◆ resetNarrowCells()

void FIFE::CellCache::resetNarrowCells ( )

Resets narrow cells.

Definition at line 1389 of file cellcache.cpp.

References m_cellZoneListener, and m_narrowCells.

◆ resetSpeedMultiplier()

void FIFE::CellCache::resetSpeedMultiplier ( Cell cell)

Resets the speed multiplier for the cell.

Parameters
cellA 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().

+ Here is the caller graph for this function:

◆ resize() [1/2]

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().

+ Here is the caller graph for this function:

◆ resize() [2/2]

◆ setBlockingUpdate()

void FIFE::CellCache::setBlockingUpdate ( bool  update)

Definition at line 1531 of file cellcache.cpp.

References m_blockingUpdate, and update().

Referenced by FIFE::Cell::updateCellBlockingInfo().

+ Here is the caller graph for this function:

◆ setCostMultiplier()

void FIFE::CellCache::setCostMultiplier ( Cell cell,
double  multi 
)

Sets cost multiplier for the cell.

Parameters
cellA pointer to the cell.
multiA double, the cost multiplier.

Definition at line 1177 of file cellcache.cpp.

References m_costMultipliers.

Referenced by FIFE::Cell::setCostMultiplier().

+ Here is the caller graph for this function:

◆ setDefaultCostMultiplier()

void FIFE::CellCache::setDefaultCostMultiplier ( double  multi)

Sets default cost for this CellCache.

Parameters
multiA double, the cost.

Definition at line 1153 of file cellcache.cpp.

References m_defaultCostMulti.

Referenced by FIFE::MapLoader::load().

+ Here is the caller graph for this function:

◆ setDefaultSpeedMultiplier()

void FIFE::CellCache::setDefaultSpeedMultiplier ( double  multi)

Sets default speed for this CellCache.

Parameters
multiA double, the speed.

Definition at line 1161 of file cellcache.cpp.

References m_defaultSpeedMulti.

Referenced by FIFE::MapLoader::load().

+ Here is the caller graph for this function:

◆ setMaxNeighborZ()

void FIFE::CellCache::setMaxNeighborZ ( int32_t  z)

Sets maximal z range for neighbors.

Parameters
zThe maximal z range as int.

Definition at line 848 of file cellcache.cpp.

References m_neighborZ.

◆ setSearchNarrowCells()

void FIFE::CellCache::setSearchNarrowCells ( bool  search)

Sets if narrow cells should be searched automatic.

Parameters
searchA 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().

+ Here is the caller graph for this function:

◆ setSize()

void FIFE::CellCache::setSize ( const Rect rec)

Sets CellCache size.

Parameters
recA 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().

◆ setSizeUpdate()

void FIFE::CellCache::setSizeUpdate ( bool  update)

Definition at line 1535 of file cellcache.cpp.

References m_sizeUpdate, and update().

Referenced by FIFE::CellCacheChangeListener::onInstanceDelete().

+ Here is the caller graph for this function:

◆ setSpeedMultiplier()

void FIFE::CellCache::setSpeedMultiplier ( Cell cell,
double  multi 
)

Sets speed multiplier for the cell.

Parameters
cellA pointer to the cell.
multiA 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().

+ Here is the caller graph for this function:

◆ setStaticSize()

void FIFE::CellCache::setStaticSize ( bool  staticSize)

Sets the cache size to static so that automatic resize is disabled.

Parameters
staticSizeA boolean, true if the cache size is static, otherwise false.

Definition at line 1523 of file cellcache.cpp.

References m_staticSize.

◆ splitZone()

void FIFE::CellCache::splitZone ( Cell cell)

◆ unregisterAllCosts()

void FIFE::CellCache::unregisterAllCosts ( )

Removes all costs.

Definition at line 1025 of file cellcache.cpp.

References m_costsTable, and m_costsToCells.

◆ unregisterCost()

void FIFE::CellCache::unregisterCost ( const std::string &  costId)

Removes a cost with the given id.

Parameters
costIdA 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.

◆ update()

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().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_blockingUpdate

bool FIFE::CellCache::m_blockingUpdate
private

indicates blocking update

Definition at line 648 of file cellcache.h.

Referenced by setBlockingUpdate(), and update().

◆ m_cellAreas

StringCellMultimap FIFE::CellCache::m_cellAreas
private

◆ m_cellListener

LayerChangeListener* FIFE::CellCache::m_cellListener
private

change listener

Definition at line 629 of file cellcache.h.

Referenced by addInteractOnRuntime(), CellCache(), getCellCacheChangeListener(), and ~CellCache().

◆ m_cells

std::vector<std::vector<Cell*> > FIFE::CellCache::m_cells
private

◆ m_cellZoneListener

CellChangeListener* FIFE::CellCache::m_cellZoneListener
private

listener for zones

Definition at line 672 of file cellcache.h.

Referenced by addNarrowCell(), CellCache(), removeNarrowCell(), resetNarrowCells(), and ~CellCache().

◆ m_costMultipliers

std::map<Cell*, double> FIFE::CellCache::m_costMultipliers
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().

◆ m_costsTable

std::map<std::string, double> FIFE::CellCache::m_costsTable
private

holds cost table

Definition at line 675 of file cellcache.h.

Referenced by existsCost(), getCost(), getCosts(), registerCost(), reset(), unregisterAllCosts(), and unregisterCost().

◆ m_costsToCells

StringCellMultimap FIFE::CellCache::m_costsToCells
private

◆ m_defaultCostMulti

double FIFE::CellCache::m_defaultCostMulti
private

default cost

Definition at line 623 of file cellcache.h.

Referenced by getAdjacentCost(), getDefaultCostMultiplier(), reset(), and setDefaultCostMultiplier().

◆ m_defaultSpeedMulti

double FIFE::CellCache::m_defaultSpeedMulti
private

default speed

Definition at line 626 of file cellcache.h.

Referenced by getCellSpeedMultiplier(), getDefaultSpeedMultiplier(), reset(), and setDefaultSpeedMultiplier().

◆ m_height

uint32_t FIFE::CellCache::m_height
private

◆ m_layer

◆ m_narrowCells

std::set<Cell*> FIFE::CellCache::m_narrowCells
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().

◆ m_neighborZ

int32_t FIFE::CellCache::m_neighborZ
private

max z value for neighbors

Definition at line 645 of file cellcache.h.

Referenced by getMaxNeighborZ(), resize(), and setMaxNeighborZ().

◆ m_searchNarrow

bool FIFE::CellCache::m_searchNarrow
private

is automatic seach enabled

Definition at line 654 of file cellcache.h.

Referenced by createCells(), isSearchNarrowCells(), and setSearchNarrowCells().

◆ m_size

Rect FIFE::CellCache::m_size
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().

◆ m_sizeUpdate

bool FIFE::CellCache::m_sizeUpdate
private

indicates size update

Definition at line 651 of file cellcache.h.

Referenced by setSizeUpdate(), and update().

◆ m_speedMultipliers

std::map<Cell*, double> FIFE::CellCache::m_speedMultipliers
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().

◆ m_staticSize

bool FIFE::CellCache::m_staticSize
private

is automatic size update enabled/disabled

Definition at line 657 of file cellcache.h.

Referenced by isStaticSize(), resize(), and setStaticSize().

◆ m_transitions

std::vector<Cell*> FIFE::CellCache::m_transitions
private

cells with transitions

Definition at line 660 of file cellcache.h.

Referenced by addTransition(), getTransitionCells(), and removeTransition().

◆ m_width

uint32_t FIFE::CellCache::m_width
private

◆ m_zones

std::vector<Zone*> FIFE::CellCache::m_zones
private

zones

Definition at line 663 of file cellcache.h.

Referenced by createZone(), getZone(), getZones(), removeZone(), and reset().


The documentation for this class was generated from the following files: