COSMOS core
1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
|
Classes | |
class | Quaternion |
Functions | |
Quaternion | operator* (const Vectors::Vector &v, const Quaternion &q) |
std::ostream & | operator<< (std::ostream &os, const Quaternion &q) |
Scalar division. More... | |
Quaternion | operator* (double scale, const Quaternion &q) |
Reverse scalar product. More... | |
Quaternion | drotate_between (Vectors::Vector a, Vectors::Vector b) |
Quaternion | irotate_for (Vectors::Vector sourcea, Vectors::Vector sourceb, Vectors::Vector targeta, Vectors::Vector targetb) |
Create irotate quaternion from two orthogonal vectors. More... | |
Quaternion | drotate_around_x (double angle) |
Rotation Quaternion for X axis. More... | |
Quaternion | drotate_around_y (double angle) |
Rotation Quaternion for Y axis. More... | |
Quaternion | drotate_around_z (double angle) |
Rotation Quaternion for Z axis. More... | |
Quaternion | drotate_around (int axis, double angle) |
Rotation Quaternion for indicated axis. More... | |
Quaternion | eye (double scale) |
Quaternion Cosmos::Math::Quaternions::operator* | ( | const Vectors::Vector & | v, |
const Quaternion & | q | ||
) |
std::ostream & Cosmos::Math::Quaternions::operator<< | ( | std::ostream & | os, |
const Quaternion & | q | ||
) |
Scalar division.
Calculate the scalar division with the provided scale.
scale | Scale to divide by. |
Calculate the scalar division with the provided scale inline.
scale | Scale to divide by. |
Quaternion Cosmos::Math::Quaternions::operator* | ( | double | scale, |
const Quaternion & | q | ||
) |
Quaternion Cosmos::Math::Quaternions::drotate_between | ( | Vectors::Vector | a, |
Vectors::Vector | b | ||
) |
compute the quaternion that represents the rotation from vector a to vector b Ref: - http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors
Quaternion Cosmos::Math::Quaternions::irotate_for | ( | Vectors::Vector | sourcea, |
Vectors::Vector | sourceb, | ||
Vectors::Vector | targeta, | ||
Vectors::Vector | targetb | ||
) |
Create irotate quaternion from two orthogonal vectors.
Using two vectors, represented in both the original and target frames, calculate the quaternion that will irotate any vector from the original to the target frame.
sourcea | First vector in source frame |
sourceb | Second vector in source frame |
targeta | First vector in target frame |
targetb | Second vector in target frame |
Quaternion Cosmos::Math::Quaternions::drotate_around_x | ( | double | angle | ) |
Rotation Quaternion for X axis.
Create the ::Quaternion that represents a rotation of the given angle around the X axis.
angle | Angle of rotation in radians |
Quaternion Cosmos::Math::Quaternions::drotate_around_y | ( | double | angle | ) |
Rotation Quaternion for Y axis.
Create the ::Quaternion that represents a rotation of the given angle around the Y axis.
angle | Angle of rotation in radians |
Quaternion Cosmos::Math::Quaternions::drotate_around_z | ( | double | angle | ) |
Rotation Quaternion for Z axis.
Create the ::Quaternion that represents a rotation of the given angle around the Z axis.
angle | Angle of rotation in radians |
Quaternion Cosmos::Math::Quaternions::drotate_around | ( | int | axis, |
double | angle | ||
) |
Rotation Quaternion for indicated axis.
Create the ::Quaternion that represents a rotation of the given angle around the indicated axis.
axis | Axis of rotation: 1=X, 2=Y, 3=Z |
angle | Angle of rotation in radians |
Quaternion Cosmos::Math::Quaternions::eye | ( | double | scale | ) |