#include <noisetexture.h>
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! | |
| 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.
| 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 |
| NoiseTexture::~NoiseTexture | ( | ) |
| void dtUtil::NoiseTexture::SetOctaves | ( | int | o | ) | [inline] |
Sets octaves.
| o | an int greater than 0 |
| void dtUtil::NoiseTexture::SetFrequency | ( | int | f | ) | [inline] |
Sets frequency.
| f | an int greater than 0 |
| void dtUtil::NoiseTexture::SetAmplitude | ( | double | a | ) | [inline] |
Sets amplitude.
| a | a double greater than 0 |
| void dtUtil::NoiseTexture::SetPersistence | ( | double | p | ) | [inline] |
sets persistence
| p | a double from 0-1 |
| void dtUtil::NoiseTexture::SetWidth | ( | int | w | ) | [inline] |
Sets width.
| w | texture resolution of x dimension |
| void dtUtil::NoiseTexture::SetHeight | ( | int | h | ) | [inline] |
Sets height.
| h | texture resolution of y dimension |
| void dtUtil::NoiseTexture::SetSlices | ( | int | s | ) | [inline] |
Sets slices.
| s | the number of slices |
| osg::Image * NoiseTexture::MakeNoiseTexture | ( | GLenum | format | ) |
This function creates the texture.
| format | specifies the format of the texture should be used GL_ALPHA (for a transparency map), GL_LUMINANCE, GL_RGB or GL_RGBA |
| 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!