#include <noise.h>
RenderNoiseInterface class for noises that perform more complex operations on basic noises. To allocate an instance of a RenderNoiseInterface call RenderNoiseClasses::Get("<name>").Create().
|
MAXON_METHOD Result< void > | Init (UInt32 seed, Int permutationTablePower, const DataDictionary &additionalParameters) |
|
MAXON_METHOD Float32 | Noise (const Vector32 &p, Float32 time, Float32 octaves=6.0, Bool absolute=false, Float32 sampleRadius=0.0) const |
|
MAXON_METHOD Float32 | Noise (const Vector2d32 &p, Float32 time, Float32 octaves=6.0, Bool absolute=false, Float32 sampleRadius=0.0) const |
|
◆ MAXON_INTERFACE()
◆ Init()
Initializes the noise. A permutationTablePower of 10 results in 1024 elements, which is a good compromise between too frequent repetition and memory consumption.
- Parameters
-
[in] | seed | Start value for the random table generation. |
[in] | permutationTablePower | This specifies the size of the permutation table, which will have (2 ^ permutationTablePower) entries. permutationTablePower must be [5..16], otherwise initialization fails. |
[in] | additionalParameters | Additional noise-specific parameters. |
- Returns
- OK on success. An error is also returned if the passed noise reference was not yet initialized.
◆ Noise() [1/2]
Calculates a noise value.
- Parameters
-
[in] | p | Point for which noise is calculated. |
[in] | time | Time for which noise is calculated. |
[in] | octaves | Maximum number of octaves calculated. Does only apply to some noises. |
[in] | absolute | If true the absolute value of the noise will be returned. |
[in] | sampleRadius | The radius that determines how much details of the noise will be retained. A value of 0.0 returns the original value. Any higher values reduce details and might blend the result towards an average value. |
- Returns
- Noise value in the range of [0..1]
◆ Noise() [2/2]
Calculates a noise value.
- Parameters
-
[in] | p | Point for which noise is calculated. |
[in] | time | Time for which noise is calculated. |
[in] | octaves | Maximum number of octaves calculated. Does only apply to some noises. |
[in] | absolute | If true the absolute value of the noise will be returned. |
[in] | sampleRadius | The radius that determines how much details of the noise will be retained. A value of 0.0 returns the original value. Any higher values reduce details and might blend the result towards an average value. |
- Returns
- Noise value in the range of [0..1]