# Quatd Class Reference

## Detailed Description

Quaternion class with double elements. Inheritance diagram for Quatd:

## Public Member Functions

Binary operators
Quat operator* (const Quat &q) const

Quat operator* (double f) const

Quat operator- (const Quat &q) const

Quat operator+ (const Quat &q) const

Set & Get value functions
void Zero ()

void Reset ()

void Set (double _s, const Point3< double > &_v)

void Set (double _s, double _x, double _y, double _z)

void Set (double *array)

void SetRotation (double angle, const Point3< double > &axis)

void SetRotation (double angle, double axisX, double axisY, double axisZ)

void GetValue (double *array)

double GetRotationAngle ()

Point3< double > GetRotationAxis ()

Length and Normalize functions
void Normalize ()

Quat GetNormalized () const

double LengthSquared () const

double Length () const

Matrix conversion functions
void ToMatrix3 (Matrix3< double > &m) const

Matrix3< double > ToMatrix3 () const

void ToMatrix4 (Matrix4< double > &m) const

Matrix4< double > ToMatrix4 () const

Unary operators
Quat operator- () const

Assignment operators
Quatoperator*= (const Quat &q)

Quatoperator*= (double f)

Quatoperator+= (const Quat &q)

Quatoperator-= (const Quat &q)

Test operators
int operator== (const Quat &q) const

int operator!= (const Quat &q) const

Vector rotations

Rotates the given vector using the quaternion. Note that the quaternion must be a unit quaternion.

Point3< double > GetRotatedVector (const Point3< double > &p)

void RotateVector (Point3< double > &p)

## Public Attributes

double s

Point3< double > v

## § Zero()

 void Zero ( )
inherited

Sets the scalar part to 1 and vector part to zero vector.

## § Reset()

 void Reset ( )
inherited

Sets the scalar part to 1 and vector part to zero vector.

## § Set() [1/3]

 void Set ( double _s, const Point3< double > & _v )
inherited

Sets the scalar part to 1 and vector part to zero vector.

## § Set() [2/3]

 void Set ( double _s, double _x, double _y, double _z )
inherited

Sets the scalar part to 1 and vector part to zero vector.

## § Set() [3/3]

 void Set ( double * array )
inherited

Sets the scalar part to 1 and vector part to zero vector.

## § SetRotation() [1/2]

 void SetRotation ( double angle, const Point3< double > & axis )
inherited

Sets the scalar part to 1 and vector part to zero vector.

## § SetRotation() [2/2]

 void SetRotation ( double angle, double axisX, double axisY, double axisZ )
inherited

Sets the scalar part to 1 and vector part to zero vector.

## § GetValue()

 void GetValue ( double * array )
inherited

Sets the scalar part to 1 and vector part to zero vector.

## § GetRotationAngle()

 double GetRotationAngle ( )
inherited

Returns rotation angle in radiants.

## § GetRotationAxis()

 Point3 GetRotationAxis ( )
inherited

Sets the scalar part to 1 and vector part to zero vector.

## § s

 double s
inherited

scaler part

## § v

 Point3 v
inherited

vector part