函数 |
|
void | InitFbm ( Float *table, Int32 max_octaves, Float lacunarity, Float h) |
Float | Fbm ( Float *table, const 向量 &p, Float oct) |
Float | Fbm ( Float *table, const 向量 &p, Float t, Float oct) |
Float | RidgedMultifractal ( Float *table, const 向量 &p, Float oct, Float offset, Float gain) |
void InitFbm | ( | Float * | table , |
Int32 | max_octaves , | ||
Float | lacunarity , | ||
Float | h | ||
) |
Initializes the tables needed for the Fractional Brownian Motion.
范例:
[in] | table | A preallocated array of size max_octaves + 2 . The caller owns the pointed array. |
[in] | max_octaves | The number of octaves for the table. |
[in] | lacunarity | The gap between successive frequencies. |
[in] | h | The fractal increment parameter. |
Float Fbm | ( | Float * | table , |
const 向量 & | p , | ||
Float | oct | ||
) |
Generates a Fractional Brownian Motion value.
[in] | table | The preallocated and initialized table by InitFbm() . The caller owns the pointed array. |
[in] | p | The evaluation point. |
[in] | oct |
The number of octaves. Must not exceed the
max_octaves
value passed to
InitFbm()
, but can be lower.
|
Float Fbm | ( | Float * | table , |
const 向量 & | p , | ||
Float | t , | ||
Float | oct | ||
) |
Generates a Fractional Brownian Motion value.
[in] | table | The preallocated and initialized table by InitFbm() . The caller owns the pointed array. |
[in] | p | The evaluation point. |
[in] | t | The time. |
[in] | oct |
The number of octaves. Must not exceed the
max_octaves
value passed to
InitFbm()
, but can be lower.
|
Float RidgedMultifractal | ( | Float * | table , |
const 向量 & | p , | ||
Float | oct , | ||
Float | offset , | ||
Float | gain | ||
) |
Generates a fractal function used for such things as landscapes or mountain ranges.
[in] | table | The preallocated and initialized table by InitFbm() . The caller owns the pointed array. |
[in] | p | The evaluation point. |
[in] | oct |
The number of octaves. Must not exceed the
max_octaves
value passed to
InitFbm()
, but can be lower.
|
[in] | offset | The zero offset, this controls the multi-fractal. |
[in] | gain | The amplification of the fractal value. |