argos::CQuaternion Class Reference

#include <quaternion.h>

Public Member Functions

 CQuaternion ()
 
 CQuaternion (const CQuaternion &c_quaternion)
 
 CQuaternion (Real f_real, Real f_img1, Real f_img2, Real f_img3)
 
 CQuaternion (const CRadians &c_radians, const CVector3 &c_vector3)
 
 CQuaternion (const CVector3 &c_vector1, const CVector3 &c_vector2)
 
Real GetW () const
 
Real GetX () const
 
Real GetY () const
 
Real GetZ () const
 
void SetW (Real f_w)
 
void SetX (Real f_x)
 
void SetY (Real f_y)
 
void SetZ (Real f_z)
 
void Set (Real f_w, Real f_x, Real f_y, Real f_z)
 
CQuaternion Conjugate () const
 
CQuaternion Inverse () const
 
Real Length () const
 
Real SquareLength () const
 
CQuaternionNormalize ()
 
CQuaternionFromAngleAxis (const CRadians &c_angle, const CVector3 &c_vector)
 
void ToAngleAxis (CRadians &c_angle, CVector3 &c_vector) const
 
CQuaternionFromEulerAngles (const CRadians &c_z_angle, const CRadians &c_y_angle, const CRadians &c_x_angle)
 
void ToEulerAngles (CRadians &c_z_angle, CRadians &c_y_angle, CRadians &c_x_angle) const
 
CQuaternionBetweenTwoVectors (const CVector3 &c_vector1, const CVector3 &c_vector2)
 
bool operator== (const CQuaternion &c_quaternion)
 
CQuaternionoperator= (const CQuaternion &c_quaternion)
 
CQuaternionoperator+= (const CQuaternion &c_quaternion)
 
CQuaternionoperator-= (const CQuaternion &c_quaternion)
 
CQuaternionoperator*= (const CQuaternion &c_quaternion)
 
CQuaternion operator+ (const CQuaternion &c_quaternion) const
 
CQuaternion operator- (const CQuaternion &c_quaternion) const
 
CQuaternion operator* (const CQuaternion &c_quaternion) const
 
 operator CRotationMatrix3 () const
 Implict conversion to rotation matrix. More...
 

Detailed Description

Definition at line 15 of file quaternion.h.

Constructor & Destructor Documentation

◆ CQuaternion() [1/5]

argos::CQuaternion::CQuaternion ( )
inline

Definition at line 18 of file quaternion.h.

◆ CQuaternion() [2/5]

argos::CQuaternion::CQuaternion ( const CQuaternion c_quaternion)
inline

Definition at line 25 of file quaternion.h.

◆ CQuaternion() [3/5]

argos::CQuaternion::CQuaternion ( Real  f_real,
Real  f_img1,
Real  f_img2,
Real  f_img3 
)
inline

Definition at line 29 of file quaternion.h.

◆ CQuaternion() [4/5]

argos::CQuaternion::CQuaternion ( const CRadians c_radians,
const CVector3 c_vector3 
)
inline

Definition at line 39 of file quaternion.h.

◆ CQuaternion() [5/5]

argos::CQuaternion::CQuaternion ( const CVector3 c_vector1,
const CVector3 c_vector2 
)
inline

Definition at line 44 of file quaternion.h.

Member Function Documentation

◆ BetweenTwoVectors()

CQuaternion& argos::CQuaternion::BetweenTwoVectors ( const CVector3 c_vector1,
const CVector3 c_vector2 
)
inline

Definition at line 220 of file quaternion.h.

◆ Conjugate()

CQuaternion argos::CQuaternion::Conjugate ( ) const
inline

Definition at line 91 of file quaternion.h.

◆ FromAngleAxis()

CQuaternion& argos::CQuaternion::FromAngleAxis ( const CRadians c_angle,
const CVector3 c_vector 
)
inline

Definition at line 126 of file quaternion.h.

◆ FromEulerAngles()

CQuaternion& argos::CQuaternion::FromEulerAngles ( const CRadians c_z_angle,
const CRadians c_y_angle,
const CRadians c_x_angle 
)
inline

Definition at line 163 of file quaternion.h.

◆ GetW()

Real argos::CQuaternion::GetW ( ) const
inline

Definition at line 49 of file quaternion.h.

◆ GetX()

Real argos::CQuaternion::GetX ( ) const
inline

Definition at line 53 of file quaternion.h.

◆ GetY()

Real argos::CQuaternion::GetY ( ) const
inline

Definition at line 57 of file quaternion.h.

◆ GetZ()

Real argos::CQuaternion::GetZ ( ) const
inline

Definition at line 61 of file quaternion.h.

◆ Inverse()

CQuaternion argos::CQuaternion::Inverse ( ) const
inline

Definition at line 98 of file quaternion.h.

◆ Length()

Real argos::CQuaternion::Length ( ) const
inline

Definition at line 105 of file quaternion.h.

◆ Normalize()

CQuaternion& argos::CQuaternion::Normalize ( )
inline

Definition at line 117 of file quaternion.h.

◆ operator CRotationMatrix3()

argos::CQuaternion::operator CRotationMatrix3 ( ) const
inline

Implict conversion to rotation matrix.

This code is based on the solution used by Bullet

Definition at line 341 of file quaternion.h.

◆ operator*()

CQuaternion argos::CQuaternion::operator* ( const CQuaternion c_quaternion) const
inline

Definition at line 332 of file quaternion.h.

◆ operator*=()

CQuaternion& argos::CQuaternion::operator*= ( const CQuaternion c_quaternion)
inline

Definition at line 295 of file quaternion.h.

◆ operator+()

CQuaternion argos::CQuaternion::operator+ ( const CQuaternion c_quaternion) const
inline

Definition at line 320 of file quaternion.h.

◆ operator+=()

CQuaternion& argos::CQuaternion::operator+= ( const CQuaternion c_quaternion)
inline

Definition at line 279 of file quaternion.h.

◆ operator-()

CQuaternion argos::CQuaternion::operator- ( const CQuaternion c_quaternion) const
inline

Definition at line 326 of file quaternion.h.

◆ operator-=()

CQuaternion& argos::CQuaternion::operator-= ( const CQuaternion c_quaternion)
inline

Definition at line 287 of file quaternion.h.

◆ operator=()

CQuaternion& argos::CQuaternion::operator= ( const CQuaternion c_quaternion)
inline

Definition at line 269 of file quaternion.h.

◆ operator==()

bool argos::CQuaternion::operator== ( const CQuaternion c_quaternion)
inline

Definition at line 262 of file quaternion.h.

◆ Set()

void argos::CQuaternion::Set ( Real  f_w,
Real  f_x,
Real  f_y,
Real  f_z 
)
inline

Definition at line 81 of file quaternion.h.

◆ SetW()

void argos::CQuaternion::SetW ( Real  f_w)
inline

Definition at line 65 of file quaternion.h.

◆ SetX()

void argos::CQuaternion::SetX ( Real  f_x)
inline

Definition at line 69 of file quaternion.h.

◆ SetY()

void argos::CQuaternion::SetY ( Real  f_y)
inline

Definition at line 73 of file quaternion.h.

◆ SetZ()

void argos::CQuaternion::SetZ ( Real  f_z)
inline

Definition at line 77 of file quaternion.h.

◆ SquareLength()

Real argos::CQuaternion::SquareLength ( ) const
inline

Definition at line 109 of file quaternion.h.

◆ ToAngleAxis()

void argos::CQuaternion::ToAngleAxis ( CRadians c_angle,
CVector3 c_vector 
) const
inline

Definition at line 143 of file quaternion.h.

◆ ToEulerAngles()

void argos::CQuaternion::ToEulerAngles ( CRadians c_z_angle,
CRadians c_y_angle,
CRadians c_x_angle 
) const
inline

Definition at line 172 of file quaternion.h.