GEL  2
GEL is a library for Geometry and Linear Algebra
Public Member Functions | Public Attributes
CGLA::ArithQuat< T, V, Q > Class Template Reference

A T based Quaterinion class. More...

#include <ArithQuat.h>

List of all members.

Public Member Functions

 ArithQuat ()
 Construct undefined quaternion.
 ArithQuat (const V &imaginary, T real=1.0f)
 Construct quaternion from vector and scalar.
 ArithQuat (T x, T y, T z, T _qw)
 Construct quaternion from four scalars.
void set (const V &imaginary, T real=1.0f)
 Assign values to a quaternion.
void set (T x, T y, T z, T _qw)
void get (T &x, T &y, T &z, T &_qw) const
 Get values from a quaternion.
get_imaginary_part () const
 Get imaginary part of a quaternion.
get_real_part () const
 Get real part of a quaternion.
void get_rot (T &angle, V &v)
 Obtain angle of rotation and axis.
void make_rot (T angle, const V &v)
 Construct a Quaternion from an angle and axis of rotation.
void make_rot (const V &s, const V &t)
template<class VT , class MT , unsigned int ROWS>
void make_rot (ArithSqMatFloat< VT, MT, ROWS > &m)
 Construct a Quaternion from a rotation matrix.
bool operator== (const ArithQuat< T, V, Q > &q) const
bool operator!= (const ArithQuat< T, V, Q > &q) const
operator* (const ArithQuat< T, V, Q > &q) const
 Multiply two quaternions. (Combine their rotation)
operator* (T scalar) const
 Multiply scalar onto quaternion.
operator+ (const ArithQuat< T, V, Q > &q) const
 Add two quaternions.
operator- () const
 Compute the additive inverse of the quaternion.
norm () const
 Compute norm of quaternion.
conjugate () const
 Return conjugate quaternion.
inverse () const
 Compute the multiplicative inverse of the quaternion.
normalize ()
 Normalize quaternion.
apply (const V &vec) const
 Rotate vector according to quaternion.
apply_unit (const V &vec) const
 Rotate vector according to unit quaternion.

Public Attributes

qv
 Vector part of quaternion.
qw
 Scalar part of quaternion.

Detailed Description

template<class T, class V, class Q>
class CGLA::ArithQuat< T, V, Q >

A T based Quaterinion class.

Quaternions are algebraic entities useful for rotation.


Member Function Documentation

template<class T, class V, class Q>
void CGLA::ArithQuat< T, V, Q >::make_rot ( const V &  s,
const V &  t 
) [inline]

Construct a Quaternion rotating from the direction given by the first argument to the direction given by the second.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations