n/f/hetero: add default offset estimation
This commit is contained in:
parent
21b51a5011
commit
6c7c35d2dd
@ -37,6 +37,14 @@ namespace util { namespace noise { namespace fractal {
|
||||
static constexpr T DEFAULT_GAIN = 1 / DEFAULT_LACUNARITY;
|
||||
static constexpr T DEFAULT_OFFSET = T(0.7);
|
||||
|
||||
hetero (seed_t,
|
||||
unsigned octaves,
|
||||
T H,
|
||||
T frequency,
|
||||
T lacunarity,
|
||||
T amplitude,
|
||||
T gain);
|
||||
|
||||
hetero (seed_t,
|
||||
unsigned octaves,
|
||||
T H,
|
||||
|
@ -22,6 +22,26 @@
|
||||
namespace util { namespace noise { namespace fractal {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <typename T, typename B>
|
||||
hetero<T,B>::hetero(seed_t _seed,
|
||||
unsigned _octaves,
|
||||
T _H,
|
||||
T _frequency,
|
||||
T _lacunarity,
|
||||
T _amplitude,
|
||||
T _gain):
|
||||
hetero<T,B> (_seed,
|
||||
_octaves,
|
||||
_H,
|
||||
_frequency,
|
||||
_lacunarity,
|
||||
_amplitude,
|
||||
_gain,
|
||||
-this->basis ().bounds ().min + this->basis ().bounds ().magnitude () / T{2})
|
||||
{ ; }
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
template <typename T, typename B>
|
||||
hetero<T,B>::hetero(seed_t _seed,
|
||||
unsigned _octaves,
|
||||
T _H,
|
||||
|
Loading…
Reference in New Issue
Block a user