FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
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...
 
void setUpdated (bool updated)
 Sets whether the CellCache need to be updated. More...
 
bool isUpdated ()
 Gets whether the CellCache need to be updated. More...
 
std::vector< Cell * > getCellsInLine (const ModelCoordinate &pt1, const ModelCoordinate &pt2, bool blocker=false)
 Returns all cells in the line. More...
 
std::vector< Cell * > getCellsInRect (const Rect &rec)
 Returns all cells in the rect. More...
 
std::vector< Cell * > getCellsInCircle (const ModelCoordinate &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 setFowUpdate (bool update)
 
void setSizeUpdate (bool update)
 
void update ()
 
- Public Member Functions inherited from FIFE::FifeClass
 FifeClass ()
 
virtual ~FifeClass ()
 
fifeid_t getFifeId ()
 Gets unique id of this instance inside the engine. More...
 

Private Types

typedef std::multimap< std::string, Cell * > StringCellMultimap
 
typedef StringCellMultimap::iterator StringCellIterator
 
typedef std::pair< StringCellIterator, 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_fowUpdate
 indicates fow update More...
 
bool m_sizeUpdate
 indicates size update More...
 
bool m_updated
 need update More...
 
bool m_searchNarrow
 is automatic seach enabled More...
 
bool m_staticSize
 is automatic size update enabled/disabled More...
 
std::vector< Cell * > m_transitions
 cells with transitions More...
 
std::vector< Zone * > m_zones
 zones More...
 
std::set< Cell * > m_narrowCells
 special cells which are monitored (zone split and merge) More...
 
StringCellMultimap m_cellAreas
 areas with assigned cells More...
 
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

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

Definition at line 616 of file cellcache.h.

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

Definition at line 615 of file cellcache.h.

Definition at line 617 of file cellcache.h.

Constructor & Destructor Documentation

FIFE::CellCache::~CellCache ( )

Member Function Documentation

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

Adds cell to this CellCache.

Parameters
cellA pointer to cell which should be added.

Definition at line 692 of file cellcache.cpp.

References FIFE::Cell::getLayerCoordinates(), m_cells, m_size, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.

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

Adds few cell to a specific area group.

With an area you can group cells without the need of checking the underlying instances or similar.

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

Definition at line 1400 of file cellcache.cpp.

References addCellToArea().

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

Assigns cells to a cost identifier.

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

Definition at line 1034 of file cellcache.cpp.

References addCellToCost().

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

Adds a cell to a specific area group.

With an area you can group cells without the need of checking the underlying instances or similar.

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

Definition at line 1396 of file cellcache.cpp.

References m_cellAreas.

Referenced by addCellsToArea(), FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), and FIFE::MapLoader::load().

+ Here is the caller graph for this function:

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

Assigns a cell to a cost identifier.

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

Definition at line 1021 of file cellcache.cpp.

References existsCost(), and m_costsToCells.

Referenced by addCellsToCost(), FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), and FIFE::MapLoader::load().

+ Here is the caller graph for this function:

void FIFE::CellCache::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 1361 of file cellcache.cpp.

References FIFE::Cell::addChangeListener(), m_cellZoneListener, and m_narrowCells.

Referenced by createCells(), and FIFE::MapLoader::load().

+ Here is the caller graph for this function:

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

Adds a cell as transition.

Parameters
cellA pointer to transition cell.

Definition at line 1220 of file cellcache.cpp.

References m_transitions.

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

+ Here is the caller graph for this function:

Rect FIFE::CellCache::calculateCurrentSize ( )
private

Returns the current size.

Returns
A rect that contains the min, max coordinates.

Definition at line 1493 of file cellcache.cpp.

References FIFE::Layer::getInteractLayers(), FIFE::Layer::getMinMaxCoordinates(), FIFE::RectType< T >::h, m_layer, FIFE::RectType< T >::w, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.

Referenced by addInteractOnRuntime(), removeInteractOnRuntime(), and resize().

+ Here is the caller graph for this function:

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

Convertes coordinate to unique identifier.

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

Definition at line 835 of file cellcache.cpp.

References m_size, m_width, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.

Referenced by createCell(), createCells(), and FIFE::MultiLayerSearch::updateSearch().

+ Here is the caller graph for this function:

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

Convertes unique identifier to coordinate.

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

Definition at line 840 of file cellcache.cpp.

