libnoise logo

A portable, open-source, coherent noise-generating library for C++


noise::module::TranslatePoint Class Reference
[Transformer Modules]

#include <translatepoint.h>

Inheritance diagram for noise::module::TranslatePoint:

noise::module::Module List of all members.

Detailed Description

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

moduletranslatepoint.png

The GetValue() method moves the ( x, y, z ) coordinates of the input value by a translation amount before returning the output value from the source module. To set the translation amount, call the SetTranslation() method. To set the translation amount to apply to the individual x, y, or z coordinates, call the SetXTranslation(), SetYTranslation() or SetZTranslation() methods, respectively.

This noise module requires one source module.


Public Member Functions

 TranslatePoint ()
 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 GetXTranslation () const
 Returns the translation amount to apply to the x coordinate of the input value.
double GetYTranslation () const
 Returns the translation amount to apply to the y coordinate of the input value.
double GetZTranslation () const
 Returns the translation amount to apply to the z coordinate of the input value.
void SetTranslation (double translation)
 Sets the translation amount to apply to the input value.
void SetTranslation (double xTranslation, double yTranslation, double zTranslation)
 Sets the translation amounts to apply to the ( x, y, z ) coordinates of the input value.
void SetXTranslation (double xTranslation)
 Sets the translation amount to apply to the x coordinate of the input value.
void SetYTranslation (double yTranslation)
 Sets the translation amount to apply to the y coordinate of the input value.
void SetZTranslation (double zTranslation)
 Sets the translation amount to apply to the z coordinate of the input value.

Protected Attributes

double m_xTranslation
 Translation amount applied to the x coordinate of the input value.
double m_yTranslation
 Translation amount applied to the y coordinate of the input value.
double m_zTranslation
 Translation amount applied to the z coordinate of the input value.

Constructor & Destructor Documentation

TranslatePoint::TranslatePoint  ) 
 

Constructor.

The default translation amount to apply to the x coordinate is set to noise::module::DEFAULT_TRANSLATE_POINT_X.

The default translation amount to apply to the y coordinate is set to noise::module::DEFAULT_TRANSLATE_POINT_Y.

The default translation amount to apply to the z coordinate is set to noise::module::DEFAULT_TRANSLATE_POINT_Z.


Member Function Documentation

virtual int noise::module::TranslatePoint::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 TranslatePoint::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::TranslatePoint::GetXTranslation  )  const [inline]
 

Returns the translation amount to apply to the x coordinate of the input value.

Returns:
The translation amount to apply to the x coordinate.

double noise::module::TranslatePoint::GetYTranslation  )  const [inline]
 

Returns the translation amount to apply to the y coordinate of the input value.

Returns:
The translation amount to apply to the y coordinate.

double noise::module::TranslatePoint::GetZTranslation  )  const [inline]
 

Returns the translation amount to apply to the z coordinate of the input value.

Returns:
The translation amount to apply to the z coordinate.

void noise::module::TranslatePoint::SetTranslation double  xTranslation,
double  yTranslation,
double  zTranslation
[inline]
 

Sets the translation amounts to apply to the ( x, y, z ) coordinates of the input value.

Parameters:
xTranslation The translation amount to apply to the x coordinate.
yTranslation The translation amount to apply to the y coordinate.
zTranslation The translation amount to apply to the z coordinate.
The GetValue() method moves the ( x, y, z ) coordinates of the input value by a translation amount before returning the output value from the source module

void noise::module::TranslatePoint::SetTranslation double  translation  )  [inline]
 

Sets the translation amount to apply to the input value.

Parameters:
translation The translation amount to apply.
The GetValue() method moves the ( x, y, z ) coordinates of the input value by a translation amount before returning the output value from the source module

void noise::module::TranslatePoint::SetXTranslation double  xTranslation  )  [inline]
 

Sets the translation amount to apply to the x coordinate of the input value.

Parameters:
xTranslation The translation amount to apply to the x coordinate.
The GetValue() method moves the ( x, y, z ) coordinates of the input value by a translation amount before returning the output value from the source module

void noise::module::TranslatePoint::SetYTranslation double  yTranslation  )  [inline]
 

Sets the translation amount to apply to the y coordinate of the input value.

Parameters:
yTranslation The translation amount to apply to the y coordinate.
The GetValue() method moves the ( x, y, z ) coordinates of the input value by a translation amount before returning the output value from the source module

void noise::module::TranslatePoint::SetZTranslation double  zTranslation  )  [inline]
 

Sets the translation amount to apply to the z coordinate of the input value.

Parameters:
zTranslation The translation amount to apply to the z coordinate.
The GetValue() method moves the ( x, y, z ) coordinates of the input value by a translation amount before returning the output value from the source module

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