Quaternion Class Reference

#include <c4d_quaternion.h>

Detailed Description

Represents a quaternion.
Has methods for conversion to and from a rotation matrix: GetMatrix/ SetMatrix/SetMatrixNorm.

See also
Quaternion

Public Attributes

Float64 w
 
Vector64 v
 

Constructor/Destructor

 Quaternion ()
 
 Quaternion (_DONTCONSTRUCT vv)
 

Get/Set Matrix

Matrix64 GetMatrix (void) const
 
void SetMatrix (const Matrix64 &_m)
 
void SetMatrixNorm (const Matrix64 &m)
 

Set HPB/Axis

void SetHPB (const Vector64 &hpb)
 
void SetAxis (const Vector64 &ax, const Float64 ww)
 

Constructor & Destructor Documentation

◆ Quaternion() [1/2]

Default constructor.

◆ Quaternion() [2/2]

Quaternion ( _DONTCONSTRUCT  vv)
explicit

Default destructor.

Member Function Documentation

◆ GetMatrix()

Matrix64 GetMatrix ( void  ) const

Derives a rotation matrix from the quaternion.

Returns
The rotation matrix.

◆ SetMatrix()

void SetMatrix ( const Matrix64 _m)

Derives quaternion values from a rotation matrix.

Parameters
[in]_mThe rotation matrix.

◆ SetMatrixNorm()

void SetMatrixNorm ( const Matrix64 m)

Derives quaternion values from a normalized rotation matrix.

Parameters
[in]mThe normalized rotation matrix.

◆ SetHPB()

void SetHPB ( const Vector64 hpb)

Derives quaternion values from a HPB rotation.

Parameters
[in]hpbThe HPB rotation.

◆ SetAxis()

void SetAxis ( const Vector64 ax,
const Float64  ww 
)

Sets the quaternion values directly.

Parameters
[in]axThe direction vector.
[in]wwThe rotation angle.

Member Data Documentation

◆ w

The rotation angle.

◆ v

The direction vector.