Quatern Class Reference
[Server]
#include <Quatern.hh>
Detailed Description
A quaternion class.
Public Member Functions | |
Quatern () | |
Default Constructor. | |
Quatern (const double &u, const double &x, const double &y, const double &z) | |
Constructor. | |
Quatern (const Quatern &qt) | |
Copy constructor. | |
~Quatern () | |
Destructor. | |
const Quatern & | operator= (const Quatern &qt) |
Equal operator. | |
void | Invert () |
Invert the quaternion. | |
Quatern | GetInverse () const |
Get the inverse of this quaternion. | |
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. | |
void | SetFromEuler (const Vector3 &vec) |
Set the quaternion from Euler angles. | |
Vector3 | GetAsEuler () |
Return the rotation in Euler angles. | |
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). | |
void | Scale (double scale) |
Scale a Quaternion. | |
Quatern | operator * (const Quatern &qt) const |
Multiplication operator. | |
bool | IsFinite () const |
See if a quatern is finite (e.g., not nan). | |
Public Attributes | |
double | u |
Attributes of the quaternion. | |
double | x |
Attributes of the quaternion. | |
double | y |
Attributes of the quaternion. | |
double | z |
Attributes of the quaternion. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const gazebo::Quatern &q) |
Ostream operator. |
Constructor & Destructor Documentation
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
Member Function Documentation
Quatern GetInverse | ( | ) | const |
Get the inverse of this quaternion.
- Returns:
- Inverse quarenion
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
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] |
The documentation for this class was generated from the following file: