Public Member Functions | Private Attributes | List of all members
TileCacheDelay< Tile > Class Template Reference

#include <tile_cache_delay.h>

Inheritance diagram for TileCacheDelay< Tile >:
Inheritance graph
[legend]

Public Member Functions

Tile const * ready (TileId const &to_find) const
 
void request (Area const &area)
 
- Public Member Functions inherited from TileCache< Tile >
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

- Protected Member Functions inherited from TileCache< Tile >
bool isAreaReady (Area const &area) const
 

Detailed Description

template<typename Tile>
class TileCacheDelay< Tile >

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:

Warning
Since TileCache isn't a virtual class, you shouldn't upcast a TileCacheDelay object to a TileCache object!

Definition at line 24 of file tile_cache_delay.h.

Member Function Documentation

◆ ready()

template<typename Tile>
Tile const* TileCacheDelay< Tile >::ready ( TileId const &  to_find) const
inline
Note
You have to use TileCacheGuard to guard this function call and the returned tile.

Definition at line 166 of file tile_cache_delay.h.

◆ request()

template<typename Tile>
void TileCacheDelay< Tile >::request ( Area const &  area)
inline

Definition at line 155 of file tile_cache_delay.h.

Member Data Documentation

◆ history_

template<typename Tile>
detail::AreaHistory TileCacheDelay< Tile >::history_
private

Definition at line 151 of file tile_cache_delay.h.


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


rviz_satellite
Author(s): Gareth Cross , Andre Schröder
autogenerated on Thu May 4 2023 02:31:43