CS::Math::Noise::Module::Exponent Class Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes
CS::Math::Noise::Module::Exponent Class Reference
Modifier Modules

Noise module that maps the output value from a source module onto an exponential curve. More...

`#include <cstool/noise/module/exponent.h>`

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

List of all members.

## Public Member Functions
| Exponent ()
| Constructor.
double | GetExponent () const
| Returns the exponent value to apply to the output value from the source 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 | SetExponent (double exponent)
| Sets the exponent value to apply to the output value from the source module.
## Protected Attributes
double | m_exponent
| Exponent to apply to the output value from the source module.

## Detailed Description

Noise module that maps the output value from a source module onto an exponential curve.

Because most noise modules will output values that range from -1.0 to +1.0, this noise module first normalizes this output value (the range becomes 0.0 to 1.0), maps that value onto an exponential curve, then rescales that value back to the original range.

This noise module requires one source module.

Definition at line 56 of file exponent.h.

## Constructor & Destructor Documentation

CS::Math::Noise::Module::Exponent::Exponent | ( |  | ) |

Constructor.

The default exponent is set to CS::Math::Noise::Module::DEFAULT_EXPONENT.

## Member Function Documentation

double CS::Math::Noise::Module::Exponent::GetExponent | ( |  | ) | const`[inline]`

Returns the exponent value to apply to the output value from the source module.

Returns:
  The exponent value.

Because most noise modules will output values that range from -1.0 to +1.0, this noise module first normalizes this output value (the range becomes 0.0 to 1.0), maps that value onto an exponential curve, then rescales that value back to the original range.

Definition at line 75 of file exponent.h.

virtual int CS::Math::Noise::Module::Exponent::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 80 of file exponent.h.

virtual double CS::Math::Noise::Module::Exponent::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::Exponent::SetExponent | ( | double | exponent | ) | `[inline]`

Sets the exponent value to apply to the output value from the source module.

Parameters:

  exponent | The exponent value.

Because most noise modules will output values that range from -1.0 to +1.0, this noise module first normalizes this output value (the range becomes 0.0 to 1.0), maps that value onto an exponential curve, then rescales that value back to the original range.

Definition at line 96 of file exponent.h.

## Member Data Documentation

double CS::Math::Noise::Module::Exponent::m_exponent`[protected]`

Exponent to apply to the output value from the source module.

Definition at line 104 of file exponent.h.

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

- cstool/noise/module/exponent.h