#include <rotation.h>
Public Member Functions | |
| Rotation () | |
| Constructor. | |
| Rotation (double x0, double y0, double z0, Angle_Type at=ANG_RAD) | |
| Constructor. | |
| ~Rotation () | |
| Destructor. | |
| Rotation (const Rotation &r) | |
| Copy constructor. | |
| void | setX (double x, Angle_Type at=ANG_RAD) |
| Set the rotation in x direction. | |
| void | X (double x, Angle_Type at=ANG_RAD) |
| Set the rotation in x direction. | |
| void | setY (double y, Angle_Type at=ANG_RAD) |
| Set the rotation in y direction. | |
| void | Y (double y, Angle_Type at=ANG_RAD) |
| Set the rotation in y direction. | |
| void | setZ (double z, Angle_Type at=ANG_RAD) |
| Set the rotation in z direction. | |
| void | Z (double z, Angle_Type at=ANG_RAD) |
| Set the rotation in z direction. | |
| void | set (double x, double y, double z, Angle_Type at=ANG_RAD) |
| Set the rotation in x, y, and z direction. | |
| double | getX (Angle_Type at=ANG_RAD) const |
| Get the rotation in x direction. | |
| double | X (Angle_Type at=ANG_RAD) const |
| Get the rotation in x direction. | |
| double | getY (Angle_Type at=ANG_RAD) const |
| Get the rotation in y direction. | |
| double | Y (Angle_Type at=ANG_RAD) const |
| Get the rotation in y direction. | |
| double | getZ (Angle_Type at=ANG_RAD) const |
| Get the rotation in z direction. | |
| double | Z (Angle_Type at=ANG_RAD) const |
| Get the rotation in z direction. | |
| void | get (double &x_, double &y_, double &z_, Angle_Type at=ANG_RAD) const |
| Get the rotation in x, y, and z direction. | |
| void | get_matrix (Matrix4x4 &mx, Matrix4x4 &my, Matrix4x4 &mz) const |
| Get the matrices describing the rotation. | |
| void | get_inverse_matrix (Matrix4x4 &mx, Matrix4x4 &my, Matrix4x4 &mz) const |
| Get the inverse matrices describing the rotation. | |
| void | incX_by (double i, Angle_Type at=ANG_RAD) |
| Increment the x rotation by a certain value. | |
| void | incY_by (double i, Angle_Type at=ANG_RAD) |
| Increment the y rotation by a certain value. | |
| void | incZ_by (double i, Angle_Type at=ANG_RAD) |
| Increment the z rotation by a certain value. | |
| void | decX_by (double i, Angle_Type at=ANG_RAD) |
| Decrement the x rotation by a certain value. | |
| void | decY_by (double i, Angle_Type at=ANG_RAD) |
| Decrement the y rotation by a certain value. | |
| void | decZ_by (double i, Angle_Type at=ANG_RAD) |
| Decrement the z rotation by a certain value. | |
| void | set_wrap_at_2pi (bool w=true) |
| Make the angles wrap at 2*pi. | |
| bool | get_wrap_at_2PI () const |
| Get the value of the wrap flag. | |
| void | set_always_positive (bool a=true) |
| Sets the 'always positive' flag. | |
| bool | get_always_positive () const |
| Get the value of the 'always positive' flag. | |
| const Rotation & | operator= (const Rotation &r) |
| Assignment operator. | |
| Rotation | operator+ (const Rotation &r) const |
| Addition operator. | |
| Rotation | operator- (const Rotation &r) const |
| Subtraction operator. | |
| const Rotation & | operator+= (const Rotation &r) |
| Shorthand assignment addition operator. | |
| const Rotation & | operator-= (const Rotation &r) |
| Shorthand assignemnt subtraction operator. | |
Private Member Functions | |
| void | wrap (double &v) |
| Wraps the angle provided. | |
| void | make_positive (double &v) |
| Makes the angle positive. | |
| void | wrap_all () |
| Wrap all angles. | |
| void | make_all_positive () |
| Make all angles positive. | |
Private Attributes | |
| double | rot_x |
| The rotation in x direction. | |
| double | rot_y |
| The rotation in y direction. | |
| double | rot_z |
| The rotation in z direction. | |
| bool | wrap_at_2pi |
| Flag ensuring angles always less than 2*pi. | |
| bool | always_positive |
| Flag ensuring that angles are always positive. | |
| Rotation::Rotation | ( | ) |
Constructor. Initializes all angles to zero.
| Rotation::Rotation | ( | double | x0, | |
| double | y0, | |||
| double | z0, | |||
| Angle_Type | at = ANG_RAD | |||
| ) |
Constructor. Initializes all rotation angles to the given angles.
| x0 | The rotation in x direction. | |
| y0 | The rotation in y direction. | |
| z0 | The rotation in z direction. | |
| at | The type of the angles provided. See Angle_Type for further details. |
| Rotation::~Rotation | ( | ) |
Destructor. Does nothing. Just for completeness.
| Rotation::Rotation | ( | const Rotation & | r | ) |
| void Rotation::wrap | ( | double & | v | ) | [private] |
Wraps the given angle to satisfy
-2 * pi < x < 2 * pi
| v | The angle in radians. |
| void Rotation::make_positive | ( | double & | v | ) | [private] |
Makes the given angle positive.
| v | The angle in radians. |
| void Rotation::wrap_all | ( | ) | [private] |
Wraps all angles.
| void Rotation::make_all_positive | ( | ) | [private] |
Makes all angles positive.
| void Rotation::setX | ( | double | x, | |
| Angle_Type | at = ANG_RAD | |||
| ) |
Sets the x rotation angle.
| x | The x rotation angle. | |
| at | The type of the angle passed to the method. |
| void Rotation::X | ( | double | x, | |
| Angle_Type | at = ANG_RAD | |||
| ) |
Sets the x rotation angle.
| x | The x rotation angle. | |
| at | The type of the angle passed to the method. |
| void Rotation::setY | ( | double | y, | |
| Angle_Type | at = ANG_RAD | |||
| ) |
Sets the y rotation angle.
| y | The y rotation angle. | |
| at | The type of the angle passed to the method. |
| void Rotation::Y | ( | double | y, | |
| Angle_Type | at = ANG_RAD | |||
| ) |
Sets the y rotation angle.
| y | The y rotation angle. | |
| at | The type of the angle passed to the method. |
| void Rotation::setZ | ( | double | z, | |
| Angle_Type | at = ANG_RAD | |||
| ) |
Sets the z rotation angle.
| z | The z rotation angle. | |
| at | The type of the angle passed to the method. |
| void Rotation::Z | ( | double | z, | |
| Angle_Type | at = ANG_RAD | |||
| ) |
Sets the z rotation angle.
| z | The z rotation angle. | |
| at | The type of the angle passed to the method. |
| void Rotation::set | ( | double | x, | |
| double | y, | |||
| double | z, | |||
| Angle_Type | at = ANG_RAD | |||
| ) |
Sets all rotation angles.
| x | The rotation in x direction. | |
| y | The rotation in y direction. | |
| z | The rotation in z direction. | |
| at | The type of the angle passed to the method. |
| double Rotation::getX | ( | Angle_Type | at = ANG_RAD |
) | const |
Gets the rotation in x direction.
| at | The measurement of the angle returned. |
| double Rotation::X | ( | Angle_Type | at = ANG_RAD |
) | const |
Gets the rotation in x direction.
| at | The measurement of the angle returned. |
| double Rotation::getY | ( | Angle_Type | at = ANG_RAD |
) | const |
Gets the rotation in y direction.
| at | The measurement of the angle returned. |
| double Rotation::Y | ( | Angle_Type | at = ANG_RAD |
) | const |
Gets the rotation in y direction.
| at | The measurement of the angle returned. |
| double Rotation::getZ | ( | Angle_Type | at = ANG_RAD |
) | const |
Gets the rotation in z direction.
| at | The measurement of the angle returned. |
| double Rotation::Z | ( | Angle_Type | at = ANG_RAD |
) | const |
Gets the rotation in z direction.
| at | The measurement of the angle returned. |
| void Rotation::get | ( | double & | x, | |
| double & | y, | |||
| double & | z, | |||
| Angle_Type | at = ANG_RAD | |||
| ) | const |
Gets the rotation angles.
| x | The rotation in x direction. | |
| y | The rotation in y direction. | |
| z | The rotation in z direction. | |
| at | The measurement of the angles returned. |
Gets all rotation matrices. It expects all matrices to be initialized to zero.
| mx | The x rotation matrix. | |
| my | The y rotation matrix. | |
| mz | The z rotation matrix. |
Gets all inverted rotation matrices. It expects all matrices to be initialized to zero.
| mx | The inverted x rotation matrix. | |
| my | The inverted y rotation matrix. | |
| mz | The inverted z rotation matrix. |
| void Rotation::incX_by | ( | double | i, | |
| Angle_Type | at = ANG_RAD | |||
| ) |
Increments the x rotation angle by the given value.
| i | Incrementation step. | |
| at | Measurement of the incrementation. |
| void Rotation::incY_by | ( | double | i, | |
| Angle_Type | at = ANG_RAD | |||
| ) |
Increments the y rotation angle by the given value.
| i | Incrementation step. | |
| at | Measurement of the incrementation. |
| void Rotation::incZ_by | ( | double | i, | |
| Angle_Type | at = ANG_RAD | |||
| ) |
Increments the z rotation angle by the given value.
| i | Incrementation step. | |
| at | Measurement of the incrementation. |
| void Rotation::decX_by | ( | double | i, | |
| Angle_Type | at = ANG_RAD | |||
| ) |
Decrements the x rotation angle by the given value.
| i | Decrementation step. | |
| at | Measurement of the decrementation. |
| void Rotation::decY_by | ( | double | i, | |
| Angle_Type | at = ANG_RAD | |||
| ) |
Decrements the y rotation angle by the given value.
| i | Decrementation step. | |
| at | Measurement of the decrementation. |
| void Rotation::decZ_by | ( | double | i, | |
| Angle_Type | at = ANG_RAD | |||
| ) |
Decrements the z rotation angle by the given value.
| i | Decrementation step. | |
| at | Measurement of the decrementation. |
| void Rotation::set_wrap_at_2pi | ( | bool | w = true |
) |
Sets the wrap flag.
When set to true, the rotation angles are guaranteed to be
-2 * pi < x < 2 * pi
| w | True to set the flag, false to clear. |
| bool GVectors::Rotation::get_wrap_at_2PI | ( | ) | const [inline] |
Gets the value of the wrap flag. See also Rotation::set_wrap_at_2pi().
| true | The flag is set. | |
| false. | The flag is not set. |
| void Rotation::set_always_positive | ( | bool | a = true |
) |
Sets the 'always positive' flag.
When set to true, the rotation angles are guaranteed to be
0 =< x < 2 * pi .
| a | True to set the flag, false to clear. |
| bool GVectors::Rotation::get_always_positive | ( | ) | const [inline] |
Gets the value of the 'always positive' flag. See also Rotation::set_always_positive().
| true | The flag is set. | |
| false. | The flag is not set. |
Assignment operator.
| r | A const reference to a Rotation object. |
Shorthand addition operator.
| r | A const reference to a Rotation. |
Shorthand subtraction operator.
| r | A const reference to a Rotation. |
double GVectors::Rotation::rot_x [private] |
This is the angle of rotation in x direction expressed in radians.
double GVectors::Rotation::rot_y [private] |
This is the angle of rotation in y direction expressed in radians.
double GVectors::Rotation::rot_z [private] |
This is the angle of rotation in z direction expressed in radians.
bool GVectors::Rotation::wrap_at_2pi [private] |
When set to true, the angles stored in rot_* are guaranteed to be
-2 * pi < x < 2 * pi
When set to false, angles stored in rot_* can assume any value.
bool GVectors::Rotation::always_positive [private] |
When set to true, the angles stored in rot_* are guaranteed to be
0 =< x < 2 * pi .
When set to false, angles can be stored as negative or positive values.
1.4.7