dtUtil::NoiseTexture Class Reference

Noise Texture is a class that uses SeamlessNoise to generate an osg::Image. More...

#include <noisetexture.h>

List of all members.

Public Member Functions

DT_UTIL_EXPORT NoiseTexture ()
DT_UTIL_EXPORT NoiseTexture (int octaves, int frequency, double amp, double persistance, int width, int height, int slices=1)
 Constructor: For a more detailed listing of these params see dtUtil::Fracal.
DT_UTIL_EXPORT ~NoiseTexture ()
void SetOctaves (int o)
 Sets octaves.
void SetFrequency (int f)
 Sets frequency.
void SetAmplitude (double a)
 Sets amplitude.
void SetPersistence (double p)
 sets persistence
void SetWidth (int w)
 Sets width.
void SetHeight (int h)
 Sets height.
void SetSlices (int s)
 Sets slices.
DT_UTIL_EXPORT osg::Image * MakeNoiseTexture (GLenum format)
 This function creates the texture.
osg::Image * GetNoiseTexture ()
 If you need a pointer to the texture you'll find it here don't call this if you haven't generated the texture yet!


Detailed Description

Noise Texture is a class that uses SeamlessNoise to generate an osg::Image.

Constructor & Destructor Documentation

NoiseTexture::NoiseTexture (  ) 

NoiseTexture::NoiseTexture ( int  octaves,
int  frequency,
double  amp,
double  persistance,
int  width,
int  height,
int  slices = 1 
)

Constructor: For a more detailed listing of these params see dtUtil::Fracal.

Parameters:
octaves the number of summations of the noise
frequency the frequency of the noise
amp the amplitude of the noise
persistance the persistance of the noise
width A power of 2, specifying the x resolution
height A power of 2, specifying the y resolution
slices A power of 2, specifying the z resolution, or 1 for 2D textures
See also:
dtUtil::Fractal

NoiseTexture::~NoiseTexture (  ) 


Member Function Documentation

void dtUtil::NoiseTexture::SetOctaves ( int  o  )  [inline]

Sets octaves.

Parameters:
o an int greater than 0

void dtUtil::NoiseTexture::SetFrequency ( int  f  )  [inline]

Sets frequency.

Parameters:
f an int greater than 0

void dtUtil::NoiseTexture::SetAmplitude ( double  a  )  [inline]

Sets amplitude.

Parameters:
a a double greater than 0

void dtUtil::NoiseTexture::SetPersistence ( double  p  )  [inline]

sets persistence

Parameters:
p a double from 0-1

void dtUtil::NoiseTexture::SetWidth ( int  w  )  [inline]

Sets width.

Parameters:
w texture resolution of x dimension

void dtUtil::NoiseTexture::SetHeight ( int  h  )  [inline]

Sets height.

Parameters:
h texture resolution of y dimension

void dtUtil::NoiseTexture::SetSlices ( int  s  )  [inline]

Sets slices.

Parameters:
s the number of slices

osg::Image * NoiseTexture::MakeNoiseTexture ( GLenum  format  ) 

This function creates the texture.

Parameters:
format specifies the format of the texture should be used GL_ALPHA (for a transparency map), GL_LUMINANCE, GL_RGB or GL_RGBA
Returns:
returns a pointer to the image

osg::Image* dtUtil::NoiseTexture::GetNoiseTexture (  )  [inline]

If you need a pointer to the texture you'll find it here don't call this if you haven't generated the texture yet!

Returns:
returns a pointer to the image created


http://www.delta3d.org
2.0.0 generated 14 Feb 2008