#include <quaternion.h>
Operators | |
Quaternion | operator+= (const Quaternion &) |
Quaternion | operator-= (const Quaternion &) |
Quaternion | operator *= (double) |
Quaternion | operator/= (double) |
Quaternion | operator= (const Vector3d &) |
Quaternion | operator~ (const Quaternion &) |
Quaternion | operator+ (const Quaternion &, const Quaternion &) |
Quaternion | operator- (const Quaternion &, const Quaternion &) |
Quaternion | operator * (const Quaternion &, double) |
Quaternion | operator/ (const Quaternion &, double) |
Quaternion | operator * (const Quaternion &, const Quaternion &) |
Quaternion | operator * (const Quaternion &, const Vector3d &) |
Quaternion | operator * (const Vector3d &, const Quaternion &) |
Public Methods | |
Quaternion () | |
Quaternion (double u, double x, double y, double z) | |
Quaternion (const Vector3d &axis, double angle) | |
Initialize a ROTATION quaternion with given paramaters. | |
string | toString (void) |
double | module () |
Vector3d | getAxis (void) |
Quaternion | normalize () |
Quaternion | normalized () |
Rotations | |
Quaternion | rotate (const Vector3d &v) |
Rotate the vector over the quaternion axis and angle. | |
Quaternion | rotate (const Quaternion &q) |
Rotate q over MY axis and angle. | |
Quaternion | rotate (const Vector3d &axis, double angle) |
Rotate ME over axis and angle. | |
Vector3d | toWorld (const Vector3d &v) |
Convert a vector in body coordinates to a vector in world coordinates (with me as base). | |
Vector3d | toBody (const Vector3d &v) |
Convert a vector in world coordinates to a vector in body coordinates (with me as base). | |
Some gets | |
double | U () |
double | X () |
double | Y () |
double | Z () |
Protected Attributes | |
double | u |
double | x |
double | y |
double | z |
|
Definition at line 28 of file quaternion.cc. Referenced by normalized(), and rotate(). |
|
Definition at line 32 of file quaternion.cc. |
|
Initialize a ROTATION quaternion with given paramaters.
Definition at line 39 of file quaternion.cc. References cos(), Vector3d::normalized(), sin(), u, Vector3d::X(), x, Vector3d::Y(), y, Vector3d::Z(), and z. |
|
Definition at line 138 of file quaternion.cc. Referenced by Vector3d::operator=(). |
|
Definition at line 54 of file quaternion.cc. Referenced by normalize(). |
|
Definition at line 59 of file quaternion.h. References module(). Referenced by Cylinder::applyVelocity(), Cylinder::createCylinder(), and Cylinder::Cylinder(). |
|
Definition at line 60 of file quaternion.h. References Quaternion(). |
|
Definition at line 86 of file quaternion.cc. |
|
Definition at line 62 of file quaternion.cc. |
|
Definition at line 74 of file quaternion.cc. |
|
Definition at line 98 of file quaternion.cc. |
|
Definition at line 131 of file quaternion.cc. References u, Vector3d::X(), x, Vector3d::Y(), y, Vector3d::Z(), and z. |
|
Rotate ME over axis and angle.
Definition at line 155 of file quaternion.cc. References log, and Quaternion(). |
|
Rotate q over MY axis and angle. This method rotates the given quaternion over ME. Definition at line 150 of file quaternion.cc. |
|
Rotate the vector over the quaternion axis and angle.
Definition at line 142 of file quaternion.cc. |
|
Convert a vector in world coordinates to a vector in body coordinates (with me as base). Just a rotation vs the conjugate Definition at line 170 of file quaternion.cc. Referenced by Collision::resolveGroundCollision(). |
|
Definition at line 48 of file quaternion.cc. |
|
Convert a vector in body coordinates to a vector in world coordinates (with me as base). Just a rotation Definition at line 163 of file quaternion.cc. Referenced by Cylinder::applyForceOnBody(), Cylinder::applyVelocity(), Cylinder::checkGroundCollision(), Cylinder::Cylinder(), Collision::resolveGroundCollision(), and Cylinder::undoVelocity(). |
|
Definition at line 66 of file quaternion.h. References u. |
|
Definition at line 67 of file quaternion.h. References x. |
|
Definition at line 68 of file quaternion.h. References y. |
|
Definition at line 69 of file quaternion.h. References z. |
|
Definition at line 124 of file quaternion.cc. |
|
Definition at line 117 of file quaternion.cc. |
|
Definition at line 110 of file quaternion.cc. |
|
Definition at line 82 of file quaternion.cc. |
|
Definition at line 58 of file quaternion.cc. |
|
Definition at line 70 of file quaternion.cc. |
|
Definition at line 94 of file quaternion.cc. |
|
Definition at line 106 of file quaternion.cc. |
|
Definition at line 31 of file quaternion.h. Referenced by module(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator~(), Quaternion(), toString(), and U(). |
|
Definition at line 31 of file quaternion.h. Referenced by getAxis(), module(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator~(), Quaternion(), toString(), and X(). |
|
Definition at line 31 of file quaternion.h. Referenced by getAxis(), module(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator~(), Quaternion(), toString(), and Y(). |
|
Definition at line 31 of file quaternion.h. Referenced by getAxis(), module(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator~(), Quaternion(), toString(), and Z(). |