CrystalSpace

Public API Reference

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 csDualQuaternion &q)
 Copy-constructor.
 csDualQuaternion (const csQuaternion &real, const csVector3 &t)
 Construct from quaternion and a vector.
 csDualQuaternion (const csQuaternion &real)
 Construct from quaternion (pure rotation).
 csDualQuaternion (const csQuaternion &real, const csQuaternion &dual)
 Initialize with given values.
 csDualQuaternion ()
 Initialize with identity.
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*= (float f)
 Multiply by scalar.
csDualQuaternionoperator*= (const csDualQuaternion &q)
 Multiply this quaternion by another.
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* (float f, const csDualQuaternion &q)
 Multiply by scalar.
csDualQuaternion operator* (const csDualQuaternion &q, float f)
 Multiply by scalar.
csDualQuaternion operator* (const csDualQuaternion &q1, const csDualQuaternion &q2)
 Multiply two dual quaternions.
csDualQuaternion operator+ (const csDualQuaternion &q1, const csDualQuaternion &q2)
 Add two dual quaternions.
csDualQuaternion operator- (const csDualQuaternion &q)
 Get the negative dual quaternion (unary minus).
csDualQuaternion operator- (const csDualQuaternion &q1, const csDualQuaternion &q2)
 Subtract two dual quaternions.
csDualQuaternion operator/ (float f, const csDualQuaternion &q)
 Divide by scalar.
csDualQuaternion operator/ (const csDualQuaternion &q, float f)
 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].

See also:
csQuaternion

Definition at line 47 of file dualquaternion.h.


Constructor & Destructor Documentation

csDualQuaternion::csDualQuaternion (  )  [inline]

Initialize with identity.

Definition at line 53 of file dualquaternion.h.

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

Initialize with given values.

Definition at line 58 of file dualquaternion.h.

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

Construct from quaternion (pure rotation).

Definition at line 63 of file dualquaternion.h.

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

Construct from quaternion and a vector.

Definition at line 68 of file dualquaternion.h.

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

Copy-constructor.

Definition at line 73 of file dualquaternion.h.


Member Function Documentation

void csDualQuaternion::Conjugate (  )  [inline]

Set this dual quaternion to its own conjugate.

Definition at line 189 of file dualquaternion.h.

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

Return euclidian inner-product (dot).

Definition at line 196 of file dualquaternion.h.

csDualQuaternion csDualQuaternion::GetConjugate (  )  const [inline]

Get the conjugate dual quaternion.

Definition at line 183 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 240 of file dualquaternion.h.

csDualNumber csDualQuaternion::Norm (  )  const [inline]

Get the norm of this quaternion.

Definition at line 202 of file dualquaternion.h.

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

Multiply by scalar.

Definition at line 153 of file dualquaternion.h.

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

Multiply this quaternion by another.

Definition at line 130 of file dualquaternion.h.

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

Add dual quaternion to this one.

Definition at line 93 of file dualquaternion.h.

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

Subtract dual quaternion from this one.

Definition at line 108 of file dualquaternion.h.

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

v by scalar

Definition at line 175 of file dualquaternion.h.

void csDualQuaternion::SetIdentity (  )  [inline]

Set quaternion to identity rotation and no rotation.

Definition at line 79 of file dualquaternion.h.

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

Transform a vector by a dual quaternion.

Definition at line 264 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 253 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 213 of file dualquaternion.h.


Friends And Related Function Documentation

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

Multiply by scalar.

Definition at line 147 of file dualquaternion.h.

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

Multiply by scalar.

Definition at line 141 of file dualquaternion.h.

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

Multiply two dual quaternions.

Definition at line 122 of file dualquaternion.h.

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

Add two dual quaternions.

Definition at line 86 of file dualquaternion.h.

csDualQuaternion operator- ( const csDualQuaternion q  )  [friend]

Get the negative dual quaternion (unary minus).

Definition at line 116 of file dualquaternion.h.

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

Subtract two dual quaternions.

Definition at line 101 of file dualquaternion.h.

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

Divide by scalar.

Definition at line 168 of file dualquaternion.h.

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

Divide by scalar.

Definition at line 161 of file dualquaternion.h.


Member Data Documentation

The dual part, representing translational component.

Definition at line 277 of file dualquaternion.h.

The real part, representing rotational component.

Definition at line 274 of file dualquaternion.h.


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

Generated for Crystal Space 2.1 by doxygen 1.6.1