CS::Math::Noise::Module::Billow Class Reference
[Generator Modules]
Noise module that outputs three-dimensional "billowy" noise. More...
#include <cstool/noise/module/billow.h>
Public Member Functions | |
Billow () | |
Constructor. | |
double | GetFrequency () const |
Returns the frequency of the first octave. | |
double | GetLacunarity () const |
Returns the lacunarity of the billowy noise. | |
CS::Math::Noise::NoiseQuality | GetNoiseQuality () const |
Returns the quality of the billowy noise. | |
int | GetOctaveCount () const |
Returns the number of octaves that generate the billowy noise. | |
double | GetPersistence () const |
Returns the persistence value of the billowy noise. | |
int | GetSeed () const |
Returns the seed value used by the billowy-noise function. | |
virtual int | GetSourceModuleCount () const |
Returns the number of source modules required by this noise module. | |
virtual double | GetValue (double x, double y, double z) const |
Generates an output value given the coordinates of the specified input value. | |
void | SetFrequency (double frequency) |
Sets the frequency of the first octave. | |
void | SetLacunarity (double lacunarity) |
Sets the lacunarity of the billowy noise. | |
void | SetNoiseQuality (CS::Math::Noise::NoiseQuality noiseQuality) |
Sets the quality of the billowy noise. | |
void | SetOctaveCount (int octaveCount) |
Sets the number of octaves that generate the billowy noise. | |
void | SetPersistence (double persistence) |
Sets the persistence value of the billowy noise. | |
void | SetSeed (int seed) |
Sets the seed value used by the billowy-noise function. | |
Protected Attributes | |
double | m_frequency |
Frequency of the first octave. | |
double | m_lacunarity |
Frequency multiplier between successive octaves. | |
CS::Math::Noise::NoiseQuality | m_noiseQuality |
Quality of the billowy noise. | |
int | m_octaveCount |
Total number of octaves that generate the billowy noise. | |
double | m_persistence |
Persistence value of the billowy noise. | |
int | m_seed |
Seed value used by the billowy-noise function. |
Detailed Description
Noise module that outputs three-dimensional "billowy" noise.
This noise module generates "billowy" noise suitable for clouds and rocks.
This noise module is nearly identical to CS::Math::Noise::Module::Perlin except this noise module modifies each octave with an absolute-value function. See the documentation of CS::Math::Noise::Module::Perlin for more information.
Definition at line 77 of file billow.h.
Constructor & Destructor Documentation
CS::Math::Noise::Module::Billow::Billow | ( | ) |
Constructor.
The default frequency is set to CS::Math::Noise::Module::DEFAULT_BILLOW_FREQUENCY.
The default lacunarity is set to CS::Math::Noise::Module::DEFAULT_BILLOW_LACUNARITY.
The default number of octaves is set to CS::Math::Noise::Module::DEFAULT_BILLOW_OCTAVE_COUNT.
The default persistence value is set to CS::Math::Noise::Module::DEFAULT_BILLOW_PERSISTENCE.
The default seed value is set to CS::Math::Noise::Module::DEFAULT_BILLOW_SEED.
Member Function Documentation
double CS::Math::Noise::Module::Billow::GetFrequency | ( | ) | const [inline] |
double CS::Math::Noise::Module::Billow::GetLacunarity | ( | ) | const [inline] |
CS::Math::Noise::NoiseQuality CS::Math::Noise::Module::Billow::GetNoiseQuality | ( | ) | const [inline] |
Returns the quality of the billowy noise.
- Returns:
- The quality of the billowy noise.
See CS::Math::Noise::NoiseQuality for definitions of the various coherent-noise qualities.
int CS::Math::Noise::Module::Billow::GetOctaveCount | ( | ) | const [inline] |
double CS::Math::Noise::Module::Billow::GetPersistence | ( | ) | const [inline] |
int CS::Math::Noise::Module::Billow::GetSeed | ( | ) | const [inline] |
virtual int CS::Math::Noise::Module::Billow::GetSourceModuleCount | ( | ) | const [inline, virtual] |
Returns the number of source modules required by this noise module.
- Returns:
- The number of source modules required by this noise module.
Implements CS::Math::Noise::Module::Module.
virtual double CS::Math::Noise::Module::Billow::GetValue | ( | double | x, | |
double | y, | |||
double | z | |||
) | const [virtual] |
Generates an output value given the coordinates of the specified input value.
- Parameters:
-
x The x coordinate of the input value. y The y coordinate of the input value. z The z coordinate of the input value.
- Returns:
- The output value.
- Precondition:
- All source modules required by this noise module have been passed to the SetSourceModule() method.
Before an application can call this method, it must first connect all required source modules via the SetSourceModule() method. If these source modules are not connected to this noise module, this method raises a debug assertion.
To determine the number of source modules required by this noise module, call the GetSourceModuleCount() method.
Implements CS::Math::Noise::Module::Module.
void CS::Math::Noise::Module::Billow::SetFrequency | ( | double | frequency | ) | [inline] |
void CS::Math::Noise::Module::Billow::SetLacunarity | ( | double | lacunarity | ) | [inline] |
void CS::Math::Noise::Module::Billow::SetNoiseQuality | ( | CS::Math::Noise::NoiseQuality | noiseQuality | ) | [inline] |
Sets the quality of the billowy noise.
- Parameters:
-
noiseQuality The quality of the billowy noise.
See CS::Math::Noise::NoiseQuality for definitions of the various coherent-noise qualities.
void CS::Math::Noise::Module::Billow::SetOctaveCount | ( | int | octaveCount | ) | [inline] |
Sets the number of octaves that generate the billowy noise.
- Parameters:
-
octaveCount The number of octaves that generate the billowy noise.
- Precondition:
- The number of octaves ranges from 1 to CS::Math::Noise::Module::BILLOW_MAX_OCTAVE.
- Exceptions:
-
CS::Math::Noise::ExceptionInvalidParam An invalid parameter was specified; see the preconditions for more information.
The number of octaves controls the amount of detail in the billowy noise.
The larger the number of octaves, the more time required to calculate the billowy-noise value.
void CS::Math::Noise::Module::Billow::SetPersistence | ( | double | persistence | ) | [inline] |
Sets the persistence value of the billowy noise.
- Parameters:
-
persistence The persistence value of the billowy noise.
The persistence value controls the roughness of the billowy noise.
For best results, set the persistence value to a number between 0.0 and 1.0.
void CS::Math::Noise::Module::Billow::SetSeed | ( | int | seed | ) | [inline] |
Member Data Documentation
double CS::Math::Noise::Module::Billow::m_frequency [protected] |
double CS::Math::Noise::Module::Billow::m_lacunarity [protected] |
int CS::Math::Noise::Module::Billow::m_octaveCount [protected] |
double CS::Math::Noise::Module::Billow::m_persistence [protected] |
int CS::Math::Noise::Module::Billow::m_seed [protected] |
The documentation for this class was generated from the following file:
- cstool/noise/module/billow.h
Generated for Crystal Space 2.0 by doxygen 1.6.1