Quatern Class Reference
[Server]
#include <Quatern.hh>
Detailed Description
A quaternion classPublic Member Functions | |
Quatern () | |
Quatern (const double &u, const double &x, const double &y, const double &z) | |
Quatern (const Quatern &qt) | |
~Quatern () | |
const Quatern & | operator= (const Quatern &qt) |
void | Invert () |
Quatern | GetInverse () const |
void | SetToIdentity () |
void | Normalize () |
void | SetFromAxis (double x, double y, double z, double a) |
void | SetFromEuler (const Vector3 &vec) |
Vector3 | GetAsEuler () |
double | GetRoll () |
double | GetPitch () |
double | GetYaw () |
Quatern | GetAsAxis () |
void | Scale (double scale) |
Quatern | operator * (const Quatern &qt) const |
bool | IsFinite () const |
Public Attributes | |
double | u |
double | x |
double | y |
double | z |
Friends | |
std::ostream & | operator<< (std::ostream &out, const gazebo::Quatern &q) |
Constructor & Destructor Documentation
Quatern | ( | ) |
Default Constructor
Quatern | ( | const double & | u, | |
const double & | x, | |||
const double & | y, | |||
const double & | z | |||
) |
Constructor
- Parameters:
-
u U param x X param y Y param z Z param
~Quatern | ( | ) |
Destructor
Member Function Documentation
void Invert | ( | ) |
Invert the quaternion
Quatern GetInverse | ( | ) | const |
Get the inverse of this quaternion
- Returns:
- Inverse quarenion
void SetToIdentity | ( | ) |
Set the quatern to the identity
void Normalize | ( | ) |
Normalize the quaternion
void SetFromAxis | ( | double | x, | |
double | y, | |||
double | z, | |||
double | a | |||
) |
Set the quaternion from an axis and angle
- Parameters:
-
x X axis y Y axis z Z axis a Angle in radians
void SetFromEuler | ( | const Vector3 & | vec | ) |
Set the quaternion from Euler angles
- Parameters:
-
vec Euler angle
Vector3 GetAsEuler | ( | ) |
Return the rotation in Euler angles
- Returns:
- This quaternion as an Euler vector
double GetRoll | ( | ) |
Get the Euler roll angle in radians
double GetPitch | ( | ) |
Get the Euler pitch angle in radians
double GetYaw | ( | ) |
Get the Euler yaw angle in radians
Quatern GetAsAxis | ( | ) |
Return rotation as axis and angle (x, y, y, rotation)
- Returns:
- This quaternion as an axis-angle
void Scale | ( | double | scale | ) |
Scale a Quaternion
- Parameters:
-
scale Amount to scale this rotation
Multiplication operator
- Parameters:
-
qt Quatern for multiplication
- Returns:
- This quatern multiplied by the parameter
bool IsFinite | ( | ) | const |
See if a quatern is finite (e.g., not nan)
- Returns:
- True if quatern is finite
Friends And Related Function Documentation
std::ostream& operator<< | ( | std::ostream & | out, | |
const gazebo::Quatern & | q | |||
) | [friend] |
Member Data Documentation
double u |
Attributes of the quaternion
double x |
Attributes of the quaternion
double y |
Attributes of the quaternion
double z |
Attributes of the quaternion
The documentation for this class was generated from the following file: