torque Torque Game Engine Documentation
TGE Version 1.5.2

Noise2D Class Reference

#include <terraformerNoise.h>


Public Member Functions

 Noise2D ()
 ~Noise2D ()
void setSeed (U32 seed)
U32 getSeed ()
F32 getValue (F32 u, F32 v, S32 interval)
void fBm (Heightfield *dst, U32 size, U32 interval, F32 h, F32 octave=5.0f)
void rigidMultiFractal (Heightfield *dst, Heightfield *signal, U32 size, U32 interval, F32 h, F32 octave=5.0f)
F32 turbulence (F32 x, F32 y, F32 freq)

Private Types

enum  Constants {
  SIZE = 0x100,
  SIZE_MASK = 0x0ff
}

Private Member Functions

F32 lerp (F32 t, F32 a, F32 b)
F32 curve (F32 t)
void setup (F32 t, S32 &b0, S32 &b1, F32 &r0, F32 &r1)
F32 dot (const F32 *q, F32 rx, F32 ry)
void normalize (F32 v[2])

Private Attributes

S32 mPermutation [SIZE+SIZE+2]
F32 mGradient [SIZE+SIZE+2][2]
U32 mSeed
MRandom mRandom


Member Enumeration Documentation

enum Noise2D::Constants [private]

Enumerator:
SIZE 
SIZE_MASK 


Constructor & Destructor Documentation

Noise2D::Noise2D (  ) 

Noise2D::~Noise2D (  ) 


Member Function Documentation

F32 Noise2D::lerp ( F32  t,
F32  a,
F32  b 
) [private]

F32 Noise2D::curve ( F32  t  )  [private]

void Noise2D::setup ( F32  t,
S32 b0,
S32 b1,
F32 r0,
F32 r1 
) [private]

F32 Noise2D::dot ( const F32 q,
F32  rx,
F32  ry 
) [private]

void Noise2D::normalize ( F32  v[2]  )  [private]

void Noise2D::setSeed ( U32  seed  ) 

U32 Noise2D::getSeed (  ) 

F32 Noise2D::getValue ( F32  u,
F32  v,
S32  interval 
)

void Noise2D::fBm ( Heightfield dst,
U32  size,
U32  interval,
F32  h,
F32  octave = 5.0f 
)

void Noise2D::rigidMultiFractal ( Heightfield dst,
Heightfield signal,
U32  size,
U32  interval,
F32  h,
F32  octave = 5.0f 
)

F32 Noise2D::turbulence ( F32  x,
F32  y,
F32  freq 
)


Field Documentation

S32 Noise2D::mPermutation[SIZE+SIZE+2] [private]

F32 Noise2D::mGradient[SIZE+SIZE+2][2] [private]

U32 Noise2D::mSeed [private]




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen