public

Inheritance Graph

graph BT
	_DualQuaternion
	click _DualQuaternion "classGeometry_1_1__DualQuaternion"

Description

Class used to represent a rotation and positoin replacement as dual numbers based on quaternions. Currently does not support scaling in any form!

Dual Quaternions allow transformation and deformation of an mesh without artefacts. Such gimbal Lock or texture artefacts caused by false interpolation and / or transformation.

The dual part describes the rotation and the non dualpart the position replacement.

Author: Lukas Kopecki

Date: 2012-08-07

Public Types

   
   
typedef T_ value_t
   
typedef _Vec3 < value_t > vec3_t

Public Functions

   
   
  _DualQuaternion()
   
  _DualQuaternion( value_t _rx, value_t _ry, value_t _rz, value_t _rw, value_t _tx, value_t _ty, value_t _tz, value_t _tw)
   
  _DualQuaternion(const Quaternion & rotation, const vec3_t & translation)
   
  _DualQuaternion(const Quaternion & rotation, const Quaternion & translation)
   
  _DualQuaternion(const _DualQuaternion & src)
   
const value_t & rX() const
   
const value_t & rY() const
   
const value_t & rZ() const
   
const value_t & rW() const
   
const value_t & tX() const
   
const value_t & tY() const
   
const value_t & tZ() const
   
const value_t & tW() const
   
void setRX( value_t _rx)
   
void setRY( value_t _ry)
   
void setRZ( value_t _rz)
   
void setRW( value_t _rw)
   
void setTX( value_t _tx)
   
void setTY( value_t _ty)
   
void setTZ( value_t _tz)
   
void setTW( value_t _tw)
   
void setRotation( value_t _x, value_t _y, value_t _z, value_t _w)
   
void setRotation(const Quaternion & _rot)
   
const Quaternion getRotation() const
   
void setTranslation( value_t _x, value_t _y, value_t _z, value_t _w)
   
void setTranslation(const Quaternion & _trans)
   
const Quaternion getTranslation() const
   
const vec3_t getTranslationAsVec3() const
   
const _DualQuaternion normalizeRotation() const
   
const _DualQuaternion normalizeTranslation() const
   
const _DualQuaternion normalize() const
   
const value_t dotRotation(const Quaternion & rotation) const
   
const value_t dotTranslation(const Quaternion & translation) const
   
const value_t dot(const _DualQuaternion & dua) const
   
_DualQuaternion conjugate() const
   
void set(const Quaternion & q, const vec3_t & t)
   
void getQuaternionAndVec3( Quaternion & q, vec3_t & t) const
   
const value_t lengthRotation() const
   
const value_t length2Rotation() const
   
const value_t lengthTranslation() const
   
const value_t length2Translation() const
   
const value_t length() const
   
_DualQuaternion & operator=(const _DualQuaternion & src)
   
const _DualQuaternion operator*(const value_t factor) const
   
const _DualQuaternion operator/(const value_t factor) const
   
const _DualQuaternion operator+(const _DualQuaternion & dq) const
   
const _Matrix4x4 < value_t > toMatrix() const
   
void setFromMatrix(const _Matrix4x4 < value_t > & matrix)

Public Static Functions

   
   
_DualQuaternion identity()
   
_DualQuaternion dualQuaternionLinearInterpolation(const _DualQuaternion & dq1, const _DualQuaternion & dq2, const value_t factor, bool takeShortestArc)
   
_DualQuaternion convertFromMatrix(const _Matrix4x4 < value_t > & matrix)

Documentation

typedef
Geometry::_DualQuaternion::value_t

public
 
 
typedef T_ value_t

Defined in Geometry/DualQuaternion.h:36


typedef
Geometry::_DualQuaternion::vec3_t

public
 
 
typedef _Vec3 < value_t > vec3_t

Defined in Geometry/DualQuaternion.h:37


function
Geometry::_DualQuaternion::_DualQuaternion

public inline
   
   
_DualQuaternion( )

Defined in Geometry/DualQuaternion.h:42


function
Geometry::_DualQuaternion::_DualQuaternion

public inline
     
     
_DualQuaternion( value_t _rx,
  value_t _ry,
  value_t _rz,
  value_t _rw,
  value_t _tx,
  value_t _ty,
  value_t _tz,
  value_t _tw
)    

Defined in Geometry/DualQuaternion.h:47


function
Geometry::_DualQuaternion::_DualQuaternion

public inline
     
     
_DualQuaternion( const Quaternion & rotation,
  const vec3_t & translation
)    

Defined in Geometry/DualQuaternion.h:53


function
Geometry::_DualQuaternion::_DualQuaternion

public inline
     
     
_DualQuaternion( const Quaternion & rotation,
  const Quaternion & translation
)    

Defined in Geometry/DualQuaternion.h:57


function
Geometry::_DualQuaternion::_DualQuaternion

public inline
     
     
_DualQuaternion( const _DualQuaternion & src )

Defined in Geometry/DualQuaternion.h:62


function
Geometry::_DualQuaternion::rX

public const inline
   
   
const value_t & rX( ) const

Defined in Geometry/DualQuaternion.h:71


function
Geometry::_DualQuaternion::rY

public const inline
   
   
const value_t & rY( ) const

Defined in Geometry/DualQuaternion.h:75


function
Geometry::_DualQuaternion::rZ

public const inline
   
   
const value_t & rZ( ) const

Defined in Geometry/DualQuaternion.h:79


function
Geometry::_DualQuaternion::rW

public const inline
   
   
const value_t & rW( ) const

Defined in Geometry/DualQuaternion.h:83


function
Geometry::_DualQuaternion::tX

public const inline
   
   
const value_t & tX( ) const

Defined in Geometry/DualQuaternion.h:87


function
Geometry::_DualQuaternion::tY

public const inline
   
   
const value_t & tY( ) const

Defined in Geometry/DualQuaternion.h:91


function
Geometry::_DualQuaternion::tZ

public const inline
   
   
const value_t & tZ( ) const

Defined in Geometry/DualQuaternion.h:95


function
Geometry::_DualQuaternion::tW

public const inline
   
   
const value_t & tW( ) const

Defined in Geometry/DualQuaternion.h:99


function
Geometry::_DualQuaternion::setRX

public inline
     
     
void setRX( value_t _rx )

Defined in Geometry/DualQuaternion.h:103


function
Geometry::_DualQuaternion::setRY

public inline
     
     
void setRY( value_t _ry )

Defined in Geometry/DualQuaternion.h:107


function
Geometry::_DualQuaternion::setRZ

public inline
     
     
void setRZ( value_t _rz )

Defined in Geometry/DualQuaternion.h:111


function
Geometry::_DualQuaternion::setRW

public inline
     
     
void setRW( value_t _rw )

Defined in Geometry/DualQuaternion.h:115


function
Geometry::_DualQuaternion::setTX

public inline
     
     
void setTX( value_t _tx )

Defined in Geometry/DualQuaternion.h:119


function
Geometry::_DualQuaternion::setTY

public inline
     
     
void setTY( value_t _ty )

Defined in Geometry/DualQuaternion.h:123


function
Geometry::_DualQuaternion::setTZ

public inline
     
     
void setTZ( value_t _tz )

Defined in Geometry/DualQuaternion.h:127


function
Geometry::_DualQuaternion::setTW

public inline
     
     
void setTW( value_t _tw )

Defined in Geometry/DualQuaternion.h:131


function
Geometry::_DualQuaternion::setRotation

public inline
     
     
void setRotation( value_t _x,
  value_t _y,
  value_t _z,
  value_t _w
)    

Defined in Geometry/DualQuaternion.h:135


function
Geometry::_DualQuaternion::setRotation

public inline
     
     
void setRotation( const Quaternion & _rot )

Defined in Geometry/DualQuaternion.h:142


function
Geometry::_DualQuaternion::getRotation

public const inline
   
   
const Quaternion getRotation( ) const

Defined in Geometry/DualQuaternion.h:146


function
Geometry::_DualQuaternion::setTranslation

public inline
     
     
void setTranslation( value_t _x,
  value_t _y,
  value_t _z,
  value_t _w
)    

Defined in Geometry/DualQuaternion.h:150


function
Geometry::_DualQuaternion::setTranslation

public inline
     
     
void setTranslation( const Quaternion & _trans )

Defined in Geometry/DualQuaternion.h:157


function
Geometry::_DualQuaternion::getTranslation

public const inline
   
   
const Quaternion getTranslation( ) const

Defined in Geometry/DualQuaternion.h:161


function
Geometry::_DualQuaternion::getTranslationAsVec3

public const inline
   
   
const vec3_t getTranslationAsVec3( ) const

Defined in Geometry/DualQuaternion.h:165


function
Geometry::_DualQuaternion::normalizeRotation

