CS::Math::Noise::Module::Const Class Reference
[Generator Modules]
Noise module that outputs a constant value. More...
#include <cstool/noise/module/const.h>
Public Member Functions | |
Const () | |
Constructor. | |
double | GetConstValue () const |
Returns the constant output value for this noise module. | |
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 | SetConstValue (double constValue) |
Sets the constant output value for this noise module. | |
Protected Attributes | |
double | m_constValue |
Constant value. |
Detailed Description
Noise module that outputs a constant value.
To specify the constant value, call the SetConstValue() method.
This noise module is not useful by itself, but it is often used as a source module for other noise modules.
This noise module does not require any source modules.
Definition at line 56 of file const.h.
Constructor & Destructor Documentation
CS::Math::Noise::Module::Const::Const | ( | ) |
Constructor.
The default constant value is set to CS::Math::Noise::Module::DEFAULT_CONST_VALUE.
Member Function Documentation
double CS::Math::Noise::Module::Const::GetConstValue | ( | ) | const [inline] |
virtual int CS::Math::Noise::Module::Const::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::Const::GetValue | ( | double | x, | |
double | y, | |||
double | z | |||
) | const [inline, 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::Const::SetConstValue | ( | double | constValue | ) | [inline] |
Member Data Documentation
double CS::Math::Noise::Module::Const::m_constValue [protected] |
The documentation for this class was generated from the following file:
- cstool/noise/module/const.h
Generated for Crystal Space 2.0 by doxygen 1.6.1