Math::Quaternion class reference [Core module]

Declaration

`#include <Goptical/Math/Quaternion>namespace Goptical { namespace Math { class Quaternion; };};`

This class is a member of the Math namespace.

Description

This class describe a quaternion object. Useful for 3d rotations.

Members

Functions

• Quaternion(double x, double y, double z, double w)
• Quaternion(const Vector3 &a, const Vector3 &b)
• double norm() const
• const Quaternion &
• Quaternion operator*(const Quaternion &q) const
• double w() const
• double & w()
• double x() const
• double & x()
• double y() const
• double & y()
• double z() const
• double & z()

Static functions

• static Quaternion angle(const Vector3 &v, double angle)
• static Quaternion angle_rad(const Vector3 &v, double angle)

Members detail

Quaternion()

No documentation available

Quaternion(double x, double y, double z, double w)

Create a Quaternion from its real values

Quaternion(const Vector3 &a, const Vector3 &b)

Create a Quaternion as rotation between two unit vectors

static Quaternion angle(const Vector3 &v, double angle)

Create a Quaternion with given rotation angle along a 3d vector

static Quaternion angle_rad(const Vector3 &v, double angle)

Create a Quaternion with given rotation angle in radian along a 3d vector

const Quaternion & normalize()

Normalize vector length

Quaternion operator*(const Quaternion &q) const

Multiply with an other quaternion

double w() const

Get quaterion w value

double & w()

Get reference to quaterion w value

double x() const

Get quaterion x value

double & x()

Get reference to quaterion x value

double y() const

Get quaterion y value

double & y()

Get reference to quaterion y value

double z() const

Get quaterion z value

double & z()

Get reference to quaterion z value

Valid XHTML 1.0 StrictGenerated by diaxen on Sun Jan 8 00:47:24 2012 using MkDoc