RenderNoiseInterface Class Reference

#include <noise.h>

Inheritance diagram for RenderNoiseInterface:

Detailed Description

RenderNoiseInterface class for noises that perform more complex operations on basic noises. To allocate an instance of a RenderNoiseInterface call RenderNoiseClasses::Get("<name>").Create().

Public Member Functions

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
 

Private Member Functions

 MAXON_INTERFACE (RenderNoiseInterface, MAXON_REFERENCE_COPY_ON_WRITE, "net.maxon.render.interface.rendernoise")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( RenderNoiseInterface  ,
MAXON_REFERENCE_COPY_ON_WRITE  ,
"net.maxon.render.interface.rendernoise"   
)
private

◆ Init()

MAXON_METHOD Result<void> Init ( UInt32  seed,
Int  permutationTablePower,
const DataDictionary &  additionalParameters 
)

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]seedStart value for the random table generation.
[in]permutationTablePowerThis specifies the size of the permutation table, which will have (2 ^ permutationTablePower) entries. permutationTablePower must be [5..16], otherwise initialization fails.
[in]additionalParametersAdditional noise-specific parameters.
Returns
OK on success. An error is also returned if the passed noise reference was not yet initialized.

◆ Noise() [1/2]

MAXON_METHOD Float32 Noise ( const Vector32 p,
Float32  time,
Float32  octaves = 6.0,
Bool  absolute = false,
Float32  sampleRadius = 0.0 
) const

Calculates a noise value.

Parameters
[in]pPoint for which noise is calculated.
[in]timeTime for which noise is calculated.
[in]octavesMaximum number of octaves calculated. Does only apply to some noises.
[in]absoluteIf true the absolute value of the noise will be returned.
[in]sampleRadiusThe 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]

MAXON_METHOD Float32 Noise ( const Vector2d32 p,
Float32  time,
Float32  octaves = 6.0,
Bool  absolute = false,
Float32  sampleRadius = 0.0 
) const

Calculates a noise value.

Parameters
[in]pPoint for which noise is calculated.
[in]timeTime for which noise is calculated.
[in]octavesMaximum number of octaves calculated. Does only apply to some noises.
[in]absoluteIf true the absolute value of the noise will be returned.
[in]sampleRadiusThe 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]