CrystalSpace

Public API Reference

CS::Math::Noise::Module::RotatePoint Class Reference
[Transformer Modules]

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

#include <cstool/noise/module/rotatepoint.h>

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

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 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.
 RotatePoint ()
 Constructor.
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.

Detailed Description

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

modulerotatepoint.png

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.

Definition at line 71 of file rotatepoint.h.


Constructor & Destructor Documentation

CS::Math::Noise::Module::RotatePoint::RotatePoint (  ) 

Constructor.

The default rotation angle around the x axis, in degrees, is set to CS::Math::Noise::Module::DEFAULT_ROTATE_X.

The default rotation angle around the y axis, in degrees, is set to CS::Math::Noise::Module::DEFAULT_ROTATE_Y.

The default rotation angle around the z axis, in degrees, is set to CS::Math::Noise::Module::DEFAULT_ROTATE_Z.


Member Function Documentation

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

Definition at line 88 of file rotatepoint.h.

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

double CS::Math::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.

Definition at line 99 of file rotatepoint.h.

double CS::Math::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.

Definition at line 108 of file rotatepoint.h.

double CS::Math::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.

Definition at line 117 of file rotatepoint.h.

void CS::Math::Noise::Module::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 CS::Math::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.

Definition at line 142 of file rotatepoint.h.

void CS::Math::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.

Definition at line 155 of file rotatepoint.h.

void CS::Math::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.

Definition at line 168 of file rotatepoint.h.


Member Data Documentation

An entry within the 3x3 rotation matrix used for rotating the input value.

Definition at line 177 of file rotatepoint.h.

An entry within the 3x3 rotation matrix used for rotating the input value.

Definition at line 181 of file rotatepoint.h.

An entry within the 3x3 rotation matrix used for rotating the input value.

Definition at line 185 of file rotatepoint.h.

x rotation angle applied to the input value, in degrees.

Definition at line 188 of file rotatepoint.h.

An entry within the 3x3 rotation matrix used for rotating the input value.

Definition at line 192 of file rotatepoint.h.

An entry within the 3x3 rotation matrix used for rotating the input value.

Definition at line 196 of file rotatepoint.h.

An entry within the 3x3 rotation matrix used for rotating the input value.

Definition at line 200 of file rotatepoint.h.

y rotation angle applied to the input value, in degrees.

Definition at line 203 of file rotatepoint.h.

An entry within the 3x3 rotation matrix used for rotating the input value.

Definition at line 207 of file rotatepoint.h.

An entry within the 3x3 rotation matrix used for rotating the input value.

Definition at line 211 of file rotatepoint.h.

An entry within the 3x3 rotation matrix used for rotating the input value.

Definition at line 215 of file rotatepoint.h.

z rotation angle applied to the input value, in degrees.

Definition at line 218 of file rotatepoint.h.


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

Generated for Crystal Space 2.1 by doxygen 1.6.1