Loading...
Searching...
No Matches
Ogre::DualQuaternion Class Reference
Core » Math

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

`#include <OgreDualQuaternion.h>`

## Public Member Functions

| DualQuaternion ()
| Default constructor, initializes to identity rotation (aka 0°), and zero translation (0,0,0).
| DualQuaternion (const Affine3 &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.
| DualQuaternion (Real fW, Real fX, Real fY, Real fZ, Real fdW, Real fdX, Real fdY, Real fdZ)
| Construct from an explicit list of 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 | fromTransformationMatrix (const Affine3 &kTrans)
| Construct a dual quaternion from a 4x4 transformation matrix.
bool | isNaN () const
| Check whether this dual quaternion contains valid values.
bool | operator!= (const DualQuaternion &rhs) const
DualQuaternion & | operator= (const DualQuaternion &rkQ)
bool | operator== (const DualQuaternion &rhs) const
Real & | operator[] (const size_t i)
| Array accessor operator.
Real | operator[] (const size_t i) const
| Array accessor operator.
Real * | ptr ()
| Pointer accessor for direct copying.
const Real * | ptr () const
| Pointer accessor for direct copying.
void | swap (DualQuaternion &other)
| Exchange the contents of this dual quaternion with another.
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 | toTransformationMatrix (Affine3 &kTrans) const
| Convert a dual quaternion to a 4x4 transformation matrix.

## Public Attributes

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

## 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.

## Constructor & Destructor Documentation

## DualQuaternion() [1/5]

Ogre::DualQuaternion::DualQuaternion | ( |  | ) |

inline

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

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

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

## DualQuaternion() [2/5]

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

inline

Construct from an explicit list of values.

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

## DualQuaternion() [3/5]

Ogre::DualQuaternion::DualQuaternion | ( | const Affine3 & | rot | ) |

inline

Construct a dual quaternion from a transformation matrix.

References fromTransformationMatrix().

## DualQuaternion() [4/5]

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

inline

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

References fromRotationTranslation().

## DualQuaternion() [5/5]

Ogre::DualQuaternion::DualQuaternion | ( | Real * | valptr | ) |

inline

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

References w.

## Member Function Documentation

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

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

inline

Array accessor operator.

References w.

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

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

inline

Array accessor operator.

References w.

## operator=()

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

inline

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

## operator==()

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

inline

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

Referenced by operator!=().

## operator!=()

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

inline

References DualQuaternion(), and operator==().

## ptr() [1/2]

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

inline

Pointer accessor for direct copying.

References w.

## ptr() [2/2]

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

inline

Pointer accessor for direct copying.

References w.

## swap()

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

inline

Exchange the contents of this dual quaternion with another.

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

## isNaN()

bool Ogre::DualQuaternion::isNaN | ( |  | ) | const

inline

Check whether this dual quaternion contains valid values.

References dw, dx, dy, dz, Ogre::Math::isNaN(), w, x, y, and z.

## fromRotationTranslation()

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.

Referenced by DualQuaternion().

## toRotationTranslation()

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.

## fromTransformationMatrix()

void Ogre::DualQuaternion::fromTransformationMatrix | ( | const Affine3 & | kTrans | ) |

Construct a dual quaternion from a 4x4 transformation matrix.

Referenced by DualQuaternion().

## toTransformationMatrix()

void Ogre::DualQuaternion::toTransformationMatrix | ( | Affine3 & | kTrans | ) | const

Convert a dual quaternion to a 4x4 transformation matrix.

## Member Data Documentation

## w

Real Ogre::DualQuaternion::w

Referenced by DualQuaternion(), DualQuaternion(), DualQuaternion(), isNaN(), operator=(), operator==(), operator[](), operator[](), ptr(), ptr(), and swap().

## x

Real Ogre::DualQuaternion::x

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

## y

Real Ogre::DualQuaternion::y

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

## z

Real Ogre::DualQuaternion::z

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

## dw

Real Ogre::DualQuaternion::dw

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

## dx

Real Ogre::DualQuaternion::dx

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

## dy

Real Ogre::DualQuaternion::dy

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

## dz

Real Ogre::DualQuaternion::dz

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

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

- OgreDualQuaternion.h