v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
23
source/game/terrain/StarCacheSelector.hpp
Normal file
23
source/game/terrain/StarCacheSelector.hpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifndef STAR_CACHE_SELECTOR_HPP
|
||||
#define STAR_CACHE_SELECTOR_HPP
|
||||
|
||||
#include "StarTerrainDatabase.hpp"
|
||||
#include "StarLruCache.hpp"
|
||||
#include "StarVector.hpp"
|
||||
|
||||
namespace Star {
|
||||
|
||||
struct CacheSelector : TerrainSelector {
|
||||
static char const* const Name;
|
||||
|
||||
CacheSelector(Json const& config, TerrainSelectorParameters const& parameters, TerrainDatabase const* database);
|
||||
|
||||
float get(int x, int y) const override;
|
||||
|
||||
TerrainSelectorConstPtr m_source;
|
||||
mutable HashLruCache<Vec2I, float> m_cache;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue