Ogre::Volume::SimplexNoise Class Reference

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 (void)
| Constructor with a random permutation table. More...
| SimplexNoise (unsigned long definedSeed)
| Constructor with a by seed defined permutation table. More...
long | getSeed (void) const
| Gets the current seed. More...
Real | noise (Real xIn, Real yIn, Real zIn) const
| 3D noise function. More...

## Private Member Functions

Real | dot (const Vector3 &g, Real x, Real y, Real z) const
| Dot product of a gradient with the given values. More...
void | init (unsigned long definedSeed)
| Initializes the SimplexNoise instance. More...
unsigned long | random (void)

## Private Attributes

long | mSeed
| Random seed. More...
short | perm [512]
| Permutation table. More...
short | permMod12 [512]
| Permutation table modulo 12. More...

## Static Private Attributes

static Real | F3
| Skewing and unskewing factor for 3 dimensions. More...
static Real | G3
| Skewing and unskewing factor for 3 dimensions. More...

## Detailed Description

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.

## Constructor & Destructor Documentation

## SimplexNoise() [1/2]

Ogre::Volume::SimplexNoise::SimplexNoise | ( | void |  | ) |

Constructor with a random permutation table.

## SimplexNoise() [2/2]

Ogre::Volume::SimplexNoise::SimplexNoise | ( | unsigned long | definedSeed | ) |

Constructor with a by seed defined permutation table.

Parameters

  definedSeed | The seed to use.

## Member Function Documentation

## dot()

Real Ogre::Volume::SimplexNoise::dot | ( | const Vector3 & | g,
|  | Real | x,
|  | Real | y,
|  | Real | z
| ) |  | const

private

Dot product of a gradient with the given values.

Parameters

  g | The gradient.
  x | The first value.
  y | The second value.
  z | The third value.

Returns
  The dot product.

Definition at line 79 of file OgreVolumeSimplexNoise.h.

References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.

## getSeed()

long Ogre::Volume::SimplexNoise::getSeed | ( | void |  | ) | const

Gets the current seed.

Returns
  The current seed.

## init()

void Ogre::Volume::SimplexNoise::init | ( | unsigned long | definedSeed | ) |

private

Initializes the SimplexNoise instance.

## noise()

Real Ogre::Volume::SimplexNoise::noise | ( | Real | xIn,
|  | Real | yIn,
|  | Real | zIn
| ) |  | const

3D noise function.

Parameters

  xIn | The first dimension parameter.
  yIn | The second dimension parameter.
  zIn | The third dimension parameter.

Returns
  The noise value.

Referenced by Ogre::Volume::CSGNoiseSource::getInternalValue().

## random()

unsigned long Ogre::Volume::SimplexNoise::random | ( | void |  | ) |

private

## Member Data Documentation

## F3

Real Ogre::Volume::SimplexNoise::F3

static private

Skewing and unskewing factor for 3 dimensions.

Definition at line 47 of file OgreVolumeSimplexNoise.h.

## G3

Real Ogre::Volume::SimplexNoise::G3

static private

Skewing and unskewing factor for 3 dimensions.

Definition at line 50 of file OgreVolumeSimplexNoise.h.

## mSeed

long Ogre::Volume::SimplexNoise::mSeed

private

Random seed.

Definition at line 53 of file OgreVolumeSimplexNoise.h.

## perm

short Ogre::Volume::SimplexNoise::perm[512]

private

Permutation table.

Definition at line 56 of file OgreVolumeSimplexNoise.h.

## permMod12

short Ogre::Volume::SimplexNoise::permMod12[512]

private

Permutation table modulo 12.

Definition at line 59 of file OgreVolumeSimplexNoise.h.

The documentation for this class was generated from the following file:

- OgreVolumeSimplexNoise.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.