Simplex Noise ported from public domain Java Implementation http://webstaff.itn.liu.se/~stegu/simplexnoise/SimplexNoise.java Thanks Stefan Gustavson! More...
#include <OgreVolumeSimplexNoise.h>
Public Member Functions | |
SimplexNoise (unsigned long definedSeed) | |
Constructor with a by seed defined permutation table. | |
SimplexNoise (void) | |
Constructor with a random permutation table. | |
long | getSeed (void) const |
Gets the current seed. | |
Real | noise (Real xIn, Real yIn, Real zIn) const |
3D noise function. | |
Private Member Functions | |
Real | dot (const Vector3 &g, Real x, Real y, Real z) const |
Dot product of a gradient with the given values. | |
void | init (unsigned long definedSeed) |
Initializes the SimplexNoise instance. | |
unsigned long | random (void) |
Private Attributes | |
long | mSeed |
Random seed. | |
short | perm [512] |
Permutation table. | |
short | permMod12 [512] |
Permutation table modulo 12. | |
Static Private Attributes | |
static Real | F3 |
Skewing and unskewing factor for 3 dimensions. | |
static Real | G3 |
Skewing and unskewing factor for 3 dimensions. | |
Simplex Noise ported from public domain Java Implementation http://webstaff.itn.liu.se/~stegu/simplexnoise/SimplexNoise.java Thanks Stefan Gustavson!
Definition at line 42 of file OgreVolumeSimplexNoise.h.
Ogre::Volume::SimplexNoise::SimplexNoise | ( | void | ) |
Constructor with a random permutation table.
Constructor with a by seed defined permutation table.
definedSeed | The seed to use. |
Dot product of a gradient with the given values.
g | The gradient. |
x | The first value. |
y | The second value. |
z | The third value. |
Definition at line 79 of file OgreVolumeSimplexNoise.h.
References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
Gets the current seed.
Initializes the SimplexNoise instance.
3D noise function.
xIn | The first dimension parameter. |
yIn | The second dimension parameter. |
zIn | The third dimension parameter. |
Referenced by Ogre::Volume::CSGNoiseSource::getInternalValue().
|
staticprivate |
Skewing and unskewing factor for 3 dimensions.
Definition at line 47 of file OgreVolumeSimplexNoise.h.
|
staticprivate |
Skewing and unskewing factor for 3 dimensions.
Definition at line 50 of file OgreVolumeSimplexNoise.h.
|
private |
Random seed.
Definition at line 53 of file OgreVolumeSimplexNoise.h.
|
private |
Permutation table.
Definition at line 56 of file OgreVolumeSimplexNoise.h.
|
private |
Permutation table modulo 12.
Definition at line 59 of file OgreVolumeSimplexNoise.h.
Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.