Assignments Assignments

Public Member Functions | Public Attributes | List of all members
Util::Quaternion Class Reference

`#include <geometry.h>`

Inheritance diagram for Util::Quaternion:

## Public Member Functions
| Quaternion (double r=0, Point3D i=Point3D())
double | dot (const Quaternion &q) const
Quaternion | conjugate (void) const
Quaternion | additiveInverse (void) const
Quaternion | multiplicativeInverse (void) const
Quaternion | operator* (double scale) const
Quaternion | operator+ (const Quaternion &q) const
Quaternion | operator* (const Quaternion &q) const
Public Member Functions inherited from Util::_InnerProductSpace< Quaternion >
double | squareNorm (void) const
double | length (void) const
Quaternion | unit (void) const

## Public Attributes
double | real
Point3D | imag

## Additional Inherited Members
Static Public Member Functions inherited from Util::_InnerProductSpace< Quaternion >
static double | Dot (const Quaternion &e1, const Quaternion &e2)
static double | SquareNorm (const Quaternion &e)
static double | Length (const Quaternion &e)
static double | SquareDistance (const Quaternion &e1, const Quaternion &e2)
static double | Distance (const Quaternion &e1, const Quaternion &e2)

## Detailed Description

This class represents a quaternion

## Constructor & Destructor Documentation

## ◆ Quaternion()

Util::Quaternion::Quaternion | ( | double | r = 0,
|  | Point3D | i = Point3D() )

This constructor generates a quaternion with real value r and imaginary components i.

## Member Function Documentation

## ◆ additiveInverse()

Quaternion Util::Quaternion::additiveInverse | ( | void |  | ) | const

This method returns the negation of a quaternion.

## ◆ conjugate()

Quaternion Util::Quaternion::conjugate | ( | void |  | ) | const

This method returns the complex conjugate of a quaternion

## ◆ dot()

double Util::Quaternion::dot | ( | const Quaternion & | q | ) | const

This method returns the dot product of two quaternions.

## ◆ multiplicativeInverse()

Quaternion Util::Quaternion::multiplicativeInverse | ( | void |  | ) | const

This method returns the reciprocal of a quaternion.

## ◆ operator*() [1/2]

Quaternion Util::Quaternion::operator* | ( | const Quaternion & | q | ) | const

This method returns the product of two quaternions.

## ◆ operator*() [2/2]

Quaternion Util::Quaternion::operator* | ( | double | scale | ) | const

This method returnts the product of a quaternion with a scalar

## ◆ operator+()

Quaternion Util::Quaternion::operator+ | ( | const Quaternion & | q | ) | const

This method returns the sum of two quaternions

## Member Data Documentation

## ◆ imag

Point3D Util::Quaternion::imag

The imaginary components of the quaternion

## ◆ real

double Util::Quaternion::real

The real component of the quaternion

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

- Assignments/Util/geometry.h
- Assignments/Util/geometry.cpp