MercuryDPM
Trunk
|
Implementation of a 3D quaternion (by Vitaliy). More...
#include <Quaternion.h>
Public Member Functions | |
Quaternion () | |
Constructor; sets quaternion value to (1,0,0,0) More... | |
Quaternion (Mdouble q0, Mdouble q1, Mdouble q2, Mdouble q3) | |
Alternative constructor. Sets quaternion value to (q0,q1,q2,q3) More... | |
Quaternion (Vec3D normal) | |
void | setUnity () |
Sets quaternion value to (1,0,0,0) More... | |
bool | isUnity () const |
Checks if the quaternion value is (1,0,0,0) More... | |
Quaternion | operator+ (const Quaternion &a) const |
Adds another quaternion and returns the result. More... | |
Quaternion | operator- (const Quaternion &a) const |
Subtracts another quaternion and returns the result. More... | |
Quaternion | operator* (Mdouble a) const |
Multiplies by a scalar. More... | |
Quaternion | operator/ (Mdouble a) const |
Divides by a scalar. More... | |
Quaternion & | operator+= (const Quaternion &a) |
Adds another quaternion. More... | |
Quaternion & | operator-= (const Quaternion &a) |
Subtracts another quaternion. More... | |
Quaternion & | operator*= (Mdouble a) |
Multiplies *this by a scalar. More... | |
Quaternion & | operator/= (Mdouble a) |
Divides by a scalar. More... | |
void | normalise () |
Makes this Quaternion unit length |q|=1. More... | |
void | setLength (Mdouble length) |
Make this Quaternion a certain length |q|=length. More... | |
Mdouble | getLength () const |
Calculates the length of this Quaternion: \( \sqrt{a\cdot a} \). More... | |
Mdouble | getLengthSquared () const |
Calculates the squared length of this Quaternion: \( a\cdot a \). More... | |
Mdouble | getComponent (int index) const |
Returns the requested component of this Quaternion. More... | |
Quaternion | angularVelocityBodyFixedFrameToAngularDisplacement (Vec3D v) const |
Quaternion | angularDisplacementTimeDerivative (Vec3D v) const |
Converts an angular momentum v=omega into a quaternion rate of change, q(t+dt)-q(t)/dt. More... | |
void | updateAngularDisplacement (Vec3D angularVelocityDt) |
Vec3D | applyCInverse (Quaternion q) const |
Converts quaternion rate of change into an angular momentum omega. More... | |
void | setComponent (int index, double val) |
Sets the requested component of this Quaternion to the requested value. More... | |
bool | isEqualTo (const Quaternion &other, double tol) const |
Checks if the length this Quaternion is equal the length of other with a certain tolerance. More... | |
Vec3D | getEuler () const |
Convert a quaternion to Euler angles. See Wikipedia for details. More... | |
void | setEuler (const Vec3D &e) |
Convert Euler angles to a quaternion. See Wikipedia for details. More... | |
Mdouble | getAngleZ () const |
Converts a quaternion to the rotation angle in the XY plane (for Mercury2D). See Wikipedia for details. More... | |
void | setAngleZ (Mdouble psi) |
Converts the rotation angle in the XY plane into a quaternion (for Mercury2D). See Wikipedia for details. More... | |
MatrixSymmetric3D | rotateInverseInertiaTensor (const MatrixSymmetric3D &invI) const |
Converts the inverse inertia tensor from the reference frame to the lab frame; see See QuaternionsWouter.pdf for details, where this operation is denoted by \(A*I^{-1}*A^T\). More... | |
void | rotateTensor (SmallMatrix< 3, 3 > I) const |
Vec3D | getAxis () const |
Converts the quaternions into a normal vector by rotating the vector x=(1,0,0); see See Wiki for details. More... | |
void | setOrientationViaNormal (Vec3D normal) |
Used to the the normal of an InfiniteWall that has a normal into the x-direction by default. More... | |
void | getRotationMatrix (SmallMatrix< 3, 3 > &A) const |
Retrieves the rotation matrix. More... | |
void | rotate (Vec3D &position) const |
Applies the rotation to a position. More... | |
void | rotate (SmallVector< 3 > &position) const |
Applies the rotation to a position. More... | |
void | rotateBack (Vec3D &position) const |
Applies the inverse rotation to a position. More... | |
Mdouble | getDistance (Vec3D p, Vec3D p0) const |
Calculates the distance from a wall through p0 whose normal is the vector (1,0,0). More... | |
Static Public Member Functions | |
static Mdouble | getDistance (const Quaternion &a, const Quaternion &b) |
Calculates the distance between two Quaternion: \( \sqrt{\left(a-b\right) \cdot \left(a-b\right)} \). More... | |
static Mdouble | getDistanceSquared (const Quaternion &a, const Quaternion &b) |
Calculates the squared distance between two Quaternion: \( \left(a-b\right) \cdot \left(a-b\right) \). More... | |
static Mdouble | getLength (const Quaternion &a) |
Calculates the length of a Quaternion: \( \sqrt{a\cdot a} \). More... | |
static Mdouble | getLengthSquared (const Quaternion &a) |
Calculates the squared length of a Quaternion: \( a\cdot a \). More... | |
static Quaternion | getUnitQuaternion (const Quaternion &a) |
Returns a unit Quaternion based on a. More... | |
Public Attributes | |
Mdouble | q0 |
the zeroth component of the quaternion q = (q0,q1,q2,q3) More... | |
Mdouble | q1 |
the first component of the quaternion q = (q0,q1,q2,q3) More... | |
Mdouble | q2 |
the second component of the quaternion q = (q0,q1,q2,q3) More... | |
Mdouble | q3 |
the third component of the quaternion q = (q0,q1,q2,q3) More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Quaternion &a) |
Adds elements to an output stream. More... | |
std::istream & | operator>> (std::istream &is, Quaternion &a) |
Adds elements to an input stream. More... | |
Quaternion | operator+ (Mdouble a, const Quaternion &b) |
Adds a scalar to a quaternion. More... | |
Quaternion | operator- (Mdouble a, const Quaternion &b) |
Subtracts the elements of a quaternion from a scalar. More... | |
Quaternion | operator- (const Quaternion &a) |
Subtracts a quaternion. More... | |
Quaternion | operator* (Mdouble a, const Quaternion &b) |
Multiplies all elements by a scalar. More... | |
Implementation of a 3D quaternion (by Vitaliy).
Modifications 21:9:2009 - Added the inclusion guards and some include objects
This class contains the 4 components of a quaternion and the standard operators and functions needed for quaternion arithmetic.
A quaternion is a four-dimensional vector q = (q0,q1,q2,q3) that satisfies |q|^2=q0^2+q1^2+q2^2+q3^2=1. It can be used to describe the orientation of an object in space.
The properties (e.g. inertia tensor) of any interactable (particle or wall) in MercuryDPM are described in its reference frame. The quaternion is used to rotate the object into the lab frame (the system geometry). A few examples to help visualising quaternions can be found here .
The unit quaternion, q=(1,0,0,0) denotes the state where the lab frame and the reference frame is identical.
To see how to convert a quaternion to Euler angles or to compare it to a rotation of an object around a axis, see Wikipedia for details.
Definition at line 62 of file Quaternion.h.
Quaternion::Quaternion | ( | ) |
Constructor; sets quaternion value to (1,0,0,0)
Default constructor
Definition at line 30 of file Quaternion.cc.
References setUnity().
Referenced by angularDisplacementTimeDerivative(), angularVelocityBodyFixedFrameToAngularDisplacement(), getUnitQuaternion(), operator*(), operator+(), operator-(), operator/(), and setOrientationViaNormal().
Alternative constructor. Sets quaternion value to (q0,q1,q2,q3)
Alternative constructor, lets you define all four elements.
[in] | q0 | the q0-component |
[in] | q1 | the q1-component |
[in] | q2 | the q2-component |
[in] | q3 | the q3-component |
Definition at line 42 of file Quaternion.cc.
References q0, q1, q2, and q3.
|
inline |
normal |
Definition at line 97 of file Quaternion.h.
References setOrientationViaNormal().
Quaternion Quaternion::angularDisplacementTimeDerivative | ( | Vec3D | v | ) | const |
Converts an angular momentum v=omega into a quaternion rate of change, q(t+dt)-q(t)/dt.
Given v = * dt, with omega the angular velocity, this computes the change in angular displacement to be added in the time integration.
This is equivalent to applying the matrix {C}
Definition at line 422 of file Quaternion.cc.
References q0, q1, q2, q3, Quaternion(), Vec3D::X, Vec3D::Y, and Vec3D::Z.
Referenced by updateAngularDisplacement().
Quaternion Quaternion::angularVelocityBodyFixedFrameToAngularDisplacement | ( | Vec3D | v | ) | const |
Definition at line 411 of file Quaternion.cc.
References q0, q1, q2, q3, Quaternion(), Vec3D::X, Vec3D::Y, and Vec3D::Z.
Vec3D Quaternion::applyCInverse | ( | Quaternion | q | ) | const |
Converts quaternion rate of change into an angular momentum omega.
Definition at line 441 of file Quaternion.cc.
References q0, q1, q2, and q3.
Mdouble Quaternion::getAngleZ | ( | ) | const |
Converts a quaternion to the rotation angle in the XY plane (for Mercury2D). See Wikipedia for details.
Definition at line 487 of file Quaternion.cc.
References q0, q1, q2, and q3.
Vec3D Quaternion::getAxis | ( | ) | const |
Converts the quaternions into a normal vector by rotating the vector x=(1,0,0); see See Wiki for details.
Definition at line 501 of file Quaternion.cc.
References q0, q1, q2, and q3.
Referenced by HorizontalBaseScrew::convertLimits(), InfiniteWall::createVTK(), HorizontalBaseScrew::getDistanceAndNormal(), InfiniteWall::getDistanceAndNormal(), AxisymmetricIntersectionOfWalls::getDistanceAndNormal(), InfiniteWall::getDistanceNormalOverlapSuperquadric(), InfiniteWall::getNormal(), CGFields::OrientationField::setFields(), AngledPeriodicBoundary::shiftPosition(), and HorizontalBaseScrew::writeVTK().
Mdouble Quaternion::getComponent | ( | int | index | ) | const |
Returns the requested component of this Quaternion.
returns the quaternion element belonging to the given index.
[in] | index | the index of interest (should be 0, 1 or 2) |
Definition at line 232 of file Quaternion.cc.
References ERROR, logger, q0, q1, q2, and q3.
Referenced by mathsFunc::isEqual().
|
static |
Calculates the distance between two Quaternion: \( \sqrt{\left(a-b\right) \cdot \left(a-b\right)} \).
Calculates the distance (i.e. the length of the difference) between two quaternions NB: this is a STATIC function!
[in] | a | the first quaternion |
[in] | b | the second quaternion |
Definition at line 188 of file Quaternion.cc.
References getDistanceSquared().
Referenced by InfiniteWall::getDistance(), and isEqualTo().
Calculates the distance from a wall through p0 whose normal is the vector (1,0,0).
Used for the calculation of the distance in InfiniteWalls
Definition at line 615 of file Quaternion.cc.
References q0, q1, q2, q3, Vec3D::X, Vec3D::Y, and Vec3D::Z.
|
static |
Calculates the squared distance between two Quaternion: \( \left(a-b\right) \cdot \left(a-b\right) \).
Calculates the square of the distance (i.e. the length of the difference) between two quaternions. NB: this is a STATIC function!
[in] | a | the first quaternion |
[in] | b | the second quaternion |
Definition at line 201 of file Quaternion.cc.
References q0, q1, q2, and q3.
Referenced by getDistance().
Vec3D Quaternion::getEuler | ( | ) | const |
Convert a quaternion to Euler angles. See Wikipedia for details.
Get the Euler angles of this quaternion. Example of visualising Euler angles can be found here
Definition at line 452 of file Quaternion.cc.
References constants::pi, q0, q1, q2, and q3.
|
static |
Calculates the length of a Quaternion: \( \sqrt{a\cdot a} \).
Calculates the length of a given quaternion NB: this is a STATIC function!
[in] | a | quaternion to be measured. |
Definition at line 310 of file Quaternion.cc.
References getLength().
Referenced by getLength().
Mdouble Quaternion::getLength | ( | ) | const |
Calculates the length of this Quaternion: \( \sqrt{a\cdot a} \).
Calculates the length of this quaternion
Definition at line 299 of file Quaternion.cc.
References getLengthSquared().
Referenced by setLength().
|
static |
Calculates the squared length of a Quaternion: \( a\cdot a \).
Calculates the square of the length of a given quaternion. NB: this is a STATIC function!
[in] | a | the quaternion. |
Definition at line 213 of file Quaternion.cc.
References q0, q1, q2, and q3.
Referenced by getUnitQuaternion().
Mdouble Quaternion::getLengthSquared | ( | ) | const |
Calculates the squared length of this Quaternion: \( a\cdot a \).
Calculates the square of the length of itself
Definition at line 222 of file Quaternion.cc.
References q0, q1, q2, and q3.
Referenced by getLength(), and normalise().
void Quaternion::getRotationMatrix | ( | SmallMatrix< 3, 3 > & | A | ) | const |
Retrieves the rotation matrix.
[out] | A | The rotation matrix |
Definition at line 508 of file Quaternion.cc.
References A, q0, q1, q2, and q3.
Referenced by SuperQuadricParticle::computeHessianLabFixed(), rotate(), and rotateTensor().
|
static |
Returns a unit Quaternion based on a.
Calculates the unit quaternion of a given quaternion (unless it is a quaternion with zero length; in that case it returns a 3D quaternion with each element equal to zero). NB: this is a STATIC function!
[in] | a | the quaternion of interest |
Definition at line 324 of file Quaternion.cc.
References getLengthSquared(), and Quaternion().
bool Quaternion::isEqualTo | ( | const Quaternion & | other, |
double | tol | ||
) | const |
Checks if the length this Quaternion is equal the length of other with a certain tolerance.
Checks if the length of the quaternion is equal to the one given in the first argument (other), with a tolerance given in the second argument (tol).
[in] | other | the 3D quaternion to check against |
[in] | tol | the tolerance |
Definition at line 290 of file Quaternion.cc.
References getDistance().
|
inline |
Checks if the quaternion value is (1,0,0,0)
Checks if ALL elements are zero
Definition at line 113 of file Quaternion.h.
References q0, q1, q2, and q3.
void Quaternion::normalise | ( | ) |
Makes this Quaternion unit length |q|=1.
Normalises the quaternion, i.e. divides all elements by the quaternions length (resulting in a quaternion in the same direction, but with unit length).
Definition at line 161 of file Quaternion.cc.
References ERROR, getLengthSquared(), and logger.
Referenced by setOrientationViaNormal(), and updateAngularDisplacement().
Quaternion Quaternion::operator* | ( | Mdouble | a | ) | const |
Multiplies by a scalar.
Multiplies each element with a scalar
[in] | a | the scalar to be multiplied with |
Definition at line 86 of file Quaternion.cc.
References q0, q1, q2, q3, and Quaternion().
Quaternion & Quaternion::operator*= | ( | Mdouble | a | ) |
Multiplies *this by a scalar.
Multiplies each element by a scalar
[in] | a | scalar to be multiplied by |
Definition at line 134 of file Quaternion.cc.
References q0, q1, q2, and q3.
Quaternion Quaternion::operator+ | ( | const Quaternion & | a | ) | const |
Adds another quaternion and returns the result.
Adds quaternion to itself
[in] | a | quaternion to be added |
Definition at line 66 of file Quaternion.cc.
References q0, q1, q2, q3, and Quaternion().
Quaternion & Quaternion::operator+= | ( | const Quaternion & | a | ) |
Adds another quaternion.
Adds a quaternion to itself
[in] | a | quaternion to be added |
Definition at line 106 of file Quaternion.cc.
References q0, q1, q2, and q3.
Quaternion Quaternion::operator- | ( | const Quaternion & | a | ) | const |
Subtracts another quaternion and returns the result.
Subtracts quaternion from itself
[in] | a | quaternion to be subtracted |
Definition at line 76 of file Quaternion.cc.
References q0, q1, q2, q3, and Quaternion().
Quaternion & Quaternion::operator-= | ( | const Quaternion & | a | ) |
Subtracts another quaternion.
Subtracts a quaternion from itself
[in] | a | quaternion to be subtracted |
Definition at line 120 of file Quaternion.cc.
References q0, q1, q2, and q3.
Quaternion Quaternion::operator/ | ( | Mdouble | a | ) | const |
Divides by a scalar.
Divides each element by a scalar
[in] | a | the scalar to be divided by |
Definition at line 96 of file Quaternion.cc.
References q0, q1, q2, q3, and Quaternion().
Quaternion & Quaternion::operator/= | ( | Mdouble | a | ) |
Divides by a scalar.
Divides each element by a scalar
[in] | a | scalar to be divided by |
Definition at line 148 of file Quaternion.cc.
References q0, q1, q2, and q3.
void Quaternion::rotate | ( | Vec3D & | position | ) | const |
Applies the rotation to a position.
Definition at line 563 of file Quaternion.cc.
References q0, q1, q2, and q3.
Referenced by SuperQuadricParticle::computeShapeGradientLabFixed(), HorizontalBaseScrew::convertLimits(), NurbsWall::getDistanceAndNormal(), Screw::getDistanceAndNormal(), BasicIntersectionOfWalls::getDistanceAndNormal(), BasicUnionOfWalls::getDistanceAndNormal(), LevelSetWall::getDistanceAndNormal(), IntersectionOfWalls::getDistanceAndNormal(), InfiniteWall::getDistanceNormalOverlapSuperquadric(), BaseWall::getInteractionWith(), BasicIntersectionOfWalls::getVTK(), BasicUnionOfWalls::getVTK(), TriangleWall::updateVertexAndNormal(), MeshTriangle::updateVertexAndNormal(), NurbsWall::writeVTK(), LevelSetWall::writeVTK(), Screw::writeVTK(), AxisymmetricIntersectionOfWalls::writeVTK(), ScrewsymmetricIntersectionOfWalls::writeVTK(), and IntersectionOfWalls::writeVTK().
void Quaternion::rotate | ( | SmallVector< 3 > & | position | ) | const |
Applies the rotation to a position.
Rotate the given vector from the body-fixed angles to the lab-fixed angles.
This is the same as multiplying with the rotation matrix, A.
Definition at line 583 of file Quaternion.cc.
References A, and getRotationMatrix().
void Quaternion::rotateBack | ( | Vec3D & | position | ) | const |
Applies the inverse rotation to a position.
Rotate the given vector from the lab-fixed angles to the body-fixed angles.
This is the same as multiplying with the inverse/transpose of the rotation matrix, A^T = A^{-1}.
Definition at line 592 of file Quaternion.cc.
References q0, q1, q2, and q3.
Referenced by SuperQuadricParticle::computeHessianLabFixed(), SuperQuadricParticle::computeShape(), SuperQuadricParticle::computeShapeGradientLabFixed(), AxisymmetricIntersectionOfWalls::convertLimits(), ScrewsymmetricIntersectionOfWalls::convertLimits(), NurbsWall::getDistanceAndNormal(), Screw::getDistanceAndNormal(), BasicIntersectionOfWalls::getDistanceAndNormal(), BasicUnionOfWalls::getDistanceAndNormal(), LevelSetWall::getDistanceAndNormal(), IntersectionOfWalls::getDistanceAndNormal(), InfiniteWall::getDistanceNormalOverlapSuperquadric(), and BaseWall::getInteractionWith().
MatrixSymmetric3D Quaternion::rotateInverseInertiaTensor | ( | const MatrixSymmetric3D & | invI | ) | const |
Converts the inverse inertia tensor from the reference frame to the lab frame; see See QuaternionsWouter.pdf for details, where this operation is denoted by \(A*I^{-1}*A^T\).
Definition at line 626 of file Quaternion.cc.
References constants::i, q0, q1, q2, q3, MatrixSymmetric3D::XX, MatrixSymmetric3D::XY, MatrixSymmetric3D::XZ, MatrixSymmetric3D::YY, MatrixSymmetric3D::YZ, and MatrixSymmetric3D::ZZ.
void Quaternion::rotateTensor | ( | SmallMatrix< 3, 3 > | I | ) | const |
Definition at line 654 of file Quaternion.cc.
References A, getRotationMatrix(), and SmallMatrix< numberOfRows, numberOfColumns >::transpose().
void Quaternion::setAngleZ | ( | Mdouble | psi | ) |
Converts the rotation angle in the XY plane into a quaternion (for Mercury2D). See Wikipedia for details.
Definition at line 492 of file Quaternion.cc.
References mathsFunc::cos(), q0, q1, q2, q3, and mathsFunc::sin().
Referenced by DPMBase::readNextDataFile().
void Quaternion::setComponent | ( | int | index, |
double | val | ||
) |
Sets the requested component of this Quaternion to the requested value.
Sets the element of the quaternion belonging to the first argument (index) to the value given in the second argument (val).
[in] | index | index of element of interest, |
[in] | val | value to be set |
Definition at line 258 of file Quaternion.cc.
References ERROR, logger, q0, q1, q2, and q3.
void Quaternion::setEuler | ( | const Vec3D & | e | ) |
Convert Euler angles to a quaternion. See Wikipedia for details.
Definition at line 473 of file Quaternion.cc.
References mathsFunc::cos(), q0, q1, q2, q3, mathsFunc::sin(), Vec3D::X, Vec3D::Y, and Vec3D::Z.
Referenced by BaseParticle::oldRead(), DPMBase::readNextDataFile(), and BaseInteractable::setOrientationViaEuler().
void Quaternion::setLength | ( | Mdouble | length | ) |
Make this Quaternion a certain length |q|=length.
Sets the length of the quaternion to a given scalar (while maintaining the direction).
[in] | length | the length to be set |
Definition at line 176 of file Quaternion.cc.
References getLength().
void Quaternion::setOrientationViaNormal | ( | Vec3D | normal | ) |
Used to the the normal of an InfiniteWall that has a normal into the x-direction by default.
Defines one possible orientation that rotates the x-axis into the direction given by normal.
This can be changed by resetting the wall orientation; thus the normal is the vector (1,0,0) rotated by this quaternion.
[in] | normal | the vector that the x-axis is rotated into. |
Definition at line 536 of file Quaternion.cc.
References normalise(), Vec3D::normalise(), q0, q1, q2, q3, Quaternion(), Vec3D::X, Vec3D::Y, and Vec3D::Z.
Referenced by Quaternion(), and BaseInteractable::setOrientationViaNormal().
void Quaternion::setUnity | ( | ) |
Sets quaternion value to (1,0,0,0)
Sets q0 to 1, and all other elements to zero.
Definition at line 53 of file Quaternion.cc.
References q0, q1, q2, and q3.
Referenced by BaseInteractable::BaseInteractable(), and Quaternion().
void Quaternion::updateAngularDisplacement | ( | Vec3D | angularVelocityDt | ) |
Definition at line 431 of file Quaternion.cc.
References angularDisplacementTimeDerivative(), and normalise().
Referenced by BaseInteractable::rotate().
|
friend |
Multiplies all elements by a scalar.
Multiplies each element of a given quaternion (b) by a given scalar (a). NB: this is a global function and a friend of the Quaternion class. Gets called when a scalar multiplication of the form (Mdouble) * (Quaternion) is performed.
[in] | a | the scalar |
[in] | b | the quaternion |
Definition at line 405 of file Quaternion.cc.
|
friend |
Adds a scalar to a quaternion.
Adds a scalar to the elements of given quaternion NB this is a global function and a friend of the Quaternion class. Gets called when addition operation of the form (Mdouble) + (Quaternion) is performed.
[in] | a | the scalar to be added |
[in] | b | the quaternion the scalar gets added to. |
Definition at line 367 of file Quaternion.cc.
|
friend |
Subtracts the elements of a quaternion from a scalar.
Subtracts each element of a given quaternion from a scalar NB this is a global function and a friend of the Quaternion class. Gets called when subtraction operation of the form (Mdouble) - (Quaternion) is performed.
[in] | a | the scalar |
[in] | b | the quaternion to be subtracted the scalar gets subtracted from. |
Definition at line 380 of file Quaternion.cc.
|
friend |
Subtracts a quaternion.
Returns the negative of a given quaternion. NB: this is a global function and a friend of the Quaternion class. Gets called when a negation operation of the form - (Quaternion) is performed.
[in] | a | the quaternion to be negated |
Definition at line 392 of file Quaternion.cc.
|
friend |
Adds elements to an output stream.
Adds all elements of the quaternion to an output stream. NB: this is a global function and a friend of the Quaternion class!
[in] | os | the output stream, |
[in] | a | The quaternion of interest |
Definition at line 340 of file Quaternion.cc.
|
friend |
Adds elements to an input stream.
Reads all elements of a given quaternion from an input stream. NB: this is a global function and a friend of the Quaternion class!
[in,out] | is | the input stream |
[in,out] | a | the quaternion to be read in |
Definition at line 353 of file Quaternion.cc.
Mdouble Quaternion::q0 |
the zeroth component of the quaternion q = (q0,q1,q2,q3)
Definition at line 69 of file Quaternion.h.
Referenced by angularDisplacementTimeDerivative(), angularVelocityBodyFixedFrameToAngularDisplacement(), applyCInverse(), getAngleZ(), getAxis(), getComponent(), getDistance(), getDistanceSquared(), getEuler(), getLengthSquared(), getRotationMatrix(), isUnity(), operator*(), operator*(), operator*=(), operator+(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), Quaternion(), rotate(), rotateBack(), rotateInverseInertiaTensor(), setAngleZ(), setComponent(), setEuler(), setOrientationViaNormal(), and setUnity().
Mdouble Quaternion::q1 |
the first component of the quaternion q = (q0,q1,q2,q3)
Definition at line 73 of file Quaternion.h.
Referenced by angularDisplacementTimeDerivative(), angularVelocityBodyFixedFrameToAngularDisplacement(), applyCInverse(), getAngleZ(), BaseWall::getAxis(), getAxis(), getComponent(), getDistance(), getDistanceSquared(), getEuler(), getLengthSquared(), getRotationMatrix(), isUnity(), operator*(), operator*(), operator*=(), operator+(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), Quaternion(), rotate(), rotateBack(), rotateInverseInertiaTensor(), setAngleZ(), setComponent(), setEuler(), setOrientationViaNormal(), and setUnity().
Mdouble Quaternion::q2 |
the second component of the quaternion q = (q0,q1,q2,q3)
Definition at line 77 of file Quaternion.h.
Referenced by angularDisplacementTimeDerivative(), angularVelocityBodyFixedFrameToAngularDisplacement(), applyCInverse(), getAngleZ(), BaseWall::getAxis(), getAxis(), getComponent(), getDistance(), getDistanceSquared(), getEuler(), getLengthSquared(), getRotationMatrix(), isUnity(), operator*(), operator*(), operator*=(), operator+(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), Quaternion(), rotate(), rotateBack(), rotateInverseInertiaTensor(), setAngleZ(), setComponent(), setEuler(), setOrientationViaNormal(), and setUnity().
Mdouble Quaternion::q3 |
the third component of the quaternion q = (q0,q1,q2,q3)
Definition at line 81 of file Quaternion.h.
Referenced by angularDisplacementTimeDerivative(), angularVelocityBodyFixedFrameToAngularDisplacement(), applyCInverse(), getAngleZ(), BaseWall::getAxis(), getAxis(), getComponent(), getDistance(), getDistanceSquared(), getEuler(), getLengthSquared(), getRotationMatrix(), isUnity(), operator*(), operator*(), operator*=(), operator+(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator>>(), Quaternion(), rotate(), rotateBack(), rotateInverseInertiaTensor(), setAngleZ(), setComponent(), setEuler(), setOrientationViaNormal(), and setUnity().