![]() |
Public API Reference |
![]() |
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>
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. |
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.
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.
virtual int CS::Math::Noise::Module::ScalePoint::GetSourceModuleCount | ( | ) | const [inline, virtual] |
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.
x | The x coordinate of the input value. |
y | The y coordinate of the input value. |
z | The z coordinate of the input value. |
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.