The Quaternion implements quaternion to perform linear algebra rotations in combination with Matrix3x3, Vector3 and Transform. More...
#include <Quaternion.h>

Public Member Functions | |
| tfScalar | angle (const Quaternion &q) const | 
| Return the half angle between this quaternion and the other.  More... | |
| tfScalar | angleShortestPath (const Quaternion &q) const | 
| Return the angle between this quaternion and the other along the shortest path.  More... | |
| tfScalar | dot (const Quaternion &q) const | 
| Return the dot product between this quaternion and another.  More... | |
| TFSIMD_FORCE_INLINE Quaternion | farthest (const Quaternion &qd) const | 
| tfScalar | getAngle () const | 
| Return the angle [0, 2Pi] of rotation represented by this quaternion.  More... | |
| tfScalar | getAngleShortestPath () const | 
| Return the angle [0, Pi] of rotation represented by this quaternion along the shortest path.  More... | |
| Vector3 | getAxis () const | 
| Return the axis of the rotation represented by this quaternion.  More... | |
| TFSIMD_FORCE_INLINE const tfScalar & | getW () const | 
| Quaternion | inverse () const | 
| Return the inverse of this quaternion.  More... | |
| tfScalar | length () const | 
| Return the length of the quaternion.  More... | |
| tfScalar | length2 () const | 
| Return the length squared of the quaternion.  More... | |
| TFSIMD_FORCE_INLINE Quaternion | nearest (const Quaternion &qd) const | 
| Quaternion & | normalize () | 
| Normalize the quaternion Such that x^2 + y^2 + z^2 +w^2 = 1.  More... | |
| Quaternion | normalized () const | 
| Return a normalized version of this quaternion.  More... | |
| TFSIMD_FORCE_INLINE Quaternion | operator* (const tfScalar &s) const | 
| Return a scaled version of this quaternion.  More... | |
| Quaternion & | operator*= (const tfScalar &s) | 
| Scale this quaternion.  More... | |
| Quaternion & | operator*= (const Quaternion &q) | 
| Multiply this quaternion by q on the right.  More... | |
| TFSIMD_FORCE_INLINE Quaternion | operator+ (const Quaternion &q2) const | 
| Return the sum of this quaternion and the other.  More... | |
| TFSIMD_FORCE_INLINE Quaternion & | operator+= (const Quaternion &q) | 
| Add two quaternions.  More... | |
| TFSIMD_FORCE_INLINE Quaternion | operator- (const Quaternion &q2) const | 
| Return the difference between this quaternion and the other.  More... | |
| TFSIMD_FORCE_INLINE Quaternion | operator- () const | 
| Return the negative of this quaternion This simply negates each element.  More... | |
| Quaternion & | operator-= (const Quaternion &q) | 
| Sutfract out a quaternion.  More... | |
| Quaternion | operator/ (const tfScalar &s) const | 
| Return an inversely scaled versionof this quaternion.  More... | |
| Quaternion & | operator/= (const tfScalar &s) | 
| Inversely scale this quaternion.  More... | |
| Quaternion () | |
| No initialization constructor.  More... | |
| Quaternion (const tfScalar &x, const tfScalar &y, const tfScalar &z, const tfScalar &w) | |
| Constructor from scalars.  More... | |
| Quaternion (const Vector3 &axis, const tfScalar &angle) | |
| Axis angle Constructor.  More... | |
| ROS_DEPRECATED | Quaternion (const tfScalar &yaw, const tfScalar &pitch, const tfScalar &roll) | 
| Constructor from Euler angles.  More... | |
| void | setEuler (const tfScalar &yaw, const tfScalar &pitch, const tfScalar &roll) | 
| Set the quaternion using Euler angles.  More... | |
| ROS_DEPRECATED void | setEulerZYX (const tfScalar &yaw, const tfScalar &pitch, const tfScalar &roll) | 
| Set the quaternion using euler angles.  More... | |
| void | setRotation (const Vector3 &axis, const tfScalar &angle) | 
| Set the rotation using axis angle notation.  More... | |
| void | setRPY (const tfScalar &roll, const tfScalar &pitch, const tfScalar &yaw) | 
| Set the quaternion using fixed axis RPY.  More... | |
| Quaternion | slerp (const Quaternion &q, const tfScalar &t) const | 
| Return the quaternion which is the result of Spherical Linear Interpolation between this and the other quaternion.  More... | |
Static Public Member Functions | |
| static const Quaternion & | getIdentity () | 
The Quaternion implements quaternion to perform linear algebra rotations in combination with Matrix3x3, Vector3 and Transform.
Definition at line 30 of file Quaternion.h.
      
  | 
  inline | 
No initialization constructor.
Definition at line 33 of file Quaternion.h.
      
  | 
  inline | 
Constructor from scalars.
Definition at line 39 of file Quaternion.h.
Axis angle Constructor.
| axis | The axis which the rotation is around | 
| angle | The magnitude of the rotation around the angle (Radians) | 
Definition at line 45 of file Quaternion.h.
      
  | 
  inline | 