References m_size, m_width, FIFE::RectType< T >::x, and FIFE::RectType< T >::y.

Referenced by FIFE::SingleLayerSearch::calcPath(), FIFE::MultiLayerSearch::calcPath(), FIFE::MultiLayerSearch::calcPathStep(), FIFE::SingleLayerSearch::updateSearch(), and FIFE::MultiLayerSearch::updateSearch().

+ Here is the caller graph for this function:

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

Creates cell on this CellCache.

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

Definition at line 697 of file cellcache.cpp.

References convertCoordToInt(), getCell(), m_cells, m_layer, m_size, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.

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

+ Here is the caller graph for this function:

Zone * FIFE::CellCache::createZone ( )

Creates zone.

Returns
A pointer to the new zone.

Definition at line 1251 of file cellcache.cpp.

References m_zones.

Referenced by createCells(), and splitZone().

+ Here is the caller graph for this function:

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

Checks whether the area exists.

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 1440 of file cellcache.cpp.

References m_cellAreas.

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

Returns if the cost for the given id exists.

Returns
True if cost id could be found otherwise false.

Definition at line 999 of file cellcache.cpp.

References m_costsTable.

Referenced by addCellToCost().

+ Here is the caller graph for this function:

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

Gets if cell is assigned to cost identifier.

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 1091 of file cellcache.cpp.

References m_costsToCells.

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

+ Here is the caller graph for this function:

void FIFE::CellCache::forceUpdate ( )

Updates all cells.

Definition at line 682 of file cellcache.cpp.

References m_cells.

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

+ Here is the caller graph for this function:

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

Returns cost for movement between these two adjacent coordinates.

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 1102 of file cellcache.cpp.

References FIFE::Cell::defaultCost(), FIFE::CellGrid::getAdjacentCost(), getCell(), FIFE::Layer::getCellGrid(), FIFE::Cell::getCostMultiplier(), m_defaultCostMulti, and m_layer.

Referenced by FIFE::SingleLayerSearch::updateSearch(), and FIFE::MultiLayerSearch::updateSearch().

+ Here is the caller graph for this function:

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

Returns cost for movement between these two adjacent coordinates.

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 1115 of file cellcache.cpp.

References FIFE::Cell::defaultCost(), existsCostForCell(), FIFE::CellGrid::getAdjacentCost(), getCell(), FIFE::Layer::getCellGrid(), getCost(), FIFE::Cell::getCostMultiplier(), m_defaultCostMulti, and m_layer.

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

Returns all cells of an area.

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

Definition at line 1472 of file cellcache.cpp.

References m_cellAreas.

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

Returns all area ids.

Returns
A vector that contains the area ids.

Definition at line 1448 of file cellcache.cpp.

References m_cellAreas.

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

Returns cell on this coordinate.

Parameters
mcA const reference to ModelCoordinate where the cell should be.
Returns
A pointer to the cell or NULL if there is no.

Definition at line 706 of file cellcache.cpp.

References m_cells, m_height, m_size, m_width, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.

Referenced by addInteractOnRuntime(), FIFE::Trigger::assign(), FIFE::MultiLayerSearch::calcPath(), FIFE::Layer::cellContainsBlockingInstance(), createCell(), createCells(), FIFE::Cell::createTransition(), FIFE::Cell::deleteTransition(), FIFE::RoutePather::followRoute(), getAdjacentCost(), FIFE::Layer::getBlockingInstances(), getCellsInCircle(), getCellsInLine(), getCellsInRect(), getCellSpeedMultiplier(), FIFE::MapLoader::load(), FIFE::Trigger::moveTo(), FIFE::MultiLayerSearch::MultiLayerSearch(), FIFE::CellCacheChangeListener::onInstanceCreate(), FIFE::CellCacheChangeListener::onInstanceDelete(), FIFE::CellCacheChangeListener::onLayerChanged(), FIFE::Trigger::remove(), removeInteractOnRuntime(), FIFE::InstanceRenderer::renderAlreadySorted(), FIFE::InstanceRenderer::renderUnsorted(), FIFE::Cell::resetNeighbors(), resize(), FIFE::RoutePatherSearch::RoutePatherSearch(), FIFE::MultiLayerSearch::searchBetweenTargetsMap(), FIFE::MultiLayerSearch::searchBetweenTargetsNeighbor(), FIFE::RoutePather::solveRoute(), FIFE::SingleLayerSearch::updateSearch(), and FIFE::MultiLayerSearch::updateSearch().

+ Here is the caller graph for this function:

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

Returns all areas of a cell.

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

Definition at line 1461 of file cellcache.cpp.

References m_cellAreas.

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

+ Here is the caller graph for this function:

LayerChangeListener * FIFE::CellCache::getCellCacheChangeListener ( )

Returns change listener.

Returns
A pointer to the change listener.

Definition at line 798 of file cellcache.cpp.

References m_cellListener.

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

+ Here is the caller graph for this function:

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

Returns cost identifiers for cell.

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

Definition at line 1080 of file cellcache.cpp.

References m_costsToCells.

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

+ Here is the caller graph for this function:

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

Returns all cells of this CellCache.

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

Definition at line 717 of file cellcache.cpp.

References m_cells.

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

+ Here is the caller graph for this function:

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

Returns all cells in the circle.

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 900 of file cellcache.cpp.

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

Referenced by FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), getCellsInCircleSegment(), FIFE::Cell::removeInstance(), and FIFE::Cell::updateCellFowInfo().

+ Here is the caller graph for this function:

std::vector< Cell * > FIFE::CellCache::getCellsInCircleSegment ( const ModelCoordinate center,
uint16_t  radius,
int32_t  sangle,
int32_t  eangle 
)

Returns all cells in the circle segment.

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 952 of file cellcache.cpp.

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

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

Returns all cells in the line.

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 866 of file cellcache.cpp.

References FIFE::CTYPE_NO_BLOCKER, getCell(), FIFE::Layer::getCellGrid(), FIFE::Cell::getCellType(), FIFE::CellGrid::getCoordinatesInLine(), and m_layer.

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 883 of file cellcache.cpp.

References getCell(), FIFE::RectType< T >::h, FIFE::RectType< T >::w, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.

Referenced by FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), FIFE::TriggerController::createTriggerOnRect(), FIFE::Cell::removeInstance(), FIFE::TriggerController::removeTriggerFromRect(), FIFE::CellRenderer::render(), and FIFE::Cell::updateCellFowInfo().

+ Here is the caller graph for this function:

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

Returns speed value from cell.

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 1132 of file cellcache.cpp.

References FIFE::Cell::defaultSpeed(), getCell(), FIFE::Cell::getSpeedMultiplier(), and m_defaultSpeedMulti.

Referenced by FIFE::RoutePather::followRoute().

+ Here is the caller graph for this function:

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

Returns the cost value for the given id.

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 991 of file cellcache.cpp.

References m_costsTable.

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

+ Here is the caller graph for this function:

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

Returns cells for a cost identifier.

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

Definition at line 1070 of file cellcache.cpp.

References m_costsToCells.

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 1177 of file cellcache.cpp.

References m_costMultipliers.

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

+ Here is the caller graph for this function:

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

Returns all registered cost ids.

Returns
A list that contains the cost ids.

Definition at line 1007 of file cellcache.cpp.

References m_costsTable.

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

+ Here is the caller graph for this function:

double FIFE::CellCache::getDefaultCostMultiplier ( )

Gets default cost for this CellCache.

Returns
A double, the cost.

Definition at line 1148 of file cellcache.cpp.

References m_defaultCostMulti.

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

+ Here is the caller graph for this function:

double FIFE::CellCache::getDefaultSpeedMultiplier ( )

Gets default speed for this CellCache.

Returns
A double, the speed.

Definition at line 1156 of file cellcache.cpp.

References m_defaultSpeedMulti.

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

+ Here is the caller graph for this function:

uint32_t FIFE::CellCache::getHeight ( )

Returns height of the CellCache.

Returns
A unsigned integer that is the height.

Definition at line 818 of file cellcache.cpp.

References m_height.

Layer * FIFE::CellCache::getLayer ( )

Returns layer.

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

Definition at line 802 of file cellcache.cpp.

References m_layer.

Referenced by FIFE::SingleLayerSearch::calcPath(), FIFE::MultiLayerSearch::calcPath(), FIFE::MultiLayerSearch::calcPathStep(), FIFE::MultiLayerSearch::searchBetweenTargetsNeighbor(), FIFE::SingleLayerSearch::updateSearch(), and FIFE::MultiLayerSearch::updateSearch().

