A portable, open-source, coherent noise-generating library for C++
Main Page | Modules | Class Hierarchy | Class List | File List | Class Members # noise::module::ScalePoint Class Reference [Transformer Modules] `#include <scalepoint.h>` Inheritance diagram for noise::module::ScalePoint: List of all members. ## 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.
## Public Member Functions
| ScalePoint ()
| Constructor.
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.
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.
## Constructor & Destructor Documentation
ScalePoint::ScalePoint | ( |  | ) |
| Constructor. The default scaling factor applied to the x coordinate is set to noise::module::DEFAULT_SCALE_POINT_X. The default scaling factor applied to the y coordinate is set to noise::module::DEFAULT_SCALE_POINT_Y. The default scaling factor applied to the z coordinate is set to noise::module::DEFAULT_SCALE_POINT_Z.
## Member Function Documentation
virtual int 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 noise::module::Module.
double 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 noise::module::Module.
double 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.
double 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.
double 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.
void 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.
void 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.
void 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.
void 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.
void 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.
The documentation for this class was generated from the following files: scalepoint.h scalepoint.cpp