Sensor Scol plugin
Multi platform sensors for handled devices
Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes
Quaternion Class Reference

Public Member Functions

 Quaternion (float ww, float xx, float yy, float zz)
 
Quaternion operator+ (const Quaternion &rkQ) const
 
Quaternion operator- (const Quaternion &rkQ) const
 
Quaternion operator* (const Quaternion &rkQ) const
 
Vector3d operator* (const Vector3d &v) const
 
Quaternion Inverse () const
 
double getRoll (bool reprojectAxis=true) const
 
double getPitch (bool reprojectAxis=true) const
 
double getYaw (bool reprojectAxis=true) const
 

Static Public Member Functions

static Quaternion FromRotationMatrix (double *m)
 
static Quaternion FromRotationMatrix (Matrix3x3d m)
 

Data Fields

float x
 
float y
 
float z
 
float w
 

Static Public Attributes

static const Quaternion ZERO
 
static const Quaternion IDENTITY
 

Detailed Description

Definition at line 8 of file Quaternion.h.

Constructor & Destructor Documentation

◆ Quaternion() [1/2]

Quaternion ( )
inline

Definition at line 16 of file Quaternion.h.

◆ Quaternion() [2/2]

Quaternion ( float  ww,
float  xx,
float  yy,
float  zz 
)
inline

Definition at line 24 of file Quaternion.h.

Member Function Documentation

◆ FromRotationMatrix() [1/2]

static Quaternion FromRotationMatrix ( double *  m)
inlinestatic

Definition at line 84 of file Quaternion.h.

◆ FromRotationMatrix() [2/2]

static Quaternion FromRotationMatrix ( Matrix3x3d  m)
inlinestatic

Definition at line 130 of file Quaternion.h.

◆ getPitch()

double getPitch ( bool  reprojectAxis = true) const
inline

Calculate the local pitch element of this quaternion

Parameters
reprojectAxisBy default the method returns the 'intuitive' result that is, if you projected the local Z of the quaternion onto the X and Y axes, the angle between them is returned. If set to true though, the result is the actual yaw that will be used to implement the quaternion, which is the shortest possible path to get to the same orientation and may involve less axial rotation. The co-domain of the returned value is from -180 to 180 degrees.

Definition at line 185 of file Quaternion.h.

◆ getRoll()

double getRoll ( bool  reprojectAxis = true) const
inline

Calculate the local roll element of this quaternion.

Parameters
reprojectAxisBy default the method returns the 'intuitive' result that is, if you projected the local Y of the quaternion onto the X and Y axes, the angle between them is returned. If set to false though, the result is the actual yaw that will be used to implement the quaternion, which is the shortest possible path to get to the same orientation and may involve less axial rotation. The co-domain of the returned value is from -180 to 180 degrees.

Definition at line 156 of file Quaternion.h.

◆ getYaw()

double getYaw ( bool  reprojectAxis = true) const
inline

Calculate the local roll element of this quaternion.

Parameters
reprojectAxisBy default the method returns the 'intuitive' result that is, if you projected the local Y of the quaternion onto the X and Y axes, the angle between them is returned. If set to false though, the result is the actual yaw that will be used to implement the quaternion, which is the shortest possible path to get to the same orientation and may involve less axial rotation. The co-domain of the returned value is from -180 to 180 degrees.

Definition at line 213 of file Quaternion.h.

◆ Inverse()

Quaternion Inverse ( ) const
inline

Definition at line 69 of file Quaternion.h.

◆ operator*() [1/2]

Quaternion operator* ( const Quaternion rkQ) const
inline

Definition at line 43 of file Quaternion.h.

◆ operator*() [2/2]

Vector3d operator* ( const Vector3d v) const
inline

Definition at line 57 of file Quaternion.h.

◆ operator+()

Quaternion operator+ ( const Quaternion rkQ) const
inline

Definition at line 33 of file Quaternion.h.

◆ operator-()

Quaternion operator- ( const Quaternion rkQ) const
inline

Definition at line 38 of file Quaternion.h.

Field Documentation

◆ IDENTITY

const Quaternion IDENTITY
static

Definition at line 14 of file Quaternion.h.

◆ w

float w

Definition at line 240 of file Quaternion.h.

◆ x

float x

Definition at line 237 of file Quaternion.h.

◆ y

float y

Definition at line 238 of file Quaternion.h.

◆ z

float z

Definition at line 239 of file Quaternion.h.

◆ ZERO

const Quaternion ZERO
static

Definition at line 13 of file Quaternion.h.


The documentation for this class was generated from the following files: