CS::Math::Noise::Module::ScalePoint 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::ScalePoint Class Reference
Transformer Modules

Noise module that scales the coordinates of the input value before returning the output value from a source module. More...

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

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

List of all members.

## Public Member Functions
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.
double | GetXScale () const
| Returns the scaling factor applied to the x coordinate of the input value.
double | GetYScale () const
| Returns the scaling factor applied to the y coordinate of the input value.
double | GetZScale () const
| Returns the scaling factor applied to the z coordinate of the input value.
| ScalePoint ()
| Constructor.
void | SetScale (double scale)
| Sets the scaling factor to apply to the input value.
void | SetScale (double xScale, double yScale, double zScale)
| Sets the scaling factor to apply to the ( x, y, z ) coordinates of the input value.
void | SetXScale (double xScale)
| Sets the scaling factor to apply to the x coordinate of the input value.
void | SetYScale (double yScale)
| Sets the scaling factor to apply to the y coordinate of the input value.
void | SetZScale (double zScale)
| Sets the scaling factor to apply to the z coordinate of the input value.
## Protected Attributes
double | m_xScale
| Scaling factor applied to the x coordinate of the input value.
double | m_yScale
| Scaling factor applied to the y coordinate of the input value.
double | m_zScale
| Scaling factor applied to the z coordinate of the input value.

## Detailed Description

Noise module that scales the coordinates of the input value before returning the output value from a source module.

The GetValue() method multiplies the ( x, y, z ) coordinates of the input value with a scaling factor before returning the output value from the source module. To set the scaling factor, call the SetScale() method. To set the scaling factor to apply to the individual x, y, or z coordinates, call the SetXScale(), SetYScale() or SetZScale() methods, respectively.

This noise module requires one source module.

Definition at line 67 of file scalepoint.h.

## Constructor & Destructor Documentation

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

Constructor.

The default scaling factor applied to the x coordinate is set to CS::Math::Noise::Module::DEFAULT_SCALE_POINT_X.

The default scaling factor applied to the y coordinate is set to CS::Math::Noise::Module::DEFAULT_SCALE_POINT_Y.

The default scaling factor applied to the z coordinate is set to CS::Math::Noise::Module::DEFAULT_SCALE_POINT_Z.

## Member Function Documentation

virtual int CS::Math::Noise::Module::ScalePoint::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 84 of file scalepoint.h.

virtual double CS::Math::Noise::Module::ScalePoint::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.

double CS::Math::Noise::Module::ScalePoint::GetXScale | ( |  | ) | const`[inline]`

Returns the scaling factor applied to the x coordinate of the input value.

Returns:
  The scaling factor applied to the x coordinate.

Definition at line 95 of file scalepoint.h.

double CS::Math::Noise::Module::ScalePoint::GetYScale | ( |  | ) | const`[inline]`

Returns the scaling factor applied to the y coordinate of the input value.

Returns:
  The scaling factor applied to the y coordinate.

Definition at line 104 of file scalepoint.h.

double CS::Math::Noise::Module::ScalePoint::GetZScale | ( |  | ) | const`[inline]`

Returns the scaling factor applied to the z coordinate of the input value.

Returns:
  The scaling factor applied to the z coordinate.

Definition at line 113 of file scalepoint.h.

void CS::Math::Noise::Module::ScalePoint::SetScale | ( | double | scale | ) | `[inline]`

Sets the scaling factor to apply to the input value.

Parameters:

  scale | The scaling factor to apply.

The GetValue() method multiplies the ( x, y, z ) coordinates of the input value with a scaling factor before returning the output value from the source module.

Definition at line 125 of file scalepoint.h.

void CS::Math::Noise::Module::ScalePoint::SetScale | ( | double | xScale,
|  | double | yScale,
|  | double | zScale
| ) |  | `[inline]`

Sets the scaling factor to apply to the ( x, y, z ) coordinates of the input value.

Parameters:

  xScale | The scaling factor to apply to the x coordinate.
  yScale | The scaling factor to apply to the y coordinate.
  zScale | The scaling factor to apply to the z coordinate.

The GetValue() method multiplies the ( x, y, z ) coordinates of the input value with a scaling factor before returning the output value from the source module.

Definition at line 142 of file scalepoint.h.

void CS::Math::Noise::Module::ScalePoint::SetXScale | ( | double | xScale | ) | `[inline]`

Sets the scaling factor to apply to the x coordinate of the input value.

Parameters:

  xScale | The scaling factor to apply to the x coordinate.

The GetValue() method multiplies the ( x, y, z ) coordinates of the input value with a scaling factor before returning the output value from the source module.

Definition at line 157 of file scalepoint.h.

void CS::Math::Noise::Module::ScalePoint::SetYScale | ( | double | yScale | ) | `[inline]`

Sets the scaling factor to apply to the y coordinate of the input value.

Parameters:

  yScale | The scaling factor to apply to the y coordinate.

The GetValue() method multiplies the ( x, y, z ) coordinates of the input value with a scaling factor before returning the output value from the source module.

Definition at line 170 of file scalepoint.h.

void CS::Math::Noise::Module::ScalePoint::SetZScale | ( | double | zScale | ) | `[inline]`

Sets the scaling factor to apply to the z coordinate of the input value.

Parameters:

  zScale | The scaling factor to apply to the z coordinate.

The GetValue() method multiplies the ( x, y, z ) coordinates of the input value with a scaling factor before returning the output value from the source module.

Definition at line 183 of file scalepoint.h.

## Member Data Documentation

double CS::Math::Noise::Module::ScalePoint::m_xScale`[protected]`

Scaling factor applied to the x coordinate of the input value.

Definition at line 191 of file scalepoint.h.

double CS::Math::Noise::Module::ScalePoint::m_yScale`[protected]`

Scaling factor applied to the y coordinate of the input value.

Definition at line 194 of file scalepoint.h.

double CS::Math::Noise::Module::ScalePoint::m_zScale`[protected]`

Scaling factor applied to the z coordinate of the input value.

Definition at line 197 of file scalepoint.h.

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

- cstool/noise/module/scalepoint.h