|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.math.Noise
public class Noise
This class provides an interface for accessing a three dimensional noise function.
By default it uses the SimplexNoise
class to calculate the function, but it is
possible to specify an alternate noise generator. This allows plugins to replace the
noise function used throughout the application, for example to provide a faster implementation
using native code.
Regardless of the implementation, this should be a function which varies smoothly between -1.0 and 1.0, with all of the variation happening on a length scale of about 1. Typically, you will want to add several octaves of this function together to create a fractal noise function. Methods are also provided for calculating the gradient of the noise function, and a vector valued noise function.
Nested Class Summary | |
---|---|
static interface |
Noise.NoiseGenerator
This interface defines an object which can be used to calculate the noise function. |
Constructor Summary | |
---|---|
Noise()
|
Method Summary | |
---|---|
static void |
calcGradient(Vec3 gradient,
double x,
double y,
double z)
Given a point in 3D space, calculate the gradient of the scalar noise function at that point. |
static void |
calcVector(Vec3 v,
double x,
double y,
double z)
Given a point (x,y,z) in 3D space, set v to the value of the vector noise function at that point. |
Noise.NoiseGenerator |
getGenerator()
Get the generator used to calculate the noise function. |
void |
setGenerator(Noise.NoiseGenerator gen)
Set the generator used to calculate the noise function. |
static double |
value(double x,
double y,
double z)
Given a point in 3D space, return the value of the scalar noise function at that point. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Noise()
Method Detail |
---|
public static double value(double x, double y, double z)
public static void calcGradient(Vec3 gradient, double x, double y, double z)
public static void calcVector(Vec3 v, double x, double y, double z)
public Noise.NoiseGenerator getGenerator()
public void setGenerator(Noise.NoiseGenerator gen)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |