A quaternion class.
More...
#include <Types.hh>
Public Attributes |
| double | w |
| | w data
|
| double | x |
| | x data
|
| double | y |
| | y data
|
| double | z |
| | z data
|
Detailed Description
Constructor & Destructor Documentation
| sdf::Quaternion::Quaternion |
( |
| ) |
|
|
inline |
| sdf::Quaternion::Quaternion |
( |
const Quaternion & |
_q | ) |
|
|
inline |
Copy constructor.
- Parameters
-
| sdf::Quaternion::Quaternion |
( |
const double & |
_roll, |
|
|
const double & |
_pitch, |
|
|
const double & |
_yaw |
|
) |
| |
|
inline |
| sdf::Quaternion::Quaternion |
( |
double |
_w, |
|
|
double |
_x, |
|
|
double |
_y, |
|
|
double |
_z |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
| [in] | _w | W param |
| [in] | _x | X param |
| [in] | _y | Y param |
| [in] | _z | Z param |
Member Function Documentation
| void sdf::Quaternion::Correct |
( |
| ) |
|
|
inline |
| static Quaternion sdf::Quaternion::EulerToQuaternion |
( |
double |
_x, |
|
|
double |
_y, |
|
|
double |
_z |
|
) |
| |
|
inlinestatic |
Convert euler angles to quatern.
- Parameters
-
| [in] | _x | rotation along x |
| [in] | _y | rotation along y |
| [in] | _z | rotation along z |
Convert euler angles to quatern.
- Parameters
-
| [in] | _vec | Vector of Euler angles |
References SetFromEuler().
| Vector3 sdf::Quaternion::GetAsEuler |
( |
| ) |
const |
|
inline |
| void sdf::Quaternion::Normalize |
( |
| ) |
|
|
inline |
Multiplication operator.
- Parameters
-
- Returns
- This quaternion multiplied by the parameter
References w, x, y, and z.
Equal operator.
- Parameters
-
References w, x, y, and z.
| bool sdf::Quaternion::operator== |
( |
const Quaternion & |
_qt | ) |
const |
|
inline |
Equal to operator.
- Parameters
-
- Returns
- True if equal
References GetAsEuler().
| void sdf::Quaternion::SetFromEuler |
( |
const Vector3 & |
_vec | ) |
|
|
inline |
Friends And Related Function Documentation
| std::ostream& operator<< |
( |
std::ostream & |
_out, |
|
|
const Quaternion & |
_q |
|
) |
| |
|
friend |
Stream insertion operator.
- Parameters
-
| [in] | _out | output stream |
| [in] | _q | quaternion to output |
- Returns
- the stream
| std::istream& operator>> |
( |
std::istream & |
_in, |
|
|
Quaternion & |
_q |
|
) |
| |
|
friend |
Stream extraction operator.
- Parameters
-
| [in] | _in | input stream |
| [in] | _q | Quaternion to read values into |
- Returns
- The istream
Member Data Documentation
| double sdf::Quaternion::w |
| double sdf::Quaternion::x |
| double sdf::Quaternion::y |
| double sdf::Quaternion::z |
The documentation for this class was generated from the following file: