class RED::Noise

Noise functions class. More...

#include <REDNoise.h>

Public static functions:

static voidPerlin2d ( double & oNoise, double iPos[2] )
static voidPerlin2dD ( double & oNoise, double oD[2], double iPos[2] )
static RED_RCPerlin2dP ( double & oNoise, double iPos[2], int iPeriod[2] )
static voidPerlin3d ( double & oNoise, double iPos[3] )
static voidPerlin3dD ( double & oNoise, double oD[3], double iPos[3] )
static RED_RCPerlin3dP ( double & oNoise, double iPos[3], int iPeriod[3] )
static voidWorley2d ( double & oNoise, double iPos[2] )
static voidWorley2dD ( double & oNoise, double oD[2], double iPos[2] )
static voidWorley3d ( double & oNoise, double iPos[3] )
static voidWorley3dD ( double & oNoise, double oD[3], double iPos[3] )

Detailed description:

Noise functions class.

This class introduces useful functions to produce 2d/3d noise.

Functions documentation

public static void RED::Noise::Perlin2d(double &oNoise,
doubleiPos[2]
)

Computes Perlin noise at the given 2d position.

Parameters:

oNoisereturned Perlin 2d noise in [-1, 1].
iPos2d position.
public static void RED::Noise::Perlin2dD(double &oNoise,
doubleoD[2],
doubleiPos[2]
)

Computes Perlin noise at the given 2d position including derivatives.

Parameters:

oNoisereturned Perlin 2d noise in [-1, 1].
oDderivatives in x and y.
iPos2d position.
public static RED_RC RED::Noise::Perlin2dP(double &oNoise,
doubleiPos[2],
intiPeriod[2]
)

Computes Perlin noise at the given 2d position and wraps the gradients around the given period.

Parameters:

oNoisereturned Perlin 2d noise in [-1, 1].
iPos2d position.
iPeriodvalues above this threshold will be wrapped, must be greater than 0.

Returns:

RED_OK on success, RED_BAD_PARAM if period is not greater than 0.
public static void RED::Noise::Perlin3d(double &oNoise,
doubleiPos[3]
)

Computes Perlin noise at the given 3d position.

Parameters:

oNoisereturned Perlin 3d noise in [-1, 1].
iPos3d position.
public static void RED::Noise::Perlin3dD(double &oNoise,
doubleoD[3],
doubleiPos[3]
)

Computes Perlin noise at the given 3d position including derivatives.

Parameters:

oNoisereturned Perlin 3d noise in [-1, 1].
oDderivatives in x, y and z.
iPos3d position.
public static RED_RC RED::Noise::Perlin3dP(double &oNoise,
doubleiPos[3],
intiPeriod[3]
)

Computes Perlin noise at the given 3d position and wraps the gradients around the given period.

Parameters:

oNoisereturned Perlin 3d noise in [-1, 1].
iPos3d position.
iPeriodiPos above this threshold will be wrapped, must be greater than 0.

Returns:

RED_OK on success, RED_BAD_PARAM if period is not greater than 0.
public static void RED::Noise::Worley2d(double &oNoise,
doubleiPos[2]
)

Computes Worley noise at the given 2d position.

Parameters:

oNoisereturned Worley 2d noise in [-1, 1].
iPos2d position.
public static void RED::Noise::Worley2dD(double &oNoise,
doubleoD[2],
doubleiPos[2]
)

Computes Worley noise at the given 2d position including derivatives.

Parameters:

oNoisereturned Worley 2d noise in [-1, 1].
oDderivatives in x and y.
iPos2d position.
public static void RED::Noise::Worley3d(double &oNoise,
doubleiPos[3]
)

Computes Worley noise at the given 2d position.

Parameters:

oNoisereturned Worley 3d noise in [-1, 1].
iPos3d position.
public static void RED::Noise::Worley3dD(double &oNoise,
doubleoD[3],
doubleiPos[3]
)

Computes Worley noise at the given 3d position including derivatives.

Parameters:

oNoisereturned Worley 3d noise in [-1, 1].
oDderivatives in x, y and z.
iPos3d position.