|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.util.NoiseUtil
public class NoiseUtil
Methods for generating Perlin noise. The algorithm used is that described in Ken Perlin's Improving Noise.
| Field Summary | |
|---|---|
protected static int |
GRADIENT_MASK
Mask for gradient values. |
protected static int |
PERMUTATION_BITS
The number of permutation bits. |
protected static int |
PERMUTATION_COUNT
The number of permutations stored. |
protected static int |
PERMUTATION_MASK
Mask for permutation table entries. |
protected static int[] |
PERMUTATIONS
Permutation table (doubled so that we can offset values without having to remask). |
| Constructor Summary | |
|---|---|
NoiseUtil()
|
|
| Method Summary | |
|---|---|
protected static float |
ease(float t)
Computes the ease parameter for the given linear value. |
static float |
getNoise(float x)
Returns the noise value at the specified coordinate. |
static float |
getNoise(float x,
float y)
Returns the noise value at the specified coordinates. |
static float |
getNoise(float x,
float y,
float z)
Returns the noise value at the specified coordinates. |
static float |
getNoise(float x,
float y,
int z)
Returns the noise value at the specified coordinates. |
static float |
getNoise(float x,
int y)
Returns the noise value at the specified coordinates. |
protected static float |
grad(int hash,
float x)
Returns the dot product of the provided value with the hashed gradient. |
protected static float |
grad(int hash,
float x,
float y)
Returns the dot product of the provided values with the hashed gradient. |
protected static float |
grad(int hash,
float x,
float y,
float z)
Returns the dot product of the provided values with the hashed gradient. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int PERMUTATION_BITS
protected static final int PERMUTATION_COUNT
protected static final int PERMUTATION_MASK
protected static final int GRADIENT_MASK
protected static final int[] PERMUTATIONS
| Constructor Detail |
|---|
public NoiseUtil()
| Method Detail |
|---|
public static float getNoise(float x)
public static float getNoise(float x,
int y)
public static float getNoise(float x,
float y)
public static float getNoise(float x,
float y,
int z)
public static float getNoise(float x,
float y,
float z)
protected static float grad(int hash,
float x)
protected static float grad(int hash,
float x,
float y)
protected static float grad(int hash,
float x,
float y,
float z)
protected static float ease(float t)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||