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.

Quaternion

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)

## ◆ Quaternion() [1/2]

 Quaternion ( )

Default constructor.

## ◆ Quaternion() [2/2]

 Quaternion ( _DONTCONSTRUCT vv )
explicit

Default destructor.

## ◆ 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] _m The rotation matrix.

## ◆ SetMatrixNorm()

 void SetMatrixNorm ( const Matrix64 & m )

Derives quaternion values from a normalized rotation matrix.

Parameters
 [in] m The normalized rotation matrix.

## ◆ SetHPB()

 void SetHPB ( const Vector64 & hpb )

Derives quaternion values from a HPB rotation.

Parameters
 [in] hpb The HPB rotation.

## ◆ SetAxis()

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

Sets the quaternion values directly.

Parameters
 [in] ax The direction vector. [in] ww The rotation angle.

## ◆ w

 Float64 w

The rotation angle.

## ◆ v

 Vector64 v

The direction vector.