Logo Search packages:      
Sourcecode: blender version File versions  Download package

Quaternion< _Scalar > Class Template Reference

#include <Quaternion.h>

Inheritance diagram for Quaternion< _Scalar >:

RotationBase< Quaternion< _Scalar >, 3 >

List of all members.

Detailed Description

template<typename _Scalar>
class Quaternion< _Scalar >

The quaternion class used to represent 3D orientations and rotations.

_Scalar the scalar type, i.e., the type of the coefficients
This class represents a quaternion $ w+xi+yj+zk $ that is a convenient representation of orientations and rotations of objects in three dimensions. Compared to other representations like Euler angles or 3x3 matrices, quatertions offer the following advantages: The following two typedefs are provided for convenience:
See also:
class AngleAxis, class Transform

Definition at line 61 of file Quaternion.h.

Public Types

typedef AngleAxis< ScalarAngleAxisType
typedef Matrix< Scalar, 4, 1 > Coefficients
typedef Matrix< Scalar, 3, 3 > Matrix3
typedef Matrix< Scalar, Dim, Dim > RotationMatrixType
typedef _Scalar Scalar
typedef Matrix< Scalar, 3, 1 > Vector3

Public Member Functions

Scalar angularDistance (const Quaternion &other) const
template<typename NewScalarType>
< Quaternion, Quaternion
< NewScalarType > >::type 
cast () const
Coefficientscoeffs ()
const Coefficientscoeffs () const
Quaternion conjugate (void) const
Quaternion< _Scalar > & derived ()
const Quaternion< _Scalar > & derived () const
Scalar dot (const Quaternion &other) const
Quaternion inverse (void) const
bool isApprox (const Quaternion &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const
Scalar norm () const
void normalize ()
Quaternion normalized () const
Transform< Scalar, Dim > operator* (const Transform< Scalar, Dim > &t) const
RotationMatrixType operator* (const Scaling< Scalar, Dim > &s) const
Transform< Scalar, Dim > operator* (const Translation< Scalar, Dim > &t) const
template<typename Derived>
Vector3 operator* (const MatrixBase< Derived > &vec) const
Quaternion operator* (const Quaternion &q) const
Quaternionoperator*= (const Quaternion &q)
template<typename Derived>
Quaternionoperator= (const MatrixBase< Derived > &m)
Quaternionoperator= (const AngleAxisType &aa)
Quaternionoperator= (const Quaternion &other)
template<typename OtherScalarType>
 Quaternion (const Quaternion< OtherScalarType > &other)
template<typename Derived>
 Quaternion (const MatrixBase< Derived > &other)
 Quaternion (const AngleAxisType &aa)
 Quaternion (const Quaternion &other)
 Quaternion (Scalar w, Scalar x, Scalar y, Scalar z)
 Quaternion ()
template<typename Derived1, typename Derived2>
QuaternionsetFromTwoVectors (const MatrixBase< Derived1 > &a, const MatrixBase< Derived2 > &b)
QuaternionsetIdentity ()
Quaternion slerp (Scalar t, const Quaternion &other) const
Scalar squaredNorm () const
Matrix3 toRotationMatrix (void) const
Block< Coefficients, 3, 1 > vec ()
const Block< Coefficients, 3, 1 > vec () const
Scalarw ()
Scalar w () const
Scalarx ()
Scalar x () const
Scalary ()
Scalar y () const
Scalarz ()
Scalar z () const

Static Public Member Functions

static Quaternion Identity ()

Protected Attributes

Coefficients m_coeffs

Private Types

typedef RotationBase
< Quaternion< _Scalar >, 3 > 

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

Generated by  Doxygen 1.6.0   Back to index