public const inline
   
   
const _DualQuaternion normalizeRotation( ) const

Defined in Geometry/DualQuaternion.h:171


function
Geometry::_DualQuaternion::normalizeTranslation

public const inline
   
   
const _DualQuaternion normalizeTranslation( ) const

Defined in Geometry/DualQuaternion.h:176


function
Geometry::_DualQuaternion::normalize

public const inline
   
   
const _DualQuaternion normalize( ) const

Defined in Geometry/DualQuaternion.h:182


function
Geometry::_DualQuaternion::dotRotation

public const inline
     
     
const value_t dotRotation( const Quaternion & rotation ) const

Defined in Geometry/DualQuaternion.h:186


function
Geometry::_DualQuaternion::dotTranslation

public const inline
     
     
const value_t dotTranslation( const Quaternion & translation ) const

Defined in Geometry/DualQuaternion.h:190


function
Geometry::_DualQuaternion::dot

public const inline
     
     
const value_t dot( const _DualQuaternion & dua ) const

Defined in Geometry/DualQuaternion.h:194


function
Geometry::_DualQuaternion::conjugate

public const inline
   
   
_DualQuaternion conjugate( ) const

Defined in Geometry/DualQuaternion.h:198


function
Geometry::_DualQuaternion::set

public inline
     
     
void set( const Quaternion & q,
  const vec3_t & t
)    

Defined in Geometry/DualQuaternion.h:206


function
Geometry::_DualQuaternion::getQuaternionAndVec3

public const inline
     
     
void getQuaternionAndVec3( Quaternion & q,
  vec3_t & t
) const    

Defined in Geometry/DualQuaternion.h:224


function
Geometry::_DualQuaternion::lengthRotation

public const inline
   
   
const value_t lengthRotation( ) const

[ Basic functions ]

Defined in Geometry/DualQuaternion.h:237


function
Geometry::_DualQuaternion::length2Rotation

public const inline
   
   
const value_t length2Rotation( ) const

Defined in Geometry/DualQuaternion.h:241


function
Geometry::_DualQuaternion::lengthTranslation

public const inline
   
   
const value_t lengthTranslation( ) const

Defined in Geometry/DualQuaternion.h:245


function
Geometry::_DualQuaternion::length2Translation

public const inline
   
   
const value_t length2Translation( ) const

Defined in Geometry/DualQuaternion.h:249


function
Geometry::_DualQuaternion::length

public const inline
   
   
const value_t length( ) const

Defined in Geometry/DualQuaternion.h:253


function
Geometry::_DualQuaternion::operator=

public inline
     
     
_DualQuaternion & operator=( const _DualQuaternion & src )

Defined in Geometry/DualQuaternion.h:258


function
Geometry::_DualQuaternion::operator*

public const inline
     
     
const _DualQuaternion operator*( const value_t factor ) const

Defined in Geometry/DualQuaternion.h:267


function
Geometry::_DualQuaternion::operator/

public const inline
     
     
const _DualQuaternion operator/( const value_t factor ) const

Defined in Geometry/DualQuaternion.h:272


function
Geometry::_DualQuaternion::operator+

public const inline
     
     
const _DualQuaternion operator+( const _DualQuaternion & dq ) const

Defined in Geometry/DualQuaternion.h:276


function
Geometry::_DualQuaternion::toMatrix

public const inline
   
   
const _Matrix4x4 < value_t > toMatrix( ) const

Defined in Geometry/DualQuaternion.h:281


function
Geometry::_DualQuaternion::setFromMatrix

public inline
     
     
void setFromMatrix( const _Matrix4x4 < value_t > & matrix )

Defined in Geometry/DualQuaternion.h:294


function
Geometry::_DualQuaternion::identity

public static inline
   
   
_DualQuaternion identity( )

Defined in Geometry/DualQuaternion.h:304


function
Geometry::_DualQuaternion::dualQuaternionLinearInterpolation

public static inline
     
     
_DualQuaternion dualQuaternionLinearInterpolation( const _DualQuaternion & dq1,
  const _DualQuaternion & dq2,
  const value_t factor,
  bool takeShortestArc
)    

Defined in Geometry/DualQuaternion.h:308


function
Geometry::_DualQuaternion::convertFromMatrix

public static inline
     
     
_DualQuaternion convertFromMatrix( const _Matrix4x4 < value_t > & matrix )

Defined in Geometry/DualQuaternion.h:323