Ogre::DualQuaternion Class Reference
[Math]

Implementation of a dual quaternion, i.e. More...

#include <OgreDualQuaternion.h>

List of all members.

Public Member Functions

 DualQuaternion ()
 Default constructor, initializes to identity rotation (aka 0°), and zero translation (0,0,0).
 DualQuaternion (Real fW, Real fX, Real fY, Real fZ, Real fdW, Real fdX, Real fdY, Real fdZ)
 Construct from an explicit list of values.
 DualQuaternion (const Matrix4 &rot)
 Construct a dual quaternion from a transformation matrix.
 DualQuaternion (const Quaternion &q, const Vector3 &trans)
 Construct a dual quaternion from a unit quaternion and a translation vector.
 DualQuaternion (Real *valptr)
 Construct a dual quaternion from 8 manual w/x/y/z/dw/dx/dy/dz values.
Real operator[] (const size_t i) const
 Array accessor operator.
Realoperator[] (const size_t i)
 Array accessor operator.
DualQuaternionoperator= (const DualQuaternion &rkQ)
bool operator== (const DualQuaternion &rhs) const
bool operator!= (const DualQuaternion &rhs) const
Realptr ()
 Pointer accessor for direct copying.
const Realptr () const
 Pointer accessor for direct copying.
void swap (DualQuaternion &other)
 Exchange the contents of this dual quaternion with another.
bool isNaN () const
 Check whether this dual quaternion contains valid values.
void fromRotationTranslation (const Quaternion &q, const Vector3 &trans)
 Construct a dual quaternion from a rotation described by a Quaternion and a translation described by a Vector3.
void toRotationTranslation (Quaternion &q, Vector3 &translation) const
 Convert a dual quaternion into its two components, a Quaternion representing the rotation and a Vector3 representing the translation.
void fromTransformationMatrix (const Matrix4 &kTrans)
 Construct a dual quaternion from a 4x4 transformation matrix.
void toTransformationMatrix (Matrix4 &kTrans) const
 Convert a dual quaternion to a 4x4 transformation matrix.

Public Attributes

Real w
Real x
Real y
Real z
Real dw
Real dx
Real dy
Real dz

Friends

_OgreExport friend std::ostream & operator<< (std::ostream &o, const DualQuaternion &q)
 Function for writing to a stream.

Detailed Description

Implementation of a dual quaternion, i.e.

a rotation around an axis and a translation. This implementation may note be appropriate as a general implementation, but is intended for use with dual quaternion skinning.

Definition at line 47 of file OgreDualQuaternion.h.


Constructor & Destructor Documentation

Ogre::DualQuaternion::DualQuaternion (  ) 

Default constructor, initializes to identity rotation (aka 0°), and zero translation (0,0,0).

Definition at line 51 of file OgreDualQuaternion.h.

Ogre::DualQuaternion::DualQuaternion ( Real  fW,
Real  fX,
Real  fY,
Real  fZ,
Real  fdW,
Real  fdX,
Real  fdY,
Real  fdZ 
)

Construct from an explicit list of values.

Definition at line 57 of file OgreDualQuaternion.h.

Ogre::DualQuaternion::DualQuaternion ( const Matrix4 rot  ) 

Construct a dual quaternion from a transformation matrix.

Definition at line 64 of file OgreDualQuaternion.h.

Ogre::DualQuaternion::DualQuaternion ( const Quaternion q,
const Vector3 trans 
)

Construct a dual quaternion from a unit quaternion and a translation vector.

Definition at line 70 of file OgreDualQuaternion.h.

Ogre::DualQuaternion::DualQuaternion ( Real valptr  ) 

Construct a dual quaternion from 8 manual w/x/y/z/dw/dx/dy/dz values.

Definition at line 76 of file OgreDualQuaternion.h.


Member Function Documentation

void Ogre::DualQuaternion::fromRotationTranslation ( const Quaternion q,
const Vector3 trans 
)

Construct a dual quaternion from a rotation described by a Quaternion and a translation described by a Vector3.

void Ogre::DualQuaternion::fromTransformationMatrix ( const Matrix4 kTrans  ) 

Construct a dual quaternion from a 4x4 transformation matrix.

bool Ogre::DualQuaternion::isNaN (  )  const

Check whether this dual quaternion contains valid values.

Definition at line 148 of file OgreDualQuaternion.h.

References Ogre::Math::isNaN().

bool Ogre::DualQuaternion::operator!= ( const DualQuaternion rhs  )  const

Definition at line 117 of file OgreDualQuaternion.h.

References Ogre::operator==().

DualQuaternion& Ogre::DualQuaternion::operator= ( const DualQuaternion rkQ  ) 

Definition at line 97 of file OgreDualQuaternion.h.

References dw, dx, dy, dz, w, x, y, and z.

bool Ogre::DualQuaternion::operator== ( const DualQuaternion rhs  )  const

Definition at line 111 of file OgreDualQuaternion.h.

References dw, dx, dy, dz, w, x, y, and z.

Real& Ogre::DualQuaternion::operator[] ( const size_t  i  ) 

Array accessor operator.

Definition at line 90 of file OgreDualQuaternion.h.

Real Ogre::DualQuaternion::operator[] ( const size_t  i  )  const

Array accessor operator.

Definition at line 82 of file OgreDualQuaternion.h.

const Real* Ogre::DualQuaternion::ptr (  )  const

Pointer accessor for direct copying.

Definition at line 129 of file OgreDualQuaternion.h.

Real* Ogre::DualQuaternion::ptr (  ) 

Pointer accessor for direct copying.

Definition at line 123 of file OgreDualQuaternion.h.

void Ogre::DualQuaternion::swap ( DualQuaternion other  ) 

Exchange the contents of this dual quaternion with another.

Definition at line 135 of file OgreDualQuaternion.h.

References dw, dx, dy, dz, std::swap(), w, x, y, and z.

void Ogre::DualQuaternion::toRotationTranslation ( Quaternion q,
Vector3 translation 
) const

Convert a dual quaternion into its two components, a Quaternion representing the rotation and a Vector3 representing the translation.

void Ogre::DualQuaternion::toTransformationMatrix ( Matrix4 kTrans  )  const

Convert a dual quaternion to a 4x4 transformation matrix.


Friends And Related Function Documentation

_OgreExport friend std::ostream& operator<< ( std::ostream &  o,
const DualQuaternion q 
) [friend]

Function for writing to a stream.

Outputs "DualQuaternion(w, x, y, z, dw, dx, dy, dz)" with w, x, y, z, dw, dx, dy, dz being the member values of the dual quaternion.

Definition at line 173 of file OgreDualQuaternion.h.


Member Data Documentation

Definition at line 166 of file OgreDualQuaternion.h.

Referenced by operator=(), operator==(), and swap().

Definition at line 166 of file OgreDualQuaternion.h.

Referenced by operator=(), operator==(), and swap().

Definition at line 166 of file OgreDualQuaternion.h.

Referenced by operator=(), operator==(), and swap().

Definition at line 166 of file OgreDualQuaternion.h.

Referenced by operator=(), operator==(), and swap().

Definition at line 166 of file OgreDualQuaternion.h.

Referenced by operator=(), operator==(), and swap().

Definition at line 166 of file OgreDualQuaternion.h.

Referenced by operator=(), operator==(), and swap().

Definition at line 166 of file OgreDualQuaternion.h.

Referenced by operator=(), operator==(), and swap().

Definition at line 166 of file OgreDualQuaternion.h.

Referenced by operator=(), operator==(), and swap().


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

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Fri May 25 23:37:21 2012