csDualQuaternion Class Reference [Geometry utilities]

Dual quaternion is a combination q = q0 + e*qe where e is the dual identity element (e^2 = 0) For the background, read "Preliminary Sketch of Biquaternions" [W Clifford, 1873]. More...

`#include <csgeom/dualquaternion.h>`

List of all members.

Public Member Functions

void Conjugate ()
Set this dual quaternion to its own conjugate.
csDualQuaternion (const csQuaternion &real, const csQuaternion &dual)
Initialize with given values.
csDualQuaternion (const csQuaternion &real, const csVector3 &t)
Construct from quaternion and a vector.
csDualQuaternion (const csDualQuaternion &q)
Copy-constructor.
csDualQuaternion ()
Initialize with identity.
csDualQuaternion (const csQuaternion &real)
Construct from quaternion (pure rotation).
csDualNumber Dot (const csDualQuaternion &q) const
Return euclidian inner-product (dot).
csDualQuaternion GetConjugate () const
Get the conjugate dual quaternion.
csDualQuaternion GetInverse () const
Get the inverse dual quaternion.
csDualNumber Norm () const
Get the norm of this quaternion.
csDualQuaternionoperator*= (const csDualQuaternion &q)
Multiply this quaternion by another.
csDualQuaternionoperator*= (float f)
Multiply by scalar.
csDualQuaternionoperator+= (const csDualQuaternion &q)
Add dual quaternion to this one.
csDualQuaternionoperator-= (const csDualQuaternion &q)
Subtract dual quaternion from this one.
csDualQuaternionoperator/= (float f)
v by scalar
void SetIdentity ()
Set quaternion to identity rotation and no rotation.
csVector3 Transform (const csVector3 &v) const
Transform a vector by a dual quaternion.
csVector3 TransformPoint (const csVector3 &v) const
Transform a vector by a dual quaternion as if the vector is a position.
csDualQuaternion Unit () const
Return a unit-length version of this dual quaternion Attempting to normalize a dual quaternion with zero-norm real part will result in a divide by zero error.

Public Attributes

csQuaternion dual
The dual part, representing translational component.
csQuaternion real
The real part, representing rotational component.

Friends

csDualQuaternion operator* (const csDualQuaternion &q1, const csDualQuaternion &q2)
Multiply two dual quaternions.
csDualQuaternion operator* (const csDualQuaternion &q, float f)
Multiply by scalar.
csDualQuaternion operator* (float f, const csDualQuaternion &q)
Multiply by scalar.
csDualQuaternion operator+ (const csDualQuaternion &q1, const csDualQuaternion &q2)
Add two dual quaternions.
csDualQuaternion operator- (const csDualQuaternion &q1, const csDualQuaternion &q2)
Subtract two dual quaternions.
csDualQuaternion operator- (const csDualQuaternion &q)
Get the negative dual quaternion (unary minus).
csDualQuaternion operator/ (const csDualQuaternion &q, float f)
Divide by scalar.
csDualQuaternion operator/ (float f, const csDualQuaternion &q)
Divide by scalar.

Detailed Description

Dual quaternion is a combination q = q0 + e*qe where e is the dual identity element (e^2 = 0) For the background, read "Preliminary Sketch of Biquaternions" [W Clifford, 1873].

Definition at line 46 of file dualquaternion.h.

Constructor & Destructor Documentation

 csDualQuaternion::csDualQuaternion ( ) ` [inline]`

Initialize with identity.

Definition at line 52 of file dualquaternion.h.

 csDualQuaternion::csDualQuaternion ( const csQuaternion & real, const csQuaternion & dual ) ` [inline]`

Initialize with given values.

Definition at line 57 of file dualquaternion.h.

 csDualQuaternion::csDualQuaternion ( const csQuaternion & real ) ` [inline]`

Construct from quaternion (pure rotation).

Definition at line 62 of file dualquaternion.h.

 csDualQuaternion::csDualQuaternion ( const csQuaternion & real, const csVector3 & t ) ` [inline]`

Construct from quaternion and a vector.

Definition at line 67 of file dualquaternion.h.

 csDualQuaternion::csDualQuaternion ( const csDualQuaternion & q ) ` [inline]`

Copy-constructor.

Definition at line 72 of file dualquaternion.h.

Member Function Documentation

 void csDualQuaternion::Conjugate ( ) ` [inline]`

Set this dual quaternion to its own conjugate.

