v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
39
source/game/terrain/StarIslandSurfaceSelector.hpp
Normal file
39
source/game/terrain/StarIslandSurfaceSelector.hpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
#ifndef STAR_ISLAND_SURFACE_SELECTOR_HPP
|
||||
#define STAR_ISLAND_SURFACE_SELECTOR_HPP
|
||||
|
||||
#include "StarLruCache.hpp"
|
||||
#include "StarPerlin.hpp"
|
||||
#include "StarTerrainDatabase.hpp"
|
||||
|
||||
namespace Star {
|
||||
|
||||
struct IslandColumn {
|
||||
float topLevel;
|
||||
float bottomLevel;
|
||||
};
|
||||
|
||||
struct IslandSurfaceSelector : TerrainSelector {
|
||||
static char const* const Name;
|
||||
|
||||
IslandSurfaceSelector(Json const& config, TerrainSelectorParameters const& parameters);
|
||||
|
||||
float get(int x, int y) const override;
|
||||
|
||||
IslandColumn generateColumn(int x) const;
|
||||
|
||||
mutable HashLruCache<int, IslandColumn> columnCache;
|
||||
|
||||
PerlinF islandHeight;
|
||||
PerlinF islandDepth;
|
||||
PerlinF islandDecision;
|
||||
|
||||
float islandTaperPoint;
|
||||
float islandElevation;
|
||||
|
||||
float layerBaseHeight;
|
||||
int worldWidth;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue