Developer Documentation
ACG::DualQuaternionT< Scalar > Class Template Reference

DualQuaternion class for representing rigid motions in 3d. More...

#include <OpenFlipper/libs_required/ACG/Math/DualQuaternionT.hh>

Public Types

typedef QuaternionT< Scalar > Quaternion
 
typedef DualQuaternionT< Scalar > DualQuaternion
 
typedef VectorT< Scalar, 3 > Vec3
 
typedef VectorT< Scalar, 4 > Vec4
 
typedef Matrix4x4T< Scalar > Matrix
 

Public Member Functions

 DualQuaternionT ()
 Default constructor ( constructs an identity dual quaternion ) More...
 
 DualQuaternionT (const DualQuaternion &_other)
 Copy constructor. More...
 
DualQuaternionoperator= (const DualQuaternion &_other)
 
 DualQuaternionT (const Quaternion &_real, const Quaternion &_dual)
 Construct from given real,dual parts. More...
 
 DualQuaternionT (Scalar _Rw, Scalar _Rx, Scalar _Ry, Scalar _Rz, Scalar _Dw, Scalar _Dx, Scalar _Dy, Scalar _Dz)
 Construct from 8 scalars. More...
 
 DualQuaternionT (Quaternion _rotation)
 Construct from a rotation given as quaternion. More...
 
 DualQuaternionT (const Vec3 &_translation)
 Construct from a translatation given as a vector. More...
 
 DualQuaternionT (const Vec3 &_translation, const Quaternion &_rotation)
 Construct from a translation+rotation. More...
 
 DualQuaternionT (const Matrix &_transformation)
 Construct from a rigid transformation given as matrix. More...
 
DualQuaternion conjugate () const
 conjugate dual quaternion More...
 
DualQuaternion invert () const
 invert dual quaternion More...
 
void normalize ()
 normalize dual quaternion More...
 
bool operator== (const DualQuaternion &_other) const
 dual quaternion comparison More...
 
bool operator!= (const DualQuaternion &_other) const
 dual quaternion comparison More...
 
DualQuaternion operator+ (const DualQuaternion &_other) const
 addition More...
 
DualQuaternionoperator+= (const DualQuaternion &_other)
 addition More...
 
DualQuaternion operator- (const DualQuaternion &_other) const
 substraction More...
 
DualQuaternionoperator-= (const DualQuaternion &_other)
 substraction More...
 
DualQuaternion operator* (const DualQuaternion &_q) const
 dualQuaternion * dualQuaternion More...
 
DualQuaternion operator* (const Scalar &_scalar) const
 dualQuaternion * scalar More...
 
DualQuaternionoperator*= (const DualQuaternion &_q)
 dualQuaternion *= dualQuaternion More...
 
Scalar & operator[] (const unsigned int &b)
 Access as one big vector. More...
 
Vec3 transform_point (const Vec3 &_point) const
 Transform a point with the dual quaternion. More...
 
Vec3 transform_vector (const Vec3 &_point) const
 Transform a vector with the dual quaternion. More...
 
void printInfo ()
 print some info about the DQ More...
 
template<typename VectorType >
DualQuaternionT< Scalar > interpolate (VectorType &_weights, const std::vector< DualQuaternion > &_dualQuaternions)
 linear interpolation of dual quaternions. Result is normalized afterwards. More...
 

Static Public Member Functions

static DualQuaternion identity ()
 identity dual quaternion [ R(1, 0, 0, 0), D(0,0,0,0) ] More...
 
static DualQuaternion zero ()
 zero dual quaternion [ R(0, 0, 0, 0), D(0,0,0,0) ] More...
 
template<typename VectorType >
static DualQuaternion interpolate (VectorType &_weights, const std::vector< DualQuaternion > &_dualQuaternions)
 linear interpolation of dual quaternions. Result is normalized afterwards
 

Public Attributes

Quaternion real_
 real and dual quaternion parts More...
 
Quaternion dual_
 

Detailed Description

template<class Scalar>
class ACG::DualQuaternionT< Scalar >

DualQuaternion class for representing rigid motions in 3d.

This is an implementation of:

techreport{kavan-06-dual, author = "Ladislav Kavan and Steven Collins and Carol O'Sullivan and Jiri Zara", series = "Technical report TCD-CS-2006-46, Trinity College Dublin", title = "{D}ual {Q}uaternions for {R}igid {T}ransformation {B}lending", url = "http://www.cgg.cvut.cz/~kavanl1/", year = "2006" }

Definition at line 80 of file DualQuaternionT.hh.

Member Typedef Documentation

◆ DualQuaternion

template<class Scalar >
typedef DualQuaternionT<Scalar> ACG::DualQuaternionT< Scalar >::DualQuaternion

Definition at line 85 of file DualQuaternionT.hh.

◆ Matrix

template<class Scalar >
typedef Matrix4x4T<Scalar> ACG::DualQuaternionT< Scalar >::Matrix

Definition at line 88 of file DualQuaternionT.hh.

◆ Quaternion

template<class Scalar >
typedef QuaternionT<Scalar> ACG::DualQuaternionT< Scalar >::Quaternion

Definition at line 84 of file DualQuaternionT.hh.

◆ Vec3

template<class Scalar >
typedef VectorT<Scalar,3> ACG::DualQuaternionT< Scalar >::Vec3

Definition at line 86 of file DualQuaternionT.hh.

◆ Vec4

template<class Scalar >
typedef VectorT<Scalar,4> ACG::DualQuaternionT< Scalar >::Vec4

Definition at line 87 of file DualQuaternionT.hh.

Constructor & Destructor Documentation

◆ DualQuaternionT() [1/8]

template<typename Scalar >
ACG::DualQuaternionT< Scalar >::DualQuaternionT

Default constructor ( constructs an identity dual quaternion )

Definition at line 69 of file DualQuaternionT_impl.hh.

◆ DualQuaternionT() [2/8]

template<typename Scalar >
ACG::DualQuaternionT< Scalar >::DualQuaternionT ( const DualQuaternion _other)

Copy constructor.

Definition at line 77 of file DualQuaternionT_impl.hh.

◆ DualQuaternionT() [3/8]

template<typename Scalar >
ACG::DualQuaternionT< Scalar >::DualQuaternionT ( const Quaternion _real,
const Quaternion _dual 
)

Construct from given real,dual parts.

Definition at line 93 of file DualQuaternionT_impl.hh.

◆ DualQuaternionT() [4/8]

template<typename Scalar >
ACG::DualQuaternionT< Scalar >::DualQuaternionT ( Scalar  _Rw,
Scalar  _Rx,
Scalar  _Ry,
Scalar  _Rz,
Scalar  _Dw,
Scalar  _Dx,
Scalar  _Dy,
Scalar  _Dz 
)

Construct from 8 scalars.

Definition at line 102 of file DualQuaternionT_impl.hh.

◆ DualQuaternionT() [5/8]

template<typename Scalar >
ACG::DualQuaternionT< Scalar >::DualQuaternionT ( Quaternion  _rotation)

Construct from a rotation given as quaternion.

Definition at line 112 of file DualQuaternionT_impl.hh.

◆ DualQuaternionT() [6/8]

template<typename Scalar >
ACG::DualQuaternionT< Scalar >::DualQuaternionT ( const Vec3 _translation)

Construct from a translatation given as a vector.

Definition at line 121 of file DualQuaternionT_impl.hh.

◆ DualQuaternionT() [7/8]

template<typename Scalar >
ACG::DualQuaternionT< Scalar >::DualQuaternionT ( const Vec3 _translation,
const Quaternion _rotation 
)

Construct from a translation+rotation.

Definition at line 130 of file DualQuaternionT_impl.hh.

◆ DualQuaternionT() [8/8]

template<typename Scalar >
ACG::DualQuaternionT< Scalar >::DualQuaternionT ( const Matrix _transformation)

Construct from a rigid transformation given as matrix.

Definition at line 142 of file DualQuaternionT_impl.hh.

Member Function Documentation

◆ conjugate()

template<typename Scalar >
DualQuaternionT< Scalar > ACG::DualQuaternionT< Scalar >::conjugate

conjugate dual quaternion

Definition at line 179 of file DualQuaternionT_impl.hh.

◆ identity()

template<typename Scalar >
DualQuaternionT< Scalar > ACG::DualQuaternionT< Scalar >::identity
static

identity dual quaternion [ R(1, 0, 0, 0), D(0,0,0,0) ]

Definition at line 153 of file DualQuaternionT_impl.hh.

◆ interpolate()

template<class Scalar >
template<typename VectorType >
DualQuaternionT< Scalar > ACG::DualQuaternionT< Scalar >::interpolate ( VectorType &  _weights,
const std::vector< DualQuaternion > &  _dualQuaternions 
)

linear interpolation of dual quaternions. Result is normalized afterwards.

Definition at line 332 of file DualQuaternionT_impl.hh.

◆ invert()

template<typename Scalar >
DualQuaternionT< Scalar > ACG::DualQuaternionT< Scalar >::invert

invert dual quaternion

Definition at line 187 of file DualQuaternionT_impl.hh.

