adskNoise.h File Reference
Detailed Description
Shader SDK noise functions.
#include <shader.h>
#include "adskExport.h"
#include "adskShaderSDKNamespaceBegin.h"
#include "adskShaderSDKNamespaceEnd.h"
|
Functions
|
double |
noise_drand
(int *seed) |
|
Generate a double precision pseudo-random
number.
|
float |
noise_frand
(int *seed) |
|
Generate a single precision pseudo-random
number.
|
void |
noise_gradient_init
(miState *state) |
|
Initialize the gradient noise function.
|
float |
noise_gradient_3d
(float x, float y, float z) |
|
Compute gradient noise for a given 3D
location.
|
float |
noise_scalar_1d
(double x) |
|
Generate scalar one dimensional quadratic
noise.
|
float |
noise_scalar_2d
(double x, double y) |
|
Generate scalar two dimensional quadratic
noise.
|
miVector |
noise_vector_2d
(double x, double y) |
|
Generate vector two dimensional quadratic
noise.
|
float |
noise_scalar_3d
(double x, double y, double z) |
|
Generate scalar three dimensional quadratic
noise.
|
float |
noise_scalar_4d
(double x, double y, double z, double t, int steps) |
|
Generate scalar four dimensional quadratic
noise.
|
double |
noise_table_scalar
(int index) |
|
Generate scalar noise based on a lookup
table.
|
miVector |
noise_table_vector
(int index) |
|
Generate vector noise based on a lookup
table.
|
Function Documentation
double noise_drand |
( |
int * |
seed |
) |
|
Generate a double precision pseudo-random number.
- Parameters:
-
[in,out] |
seed |
Initial random seed. Modified after each call. |
- Returns:
- A pseudo-random number.
float noise_frand |
( |
int * |
seed |
) |
|
Generate a single precision pseudo-random number.
- Parameters:
-
[in,out] |
seed |
Initial random seed. Modified after each call. |
- Returns:
- A pseudo-random number.
float noise_gradient_3d |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
|
) |
|
|
|
Compute gradient noise for a given 3D location.
- Parameters:
-
[in] |
x |
x coordinate for noise function |
[in] |
y |
y coordinate for noise function |
[in] |
z |
z coordinate for noise function |
- Returns:
- The scalar noise value.
void noise_gradient_init |
( |
miState * |
state |
) |
|
Initialize the gradient noise function.
- Parameters:
-
[in] |
state |
The current miState . |
float noise_scalar_1d |
( |
double |
x |
) |
|
Generate scalar one dimensional quadratic noise.
- Parameters:
-
[in] |
x |
x coordinate for noise function |
- Returns:
- The scalar noise value.
float noise_scalar_2d |
( |
double |
x, |
|
|
double |
y |
|
|
) |
|
|
|
Generate scalar two dimensional quadratic noise.
- Parameters:
-
[in] |
x |
x coordinate for noise function |
[in] |
y |
y coordinate for noise function |
- Returns:
- The scalar noise value.
float noise_scalar_3d |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
|
) |
|
|
|
Generate scalar three dimensional quadratic noise.
- Parameters:
-
[in] |
x |
x coordinate for noise function |
[in] |
y |
y coordinate for noise function |
[in] |
z |
z coordinate for noise function |
- Returns:
- The scalar noise value.
float noise_scalar_4d |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z, |
|
|
double |
t, |
|
|
int |
steps |
|
|
) |
|
|
|
Generate scalar four dimensional quadratic noise.
- Parameters:
-
[in] |
x |
x coordinate for noise function |
[in] |
y |
y coordinate for noise function |
[in] |
z |
z coordinate for noise function |
[in] |
t |
t coordinate for noise function |
[in] |
steps |
Number of steps for given time value. |
- Returns:
- The scalar noise value.
double noise_table_scalar |
( |
int |
index |
) |
|
Generate scalar noise based on a lookup table.
- Parameters:
-
[in] |
index |
The index in the lookup table. |
- Returns:
- The scalar noise value.
miVector noise_table_vector |
( |
int |
index |
) |
|
Generate vector noise based on a lookup table.
- Parameters:
-
[in] |
index |
The index in the lookup table. |
- Returns:
- The vector noise value.
miVector noise_vector_2d |
( |
double |
x, |
|
|
double |
y |
|
|
) |
|
|
|
Generate vector two dimensional quadratic noise.
- Parameters:
-
[in] |
x |
x coordinate for noise function |
[in] |
y |
y coordinate for noise function |
- Returns:
- The vector noise.