#include <tile_cache_delay.h>
Public Member Functions | |
Tile const * | ready (TileId const &to_find) const |
void | request (Area const &area) |
![]() | |
float | getTileServerErrorRate (std::string const &tile_server) const |
Calculate the error rate of a tile server. More... | |
void | purge (Area const &area) |
Tile const * | ready (TileId const &to_find) const |
void | request (Area const &area) |
TileCache () | |
Private Attributes | |
detail::AreaHistory | history_ |
Additional Inherited Members | |
![]() | |
bool | isAreaReady (Area const &area) const |
TileCacheDelay is like TileCache but gets (mostly) rid of the effect that the tiles are drawn one-by-one by delaying the tiles. This class is just a cosmetic improvement - it doesn't intent to improve performance.
This is done by trying to load a whole square instead of just a single tile. The exact algorithm is as follows:
Every time the robot enters a new center tile, request() is called. This functions stores the requested detail::ExpiringArea, where a ExpiringArea is just an Area at a tile id with a timeout. Therefore we will collect a history of Areas (detail::AreaHistory) while the robot moves.
A tile will be drawn if it's ready(). A tile is ready() iff:
Definition at line 24 of file tile_cache_delay.h.
|
inline |
Definition at line 166 of file tile_cache_delay.h.
|
inline |
Definition at line 155 of file tile_cache_delay.h.
|
private |
Definition at line 151 of file tile_cache_delay.h.