+ Here is the caller graph for this function:

int32_t FIFE::CellCache::getMaxIndex ( ) const

Returns the number of cells on this CellCache.

Returns
A integer value, the number of cells.

Definition at line 845 of file cellcache.cpp.

References m_height, and m_width.

Referenced by FIFE::MultiLayerSearch::createSearchFrontier(), and FIFE::SingleLayerSearch::SingleLayerSearch().

+ Here is the caller graph for this function:

int32_t FIFE::CellCache::getMaxNeighborZ ( )

Gets maximal z range for neighbors.

By default disabled with the value -1.

Returns
The maximal z range as int.

Definition at line 854 of file cellcache.cpp.

References m_neighborZ.

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

Returns narrow cells.

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

Definition at line 1368 of file cellcache.cpp.

References m_narrowCells.

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

+ Here is the caller graph for this function:

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

Returns CellCache size.

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

Definition at line 806 of file cellcache.cpp.

References m_size.

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 1207 of file cellcache.cpp.

References m_speedMultipliers.

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

+ Here is the caller graph for this function:

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 1234 of file cellcache.cpp.

References FIFE::TransitionInfo::m_layer, and m_transitions.

Referenced by FIFE::MultiLayerSearch::searchBetweenTargetsMap(), and FIFE::MultiLayerSearch::searchBetweenTargetsNeighbor().

+ Here is the caller graph for this function:

uint32_t FIFE::CellCache::getWidth ( )

Returns width of the CellCache.

Returns
A unsigned integer that is the width.

Definition at line 814 of file cellcache.cpp.

References m_width.

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 1277 of file cellcache.cpp.

References m_zones.

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

Returns zones of this CellCache.

Returns
A vector which contains the zones.

Definition at line 1273 of file cellcache.cpp.

References m_zones.

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

+ Here is the caller graph for this function:

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

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

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 1482 of file cellcache.cpp.

References m_cellAreas.

Referenced by FIFE::RoutePather::solveRoute(), FIFE::SingleLayerSearch::updateSearch(), and FIFE::MultiLayerSearch::updateSearch().

+ Here is the caller graph for this function:

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

Gets if cell uses default cost multiplier.

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

Definition at line 1160 of file cellcache.cpp.

References m_costMultipliers.

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

+ Here is the caller graph for this function:

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

Gets if cell uses default speed multiplier.

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

Definition at line 1190 of file cellcache.cpp.

References m_speedMultipliers.

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

+ Here is the caller graph for this function:

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

Checks whether the location is in CellCache range.

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 822 of file cellcache.cpp.

References FIFE::Location::getLayer(), FIFE::Location::getLayerCoordinates(), m_height, m_layer, m_size, m_width, FIFE::RectType< T >::x, FIFE::PointType3D< T >::x, FIFE::RectType< T >::y, and FIFE::PointType3D< T >::y.

Referenced by FIFE::CellCacheChangeListener::onInstanceCreate(), and FIFE::RoutePather::solveRoute().

+ Here is the caller graph for this function:

bool FIFE::CellCache::isSearchNarrowCells ( )

Gets if narrow cells should be searched automatic.

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

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

Definition at line 1388 of file cellcache.cpp.

References m_searchNarrow.

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

+ Here is the caller graph for this function:

bool FIFE::CellCache::isStaticSize ( )

Returns if the cache size is static.

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

Definition at line 1518 of file cellcache.cpp.

References m_staticSize.

bool FIFE::CellCache::isUpdated ( )

Gets whether the CellCache need to be updated.

Returns
A boolean, true means no update is needed, false indicates a update.

Definition at line 862 of file cellcache.cpp.

References m_updated.

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

+ Here is the caller graph for this function:

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

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 974 of file cellcache.cpp.

References m_costsTable.

Referenced by FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), and FIFE::MapLoader::load().

+ Here is the caller graph for this function:

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

Removes a area.

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

Definition at line 1436 of file cellcache.cpp.

References m_cellAreas.

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

Removes cell from CellCache.

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

Parameters
cellA pointer to the cell.

Definition at line 721 of file cellcache.cpp.

References m_cellAreas, m_costMultipliers, m_costsToCells, m_narrowCells, m_speedMultipliers, removeCellFromArea(), removeCellFromCost(), removeNarrowCell(), resetCostMultiplier(), and resetSpeedMultiplier().

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

+ Here is the caller graph for this function:

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

Removes the cell from all areas.

Parameters
cellA pointer to the cell which should be removed.

Definition at line 1407 of file cellcache.cpp.

References m_cellAreas.

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

+ Here is the caller graph for this function:

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

Removes the cell from a area.

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

Definition at line 1418 of file cellcache.cpp.

References m_cellAreas.

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

Removes a cell from costs.

Parameters
cellA pointer to the cell.

Definition at line 1041 of file cellcache.cpp.

References m_costsToCells.

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

+ Here is the caller graph for this function:

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

Removes a cell from a cost identifier.

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

Definition at line 1052 of file cellcache.cpp.

References m_costsToCells.

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

Removes few cells from a area.

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

Definition at line 1429 of file cellcache.cpp.

References removeCellFromArea().

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

Removes cells from a cost identifier.

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

Definition at line 1063 of file cellcache.cpp.

References removeCellFromCost().

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

Removes cell from narrow cells.

Parameters
cellA pointer to the cell.

Definition at line 1372 of file cellcache.cpp.

References m_cellZoneListener, and m_narrowCells.

Referenced by removeCell().

+ Here is the caller graph for this function:

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

Removes a cell as transition.

Parameters
cellA pointer to transition cell.

Definition at line 1224 of file cellcache.cpp.

References m_transitions.

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

+ Here is the caller graph for this function:

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

Removes zone.

Parameters
zoneA pointer to the zone which should be removed.

Definition at line 1294 of file cellcache.cpp.

References m_zones.

Referenced by mergeZones(), and splitZone().

+ Here is the caller graph for this function:

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

Resets the cost multiplier for the cell.

Parameters
cellA pointer to the cell.

Definition at line 1186 of file cellcache.cpp.

References m_costMultipliers.

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

+ Here is the caller graph for this function:

void FIFE::CellCache::resetNarrowCells ( )

Resets narrow cells.

Definition at line 1380 of file cellcache.cpp.

References m_cellZoneListener, and m_narrowCells.

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

Resets the speed multiplier for the cell.

Parameters
cellA pointer to the cell.

Definition at line 1216 of file cellcache.cpp.

References m_speedMultipliers.

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

+ Here is the caller graph for this function:

void FIFE::CellCache::resize ( )

Checks the layer size and if the size is different with current size then the cache size is adjusted.

Definition at line 475 of file cellcache.cpp.

References calculateCurrentSize(), and m_staticSize.

Referenced by addInteractOnRuntime(), FIFE::CellCacheChangeListener::onInstanceCreate(), removeInteractOnRuntime(), setSize(), and update().

+ Here is the caller graph for this function:

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

Definition at line 1522 of file cellcache.cpp.

References m_blockingUpdate, and update().

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

+ Here is the caller graph for this function:

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

Sets cost multiplier for the cell.

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

Definition at line 1168 of file cellcache.cpp.

References m_costMultipliers.

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

+ Here is the caller graph for this function:

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

Sets default cost for this CellCache.

Parameters
multiA double, the cost.

Definition at line 1144 of file cellcache.cpp.

References m_defaultCostMulti.

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

+ Here is the caller graph for this function:

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

Sets default speed for this CellCache.

Parameters
multiA double, the speed.

Definition at line 1152 of file cellcache.cpp.

References m_defaultSpeedMulti.

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

+ Here is the caller graph for this function:

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

Definition at line 1526 of file cellcache.cpp.

References m_fowUpdate, and update().

Referenced by FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), and FIFE::Cell::removeInstance().

+ Here is the caller graph for this function:

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

Sets maximal z range for neighbors.

Parameters
zThe maximal z range as int.

Definition at line 850 of file cellcache.cpp.

References m_neighborZ.

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

Sets if narrow cells should be searched automatic.

Parameters
searchA boolean, if true the automatic search is enabled, otherwise false.

Definition at line 1392 of file cellcache.cpp.

References m_searchNarrow.

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

+ Here is the caller graph for this function:

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

Sets CellCache size.

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 810 of file cellcache.cpp.

References resize().

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

Definition at line 1530 of file cellcache.cpp.

References m_sizeUpdate, and update().

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

+ Here is the caller graph for this function:

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

Sets speed multiplier for the cell.

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

Definition at line 1198 of file cellcache.cpp.

References m_speedMultipliers.

