TorqueScript Reference
Public Member Functions | List of all members
NoiseGenerator Class Reference

#include <NoiseGenerator_ScriptBinding.h>

Inherits ScriptObject.

Public Member Functions

Float getComplexNoise (float x, float y, int octaves, float persistence)
 
Float getNoise (float x, float y)
 
void setSeed (int seed)
 

Member Function Documentation

◆ getComplexNoise()

Float getComplexNoise ( float  x,
float  y,
int  octaves,
float  persistence 
)

Returns the noise for a given x and y value with multiple octaves applied.

Parameters
xA floating point value.
yA floating point value.
octavesAn integer value between 1 and 8. Each octave is a layer of progressively smaller noise that is applied to the final result.
persistenceA decimal value between 0.05 and 0.95. Larger values will cause each octave to have a larger impact on the final result.
Returns
A decimal value between 0 and 1.

◆ getNoise()

Float getNoise ( float  x,
float  y 
)

Returns the noise for a given x and y value.

Parameters
xA floating point value.
yA floating point value.
Returns
A decimal value between 0 and 1.

◆ setSeed()

void setSeed ( int  seed)

Sets the seed for the noise generater.

Parameters
seedAn integer seed value.
Returns
No return value.