◆ normalize()

template<typename Scalar >
void ACG::DualQuaternionT< Scalar >::normalize

normalize dual quaternion

Definition at line 212 of file DualQuaternionT_impl.hh.

◆ operator!=()

template<typename Scalar >
bool ACG::DualQuaternionT< Scalar >::operator!= ( const DualQuaternion _other) const

dual quaternion comparison

Definition at line 238 of file DualQuaternionT_impl.hh.

◆ operator*() [1/2]

template<typename Scalar >
DualQuaternionT< Scalar > ACG::DualQuaternionT< Scalar >::operator* ( const DualQuaternion _q) const

dualQuaternion * dualQuaternion

Definition at line 284 of file DualQuaternionT_impl.hh.

◆ operator*() [2/2]

template<typename Scalar >
DualQuaternionT< Scalar > ACG::DualQuaternionT< Scalar >::operator* ( const Scalar &  _scalar) const

dualQuaternion * scalar

Definition at line 303 of file DualQuaternionT_impl.hh.

◆ operator*=()

template<typename Scalar >
DualQuaternionT< Scalar > & ACG::DualQuaternionT< Scalar >::operator*= ( const DualQuaternion _q)

dualQuaternion *= dualQuaternion

Definition at line 292 of file DualQuaternionT_impl.hh.

◆ operator+()

template<typename Scalar >
DualQuaternionT< Scalar > ACG::DualQuaternionT< Scalar >::operator+ ( const DualQuaternion _other) const

addition

Definition at line 246 of file DualQuaternionT_impl.hh.

◆ operator+=()

template<typename Scalar >
DualQuaternionT< Scalar > & ACG::DualQuaternionT< Scalar >::operator+= ( const DualQuaternion _other)

addition

Definition at line 254 of file DualQuaternionT_impl.hh.

◆ operator-()

template<typename Scalar >
DualQuaternionT< Scalar > ACG::DualQuaternionT< Scalar >::operator- ( const DualQuaternion _other) const

substraction

Definition at line 265 of file DualQuaternionT_impl.hh.

◆ operator-=()

template<typename Scalar >
DualQuaternionT< Scalar > & ACG::DualQuaternionT< Scalar >::operator-= ( const DualQuaternion _other)

substraction

Definition at line 273 of file DualQuaternionT_impl.hh.

◆ operator=()

template<typename Scalar >
DualQuaternionT< Scalar > & ACG::DualQuaternionT< Scalar >::operator= ( const DualQuaternion _other)

Definition at line 83 of file DualQuaternionT_impl.hh.

◆ operator==()

template<typename Scalar >
bool ACG::DualQuaternionT< Scalar >::operator== ( const DualQuaternion _other) const

dual quaternion comparison

Definition at line 230 of file DualQuaternionT_impl.hh.

◆ operator[]()

template<typename Scalar >
Scalar & ACG::DualQuaternionT< Scalar >::operator[] ( const unsigned int &  b)

Access as one big vector.

Definition at line 315 of file DualQuaternionT_impl.hh.

◆ printInfo()

template<typename Scalar >
void ACG::DualQuaternionT< Scalar >::printInfo

print some info about the DQ

Definition at line 423 of file DualQuaternionT_impl.hh.

◆ transform_point()

template<typename Scalar >
VectorT< Scalar, 3 > ACG::DualQuaternionT< Scalar >::transform_point ( const Vec3 _point) const

Transform a point with the dual quaternion.

transform a given point with this dual quaternion

TODO check if this is a unit dual quaternion

Definition at line 373 of file DualQuaternionT_impl.hh.

◆ transform_vector()

template<typename Scalar >
VectorT< Scalar, 3 > ACG::DualQuaternionT< Scalar >::transform_vector ( const Vec3 _point) const

Transform a vector with the dual quaternion.

transform a given point with this dual quaternion

TODO check if this is a unit dual quaternion

Definition at line 402 of file DualQuaternionT_impl.hh.

◆ zero()

template<typename Scalar >
DualQuaternionT< Scalar > ACG::DualQuaternionT< Scalar >::zero
static

zero dual quaternion [ R(0, 0, 0, 0), D(0,0,0,0) ]

Definition at line 167 of file DualQuaternionT_impl.hh.

Member Data Documentation

◆ dual_

template<class Scalar >
Quaternion ACG::DualQuaternionT< Scalar >::dual_

Definition at line 92 of file DualQuaternionT.hh.

◆ real_

template<class Scalar >
Quaternion ACG::DualQuaternionT< Scalar >::real_

real and dual quaternion parts

Definition at line 91 of file DualQuaternionT.hh.


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