35 float sample(
float x,
float y)
const;
37 float sampleTile(
int tileX,
int tileY)
const;
39 std::function<float(
float,
float)> asFunction()
const;
42 void setSeed(uint32_t
seed);
44 uint32_t getSeed()
const;
46 void setScale(
float scale);
48 float getScale()
const;
50 void setFrequency(
float frequency);
52 float getFrequency()
const;
54 void setWavelength(
float wavelength);
56 float getWavelength()
const;
58 void setOctaves(
int octaves);
60 int getOctaves()
const;
62 void setLacunarity(
float lacunarity);
64 float getLacunarity()
const;
66 void setGain(
float gain);
68 float getGain()
const;
70 void setRidge(
float ridge);
72 float getRidge()
const;
74 void setWarp(
float warp);
76 float getWarp()
const;
78 void setExponent(
float exponent);
80 float getExponent()
const;
82 void setContinent(
float continent);
84 float getContinent()
const;
86 void setIsland(
float island);
88 float getIsland()
const;
90 void setCoastSoftness(
float softness);
92 float getCoastSoftness()
const;
96 int getWorldWidth()
const;
98 int getWorldHeight()
const;
100 void setBase(
float base);
102 float getBase()
const;
104 void setAmplitude(
float amplitude);
106 float getAmplitude()
const;
108 void setClamp(
bool enabled,
float minHeight,
float maxHeight);
110 bool isClamped()
const;
112 float getClampMin()
const;
114 float getClampMax()
const;
121 float frequency_ = 1.f / 32.f;
123 float lacunarity_ = 2.f;
125 float ridge_ = 0.35f;
127 float exponent_ = 2.f;
128 float continent_ = 0.55f;
129 float island_ = 0.38f;
130 float coastSoft_ = 0.12f;
134 float amplitude_ = 1.f;
136 float clampMin_ = 0.f;
137 float clampMax_ = 1.f;
#define EVENGINE_API_DOMAINS
std::array< float, 3 > scale
Owning, typed generation parameters.
Deterministic terrain height sampling (Red Blob Games / Perlin fBm recipe).
TerrainSampler()=default
Terrain sampler.
std::vector< ParamSpec > params
double sample(const Heightmap &map, double u, double v)
Sample.
Deterministic value-noise helpers for pixel textures. When periodX/periodY > 0, lattice wraps for sea...
uint32_t semanticAt(float height) const
Semantic at.
static TerrainBands fromParams(const Params ¶ms)
From params.