Referenced by FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), FIFE::Cell::removeInstance(), and FIFE::Cell::setSpeedMultiplier().

+ Here is the caller graph for this function:

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

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

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

Definition at line 1514 of file cellcache.cpp.

References m_staticSize.

void FIFE::CellCache::setUpdated ( bool  updated)

Sets whether the CellCache need to be updated.

Parameters
updatedA boolean, true means no update is needed, false indicates a update.

Definition at line 858 of file cellcache.cpp.

References m_updated.

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

Removes all costs.

Definition at line 1016 of file cellcache.cpp.

References m_costsTable, and m_costsToCells.

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

Removes a cost with the given id.

Parameters
costIdA const reference to a string that refs to the cost id.

Definition at line 983 of file cellcache.cpp.

References m_costsTable, and m_costsToCells.

void FIFE::CellCache::update ( )

Definition at line 1534 of file cellcache.cpp.

References m_blockingUpdate, m_fowUpdate, m_sizeUpdate, m_updated, and resize().

Referenced by setBlockingUpdate(), setFowUpdate(), setSizeUpdate(), and FIFE::Map::update().

+ Here is the caller graph for this function:

Member Data Documentation

bool FIFE::CellCache::m_blockingUpdate
private

indicates blocking update

Definition at line 653 of file cellcache.h.

Referenced by setBlockingUpdate(), and update().

StringCellMultimap FIFE::CellCache::m_cellAreas
private
LayerChangeListener* FIFE::CellCache::m_cellListener
private

change listener

Definition at line 634 of file cellcache.h.

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

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

listener for zones

Definition at line 683 of file cellcache.h.

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

std::map<Cell*, double> FIFE::CellCache::m_costMultipliers
private

holds default cost multiplier, only if it is not default(1.0)

Definition at line 692 of file cellcache.h.

Referenced by getCostMultiplier(), isDefaultCost(), removeCell(), reset(), resetCostMultiplier(), and setCostMultiplier().

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

holds cost table

Definition at line 686 of file cellcache.h.

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

StringCellMultimap FIFE::CellCache::m_costsToCells
private
double FIFE::CellCache::m_defaultCostMulti
private

default cost

Definition at line 628 of file cellcache.h.

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

double FIFE::CellCache::m_defaultSpeedMulti
private

default speed

Definition at line 631 of file cellcache.h.

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

bool FIFE::CellCache::m_fowUpdate
private

indicates fow update

Definition at line 656 of file cellcache.h.

Referenced by setFowUpdate(), and update().

uint32_t FIFE::CellCache::m_height
private
std::set<Cell*> FIFE::CellCache::m_narrowCells
private

special cells which are monitored (zone split and merge)

Definition at line 677 of file cellcache.h.

Referenced by addNarrowCell(), getNarrowCells(), removeCell(), removeNarrowCell(), reset(), and resetNarrowCells().

int32_t FIFE::CellCache::m_neighborZ
private

max z value for neighbors

Definition at line 650 of file cellcache.h.

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

bool FIFE::CellCache::m_searchNarrow
private

is automatic seach enabled

Definition at line 665 of file cellcache.h.

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

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 641 of file cellcache.h.

Referenced by addCell(), addInteractOnRuntime(), CellCache(), convertCoordToInt(), convertIntToCoord(), createCell(), createCells(), getCell(), getSize(), isInCellCache(), removeInteractOnRuntime(), reset(), and resize().

bool FIFE::CellCache::m_sizeUpdate
private

indicates size update

Definition at line 659 of file cellcache.h.

Referenced by setSizeUpdate(), and update().

std::map<Cell*, double> FIFE::CellCache::m_speedMultipliers
private

holds default speed multiplier, only if it is not default(1.0)

Definition at line 695 of file cellcache.h.

Referenced by getSpeedMultiplier(), isDefaultSpeed(), removeCell(), reset(), resetSpeedMultiplier(), and setSpeedMultiplier().

bool FIFE::CellCache::m_staticSize
private

is automatic size update enabled/disabled

Definition at line 668 of file cellcache.h.

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

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

cells with transitions

Definition at line 671 of file cellcache.h.

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

bool FIFE::CellCache::m_updated
private

need update

Definition at line 662 of file cellcache.h.

Referenced by isUpdated(), setUpdated(), and update().

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

zones

Definition at line 674 of file cellcache.h.

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


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