CrystalSpace

Public API Reference

CS::Math::Noise::Module::Billow Class Reference
[Generator Modules]

Noise module that outputs three-dimensional "billowy" noise. More...

#include <cstool/noise/module/billow.h>

Inheritance diagram for CS::Math::Noise::Module::Billow:

List of all members.

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.

modulebillow.png

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]

Returns the frequency of the first octave.

Returns:
The frequency of the first octave.

Definition at line 104 of file billow.h.

double CS::Math::Noise::Module::Billow::GetLacunarity (  )  const [inline]

Returns the lacunarity of the billowy noise.

Returns:
The lacunarity of the billowy noise.

The lacunarity is the frequency multiplier between successive octaves.

Definition at line 115 of file billow.h.

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.

Definition at line 126 of file billow.h.

int CS::Math::Noise::Module::Billow::GetOctaveCount (  )  const [inline]

Returns the number of octaves that generate the billowy noise.

Returns:
The number of octaves that generate the billowy noise.

The number of octaves controls the amount of detail in the billowy noise.

Definition at line 137 of file billow.h.

double CS::Math::Noise::Module::Billow::GetPersistence (  )  const [inline]

Returns the persistence value of the billowy noise.

Returns:
The persistence value of the billowy noise.

The persistence value controls the roughness of the billowy noise.

Definition at line 147 of file billow.h.

int CS::Math::Noise::Module::Billow::GetSeed (  )  const [inline]

Returns the seed value used by the billowy-noise function.

Returns:
The seed value.

Definition at line 155 of file billow.h.

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.

Definition at line 160 of file billow.h.

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]

Sets the frequency of the first octave.

Parameters:
frequency The frequency of the first octave.

Definition at line 170 of file billow.h.

void CS::Math::Noise::Module::Billow::SetLacunarity ( double  lacunarity  )  [inline]

Sets the lacunarity of the billowy noise.

Parameters:
lacunarity The lacunarity of the billowy noise.

The lacunarity is the frequency multiplier between successive octaves.

For best results, set the lacunarity to a number between 1.5 and 3.5.

Definition at line 184 of file billow.h.

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.

Definition at line 195 of file billow.h.

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.

Definition at line 216 of file billow.h.

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.

Definition at line 233 of file billow.h.

void CS::Math::Noise::Module::Billow::SetSeed ( int  seed  )  [inline]

Sets the seed value used by the billowy-noise function.

Parameters:
seed The seed value.

Definition at line 241 of file billow.h.


Member Data Documentation

Frequency of the first octave.

Definition at line 249 of file billow.h.

Frequency multiplier between successive octaves.

Definition at line 252 of file billow.h.

Quality of the billowy noise.

Definition at line 255 of file billow.h.

Total number of octaves that generate the billowy noise.

Definition at line 258 of file billow.h.

Persistence value of the billowy noise.

Definition at line 261 of file billow.h.

Seed value used by the billowy-noise function.

Definition at line 264 of file billow.h.


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

Generated for Crystal Space 2.1 by doxygen 1.6.1