Definition at line 188 of file dualquaternion.h.

 csDualNumber csDualQuaternion::Dot ( const csDualQuaternion & q ) const` [inline]`

Return euclidian inner-product (dot).

Definition at line 195 of file dualquaternion.h.

 csDualQuaternion csDualQuaternion::GetConjugate ( ) const` [inline]`

Get the conjugate dual quaternion.

Definition at line 182 of file dualquaternion.h.

 csDualQuaternion csDualQuaternion::GetInverse ( ) const` [inline]`

Get the inverse dual quaternion.

Inverse is only defined when the real part is non-zero.

Definition at line 239 of file dualquaternion.h.

 csDualNumber csDualQuaternion::Norm ( ) const` [inline]`

Get the norm of this quaternion.

Definition at line 201 of file dualquaternion.h.

 csDualQuaternion& csDualQuaternion::operator*= ( float f ) ` [inline]`

Multiply by scalar.

Definition at line 152 of file dualquaternion.h.

 csDualQuaternion& csDualQuaternion::operator*= ( const csDualQuaternion & q ) ` [inline]`

Multiply this quaternion by another.

Definition at line 129 of file dualquaternion.h.

 csDualQuaternion& csDualQuaternion::operator+= ( const csDualQuaternion & q ) ` [inline]`

Add dual quaternion to this one.

Definition at line 92 of file dualquaternion.h.

 csDualQuaternion& csDualQuaternion::operator-= ( const csDualQuaternion & q ) ` [inline]`

Subtract dual quaternion from this one.

Definition at line 107 of file dualquaternion.h.

 csDualQuaternion& csDualQuaternion::operator/= ( float f ) ` [inline]`

v by scalar

Definition at line 174 of file dualquaternion.h.

 void csDualQuaternion::SetIdentity ( ) ` [inline]`

Set quaternion to identity rotation and no rotation.

Definition at line 78 of file dualquaternion.h.

 csVector3 csDualQuaternion::Transform ( const csVector3 & v ) const` [inline]`

Transform a vector by a dual quaternion.

Definition at line 263 of file dualquaternion.h.

 csVector3 csDualQuaternion::TransformPoint ( const csVector3 & v ) const` [inline]`

Transform a vector by a dual quaternion as if the vector is a position.

Definition at line 252 of file dualquaternion.h.

 csDualQuaternion csDualQuaternion::Unit ( ) const` [inline]`

Return a unit-length version of this dual quaternion Attempting to normalize a dual quaternion with zero-norm real part will result in a divide by zero error.

This is as it should be... fix the calling code.

Definition at line 212 of file dualquaternion.h.

Friends And Related Function Documentation

 csDualQuaternion operator* ( const csDualQuaternion & q1, const csDualQuaternion & q2 ) ` [friend]`

Multiply two dual quaternions.

Definition at line 121 of file dualquaternion.h.

 csDualQuaternion operator* ( const csDualQuaternion & q, float f ) ` [friend]`

Multiply by scalar.

Definition at line 140 of file dualquaternion.h.

 csDualQuaternion operator* ( float f, const csDualQuaternion & q ) ` [friend]`

Multiply by scalar.

Definition at line 146 of file dualquaternion.h.

 csDualQuaternion operator+ ( const csDualQuaternion & q1, const csDualQuaternion & q2 ) ` [friend]`

Add two dual quaternions.

Definition at line 85 of file dualquaternion.h.

 csDualQuaternion operator- ( const csDualQuaternion & q1, const csDualQuaternion & q2 ) ` [friend]`

Subtract two dual quaternions.

Definition at line 100 of file dualquaternion.h.

 csDualQuaternion operator- ( const csDualQuaternion & q ) ` [friend]`

Get the negative dual quaternion (unary minus).

Definition at line 115 of file dualquaternion.h.

 csDualQuaternion operator/ ( const csDualQuaternion & q, float f ) ` [friend]`

Divide by scalar.

Definition at line 160 of file dualquaternion.h.

 csDualQuaternion operator/ ( float f, const csDualQuaternion & q ) ` [friend]`

Divide by scalar.

Definition at line 167 of file dualquaternion.h.

Member Data Documentation

The dual part, representing translational component.

Definition at line 276 of file dualquaternion.h.

The real part, representing rotational component.

Definition at line 273 of file dualquaternion.h.

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

Generated for Crystal Space 1.4.1 by doxygen 1.7.1