Constructor from Euler angles.
| yaw | Angle around Y unless TF_EULER_DEFAULT_ZYX defined then Z | 
| pitch | Angle around X unless TF_EULER_DEFAULT_ZYX defined then Y | 
| roll | Angle around Z unless TF_EULER_DEFAULT_ZYX defined then X | 
Definition at line 53 of file Quaternion.h.
      
  | 
  inline | 
Return the half angle between this quaternion and the other.
| q | The other quaternion | 
Definition at line 213 of file Quaternion.h.
      
  | 
  inline | 
Return the angle between this quaternion and the other along the shortest path.
| q | The other quaternion | 
Definition at line 221 of file Quaternion.h.
      
  | 
  inline | 
Return the dot product between this quaternion and another.
| q | The other quaternion | 
Definition at line 157 of file Quaternion.h.
      
  | 
  inline | 
Definition at line 290 of file Quaternion.h.
      
  | 
  inline | 
Return the angle [0, 2Pi] of rotation represented by this quaternion.
Definition at line 231 of file Quaternion.h.
      
  | 
  inline | 
Return the angle [0, Pi] of rotation represented by this quaternion along the shortest path.
Definition at line 238 of file Quaternion.h.
      
  | 
  inline | 
Return the axis of the rotation represented by this quaternion.
Definition at line 249 of file Quaternion.h.
      
  | 
  inlinestatic | 
Definition at line 342 of file Quaternion.h.
      
  | 
  inline | 
Definition at line 348 of file Quaternion.h.
      
  | 
  inline | 
Return the inverse of this quaternion.
Definition at line 259 of file Quaternion.h.
      
  | 
  inline | 
Return the length of the quaternion.
Definition at line 169 of file Quaternion.h.
      
  | 
  inline | 
Return the length squared of the quaternion.
Definition at line 163 of file Quaternion.h.
      
  | 
  inline | 
Definition at line 301 of file Quaternion.h.
      
  | 
  inline | 
Normalize the quaternion Such that x^2 + y^2 + z^2 +w^2 = 1.
Definition at line 176 of file Quaternion.h.
      
  | 
  inline | 
Return a normalized version of this quaternion.
Definition at line 207 of file Quaternion.h.
      
  | 
  inline | 
Return a scaled version of this quaternion.
| s | The scale factor | 
Definition at line 184 of file Quaternion.h.
      
  | 
  inline | 
Scale this quaternion.
| s | The scalar to scale by | 
Definition at line 138 of file Quaternion.h.
      
  | 
  inline | 
Multiply this quaternion by q on the right.
| q | The other quaternion Equivilant to this = this * q | 
Definition at line 147 of file Quaternion.h.
      
  | 
  inline | 
Return the sum of this quaternion and the other.
| q2 | The other quaternion | 
Definition at line 267 of file Quaternion.h.
      
  | 
  inline | 
Add two quaternions.
| q | The quaternion to add to this one | 
Definition at line 122 of file Quaternion.h.
      
  | 
  inline | 
Return the difference between this quaternion and the other.
| q2 | The other quaternion | 
Definition at line 276 of file Quaternion.h.
      
  | 
  inline | 
Return the negative of this quaternion This simply negates each element.
Definition at line 284 of file Quaternion.h.
      
  | 
  inline | 
Sutfract out a quaternion.
| q | The quaternion to sutfract from this one | 
Definition at line 130 of file Quaternion.h.
      
  | 
  inline | 
Return an inversely scaled versionof this quaternion.
| s | The inverse scale factor | 
Definition at line 192 of file Quaternion.h.
      
  | 
  inline | 
Inversely scale this quaternion.
| s | The scale factor | 
Definition at line 200 of file Quaternion.h.
      
  | 
  inline | 
Set the quaternion using Euler angles.
| yaw | Angle around Y | 
| pitch | Angle around X | 
| roll | Angle around Z | 
Definition at line 76 of file Quaternion.h.
      
  | 
  inline | 
Set the quaternion using euler angles.
| yaw | Angle around Z | 
| pitch | Angle around Y | 
| roll | Angle around X | 
Definition at line 116 of file Quaternion.h.
Set the rotation using axis angle notation.
| axis | The axis around which to rotate | 
| angle | The magnitude of the rotation in Radians | 
Definition at line 64 of file Quaternion.h.
      
  | 
  inline | 
Set the quaternion using fixed axis RPY.
| roll | Angle around X | 
| pitch | Angle around Y | 
| yaw | Angle around Z | 
Definition at line 96 of file Quaternion.h.
      
  | 
  inline | 
Return the quaternion which is the result of Spherical Linear Interpolation between this and the other quaternion.
| q | The other quaternion to interpolate with | 
| t | The ratio between this and q to interpolate. If t = 0 the result is this, if t=1 the result is q. Slerp interpolates assuming constant velocity. | 
Definition at line 316 of file Quaternion.h.