LinearAlgebra
|
An orientation using swing and twist angles in various representations.
T | The implmentation type used for the representation of the angles |
#include <SwingTwist.h>
Public Member Functions | |
SwingTwistOf (DirectionOf< T > swing, AngleOf< T > twist) | |
SwingTwistOf (AngleOf< T > horizontal, AngleOf< T > vertical, AngleOf< T > twist) | |
Quaternion | ToQuaternion () const |
SphericalOf< T > | ToAngleAxis () const |
bool | operator== (const SwingTwistOf< T > d) const |
SphericalOf< T > | operator* (const SphericalOf< T > &vector) const |
Rotate a vector using this rotation. | |
SwingTwistOf< T > | operator* (const SwingTwistOf< T > &rotation) const |
Multiply this rotation with another rotation. | |
SwingTwistOf< T > | operator*= (const SwingTwistOf< T > &rotation) |
void | Normalize () |
Static Public Member Functions | |
static SwingTwistOf< T > | Degrees (float horizontal, float vertical=0, float twist=0) |
static SwingTwistOf< T > | FromQuaternion (Quaternion q) |
static SwingTwistOf< T > | FromAngleAxis (SphericalOf< T > aa) |
static SwingTwistOf< T > | Inverse (SwingTwistOf< T > rotation) |
static SwingTwistOf< T > | AngleAxis (float angle, const DirectionOf< T > &axis) |
Convert an angle/axis representation to a swingt. | |
static AngleOf< T > | Angle (const SwingTwistOf< T > &r1, const SwingTwistOf< T > &r2) |
Public Attributes | |
DirectionOf< T > | swing |
AngleOf< T > | twist |
Static Public Attributes | |
static const SwingTwistOf< T > | identity = SwingTwistOf() |
SphericalOf< T > SwingTwistOf::operator* | ( | const SphericalOf< T > & | vector | ) | const |
Rotate a vector using this rotation.
vector | The vector to rotate |
SwingTwistOf< T > SwingTwistOf::operator* | ( | const SwingTwistOf< T > & | rotation | ) | const |
Multiply this rotation with another rotation.
rotation | The swing/twist rotation to multiply with |
The result will be this rotation rotated according to the give rotation.
|
static |
Convert an angle/axis representation to a swingt.
angle | The angle |
axis | The axis |