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

Main Page | Modules | Class Hierarchy | Class List | File List | Class Members

# noise::module::RotatePoint Class Reference
[Transformer Modules]

`#include <rotatepoint.h>`

Inheritance diagram for noise::module::RotatePoint:

List of all members.

## Detailed Description

Noise module that rotates the input value around the origin before returning the output value from a source module.

The GetValue() method rotates the coordinates of the input value around the origin before returning the output value from the source module. To set the rotation angles, call the SetAngles() method. To set the rotation angle around the individual x, y, or z axes, call the SetXAngle(), SetYAngle() or SetZAngle() methods, respectively.

The coordinate system of the input value is assumed to be "left-handed" (x increases to the right, y increases upward, and z increases inward.)

This noise module requires one source module.

## Public Member Functions

| RotatePoint ()
| 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 | GetXAngle () const
| Returns the rotation angle around the x axis to apply to the input value.
double | GetYAngle () const
| Returns the rotation angle around the y axis to apply to the input value.
double | GetZAngle () const
| Returns the rotation angle around the z axis to apply to the input value.
void | SetAngles (double xAngle, double yAngle, double zAngle)
| Sets the rotation angles around all three axes to apply to the input value.
void | SetXAngle (double xAngle)
| Sets the rotation angle around the x axis to apply to the input value.
void | SetYAngle (double yAngle)
| Sets the rotation angle around the y axis to apply to the input value.
void | SetZAngle (double zAngle)
| Sets the rotation angle around the z axis to apply to the input value.

## Protected Attributes

double | m_x1Matrix
| An entry within the 3x3 rotation matrix used for rotating the input value.
double | m_x2Matrix
| An entry within the 3x3 rotation matrix used for rotating the input value.
double | m_x3Matrix
| An entry within the 3x3 rotation matrix used for rotating the input value.
double | m_xAngle
| x rotation angle applied to the input value, in degrees.
double | m_y1Matrix
| An entry within the 3x3 rotation matrix used for rotating the input value.
double | m_y2Matrix
| An entry within the 3x3 rotation matrix used for rotating the input value.
double | m_y3Matrix
| An entry within the 3x3 rotation matrix used for rotating the input value.
double | m_yAngle
| y rotation angle applied to the input value, in degrees.
double | m_z1Matrix
| An entry within the 3x3 rotation matrix used for rotating the input value.
double | m_z2Matrix
| An entry within the 3x3 rotation matrix used for rotating the input value.
double | m_z3Matrix
| An entry within the 3x3 rotation matrix used for rotating the input value.
double | m_zAngle
| z rotation angle applied to the input value, in degrees.

## Constructor & Destructor Documentation

RotatePoint::RotatePoint | ( |  | ) |

| Constructor. The default rotation angle around the x axis, in degrees, is set to noise::module::DEFAULT_ROTATE_X. The default rotation angle around the y axis, in degrees, is set to noise::module::DEFAULT_ROTATE_Y. The default rotation angle around the z axis, in degrees, is set to noise::module::DEFAULT_ROTATE_Z.

## Member Function Documentation

virtual int noise::module::RotatePoint::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 RotatePoint::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::RotatePoint::GetXAngle | ( |  | ) | const`[inline]`

Returns the rotation angle around the x axis to apply to the input value.

Returns:
  The rotation angle around the x axis, in degrees.

double noise::module::RotatePoint::GetYAngle | ( |  | ) | const`[inline]`

Returns the rotation angle around the y axis to apply to the input value.

Returns:
  The rotation angle around the y axis, in degrees.

double noise::module::RotatePoint::GetZAngle | ( |  | ) | const`[inline]`

Returns the rotation angle around the z axis to apply to the input value.

Returns:
  The rotation angle around the z axis, in degrees.

void RotatePoint::SetAngles | ( | double | xAngle,
|  | double | yAngle,
|  | double | zAngle
| ) |

Sets the rotation angles around all three axes to apply to the input value.

Parameters:

  | xAngle | The rotation angle around the x axis, in degrees.
  | yAngle | The rotation angle around the y axis, in degrees.
  | zAngle | The rotation angle around the z axis, in degrees.

The GetValue() method rotates the coordinates of the input value around the origin before returning the output value from the source module.

void noise::module::RotatePoint::SetXAngle | ( | double | xAngle | ) | `[inline]`

Sets the rotation angle around the x axis to apply to the input value.

Parameters:

  | xAngle | The rotation angle around the x axis, in degrees.

The GetValue() method rotates the coordinates of the input value around the origin before returning the output value from the source module.

void noise::module::RotatePoint::SetYAngle | ( | double | yAngle | ) | `[inline]`

Sets the rotation angle around the y axis to apply to the input value.

Parameters:

  | yAngle | The rotation angle around the y axis, in degrees.

The GetValue() method rotates the coordinates of the input value around the origin before returning the output value from the source module.

void noise::module::RotatePoint::SetZAngle | ( | double | zAngle | ) | `[inline]`

Sets the rotation angle around the z axis to apply to the input value.

Parameters:

  | zAngle | The rotation angle around the z axis, in degrees.

The GetValue() method rotates the coordinates of the input value around the origin before returning the output value from the source module.

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

- rotatepoint.h
- rotatepoint.cpp