HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GfDualQuath Class Referencefinal

#include <dualQuath.h>

Public Types

typedef GfHalf ScalarType
 

Public Member Functions

 GfDualQuath ()
 The default constructor leaves the dual quaternion undefined. More...
 
 GfDualQuath (GfHalf realVal)
 
 GfDualQuath (const GfQuath &real)
 
 GfDualQuath (const GfQuath &real, const GfQuath &dual)
 This constructor initializes the real and dual parts. More...
 
 GfDualQuath (const GfQuath &rotation, const GfVec3h &translation)
 This constructor initializes from a rotation and a translation components. More...
 
GF_API GfDualQuath (const GfDualQuatd &other)
 Construct from GfDualQuatd. More...
 
GF_API GfDualQuath (const GfDualQuatf &other)
 Construct from GfDualQuatf. More...
 
void SetReal (const GfQuath &real)
 Sets the real part of the dual quaternion. More...
 
void SetDual (const GfQuath &dual)
 Sets the dual part of the dual quaternion. More...
 
const GfQuathGetReal () const
 Returns the real part of the dual quaternion. More...
 
const GfQuathGetDual () const
 Returns the dual part of the dual quaternion. More...
 
GF_API std::pair< GfHalf, GfHalfGetLength () const
 Returns geometric length of this dual quaternion. More...
 
GF_API GfDualQuath GetNormalized (GfHalf eps=GF_MIN_VECTOR_LENGTH) const
 
GF_API std::pair< GfHalf, GfHalfNormalize (GfHalf eps=GF_MIN_VECTOR_LENGTH)
 
GF_API GfDualQuath GetConjugate () const
 Returns the conjugate of this dual quaternion. More...
 
GF_API GfDualQuath GetInverse () const
 Returns the inverse of this dual quaternion. More...
 
GF_API void SetTranslation (const GfVec3h &translation)
 Set the translation component of this dual quaternion. More...
 
GF_API GfVec3h GetTranslation () const
 Get the translation component of this dual quaternion. More...
 
bool operator== (const GfDualQuath &dq) const
 
bool operator!= (const GfDualQuath &dq) const
 
GfDualQuathoperator+= (const GfDualQuath &dq)
 Component-wise unary sum operator. More...
 
GfDualQuathoperator-= (const GfDualQuath &dq)
 Component-wise unary difference operator. More...
 
GF_API GfDualQuathoperator*= (const GfDualQuath &dq)
 Post-multiplies dual quaternion dq into this dual quaternion. More...
 
GfDualQuathoperator*= (GfHalf s)
 Scales this dual quaternion by s. More...
 
GfDualQuathoperator/= (GfHalf s)
 Scales this dual quaternion by 1 / s. More...
 
GF_API GfVec3h Transform (const GfVec3h &vec) const
 Transforms the row vector vec by the dual quaternion. More...
 

Static Public Member Functions

static GfDualQuath GetZero ()
 
static GfDualQuath GetIdentity ()
 

Friends

size_t hash_value (const GfDualQuath &dq)
 Hash. More...
 
GfDualQuath operator+ (const GfDualQuath &dq1, const GfDualQuath &dq2)
 Component-wise binary sum operator. More...
 
GfDualQuath operator- (const GfDualQuath &dq1, const GfDualQuath &dq2)
 Component-wise binary difference operator. More...
 
GfDualQuath operator* (const GfDualQuath &dq1, const GfDualQuath &dq2)
 Returns the product of dual quaternions dq1 and dq2. More...
 
GfDualQuath operator* (const GfDualQuath &dq, GfHalf s)
 Returns the product of dual quaternion dq and scalar s. More...
 
GfDualQuath operator* (GfHalf s, const GfDualQuath &dq)
 Returns the product of dual quaternion dq and scalar s. More...
 
GfDualQuath operator/ (const GfDualQuath &dq, GfHalf s)
 Returns the product of dual quaternion dq and scalar 1 / s. More...
 

Detailed Description

Basic type: a real part quaternion and a dual part quaternion.

This class represents a generalized dual quaternion that has a real part and a dual part quaternions. Dual quaternions are used to represent a combination of rotation and translation.

References: https://www.cs.utah.edu/~ladislav/kavan06dual/kavan06dual.pdf http://web.cs.iastate.edu/~cs577/handouts/dual-quaternion.pdf

Definition at line 67 of file dualQuath.h.

Member Typedef Documentation

Definition at line 70 of file dualQuath.h.

Constructor & Destructor Documentation

GfDualQuath::GfDualQuath ( )
inline

The default constructor leaves the dual quaternion undefined.

Definition at line 73 of file dualQuath.h.

GfDualQuath::GfDualQuath ( GfHalf  realVal)
inlineexplicit

Initialize the real part to realVal and the imaginary part to zero quaternion.

Since quaternions typically must be normalized, reasonable values for realVal are -1, 0, or 1. Other values are legal but are likely to be meaningless.

Definition at line 82 of file dualQuath.h.

GfDualQuath::GfDualQuath ( const GfQuath real)
inlineexplicit

Initialize the real part to real quaternion and the imaginary part to zero quaternion.

Definition at line 87 of file dualQuath.h.

GfDualQuath::GfDualQuath ( const GfQuath real,
const GfQuath dual 
)
inline

This constructor initializes the real and dual parts.

Definition at line 92 of file dualQuath.h.

GfDualQuath::GfDualQuath ( const GfQuath rotation,
const GfVec3h translation 
)
inline

This constructor initializes from a rotation and a translation components.

Definition at line 97 of file dualQuath.h.

GF_API GfDualQuath::GfDualQuath ( const GfDualQuatd other)
explicit

Construct from GfDualQuatd.

GF_API GfDualQuath::GfDualQuath ( const GfDualQuatf other)
explicit

Construct from GfDualQuatf.

Member Function Documentation

GF_API GfDualQuath GfDualQuath::GetConjugate ( ) const

Returns the conjugate of this dual quaternion.

const GfQuath& GfDualQuath::GetDual ( ) const
inline

Returns the dual part of the dual quaternion.

Definition at line 125 of file dualQuath.h.

static GfDualQuath GfDualQuath::GetIdentity ( )
inlinestatic

Returns the identity dual quaternion, which has a real part of (1,0,0,0) and a dual part of (0,0,0,0).

Definition at line 137 of file dualQuath.h.

GF_API GfDualQuath GfDualQuath::GetInverse ( ) const

Returns the inverse of this dual quaternion.

GF_API std::pair<GfHalf, GfHalf> GfDualQuath::GetLength ( ) const

Returns geometric length of this dual quaternion.

GF_API GfDualQuath GfDualQuath::GetNormalized ( GfHalf  eps = GF_MIN_VECTOR_LENGTH) const

Returns a normalized (unit-length) version of this dual quaternion. If the length of this dual quaternion is smaller than eps, this returns the identity dual quaternion.

const GfQuath& GfDualQuath::GetReal ( ) const
inline

Returns the real part of the dual quaternion.

Definition at line 120 of file dualQuath.h.

GF_API GfVec3h GfDualQuath::GetTranslation ( ) const

Get the translation component of this dual quaternion.

static GfDualQuath GfDualQuath::GetZero ( )
inlinestatic

Returns the zero dual quaternion, which has a real part of (0,0,0,0) and a dual part of (0,0,0,0).

Definition at line 131 of file dualQuath.h.

GF_API std::pair<GfHalf, GfHalf> GfDualQuath::Normalize ( GfHalf  eps = GF_MIN_VECTOR_LENGTH)

Normalizes this dual quaternion in place. Normalizes this dual quaternion in place to unit length, returning the length before normalization. If the length of this dual quaternion is smaller than eps, this sets the dual quaternion to identity.

bool GfDualQuath::operator!= ( const GfDualQuath dq) const
inline

Component-wise dual quaternion inequality test. The real and dual parts must match exactly for dual quaternions to be considered equal.

Definition at line 188 of file dualQuath.h.

GF_API GfDualQuath& GfDualQuath::operator*= ( const GfDualQuath dq)

Post-multiplies dual quaternion dq into this dual quaternion.

GfDualQuath& GfDualQuath::operator*= ( GfHalf  s)
inline

Scales this dual quaternion by s.

Definition at line 211 of file dualQuath.h.

GfDualQuath& GfDualQuath::operator+= ( const GfDualQuath dq)
inline

Component-wise unary sum operator.

Definition at line 193 of file dualQuath.h.

GfDualQuath& GfDualQuath::operator-= ( const GfDualQuath dq)
inline

Component-wise unary difference operator.

Definition at line 200 of file dualQuath.h.

GfDualQuath& GfDualQuath::operator/= ( GfHalf  s)
inline

Scales this dual quaternion by 1 / s.

Definition at line 218 of file dualQuath.h.

bool GfDualQuath::operator== ( const GfDualQuath dq) const
inline

Component-wise dual quaternion equality test. The real and dual parts must match exactly for dual quaternions to be considered equal.

Definition at line 181 of file dualQuath.h.

void GfDualQuath::SetDual ( const GfQuath dual)
inline

Sets the dual part of the dual quaternion.

Definition at line 115 of file dualQuath.h.

void GfDualQuath::SetReal ( const GfQuath real)
inline

Sets the real part of the dual quaternion.

Definition at line 110 of file dualQuath.h.

GF_API void GfDualQuath::SetTranslation ( const GfVec3h translation)

Set the translation component of this dual quaternion.

GF_API GfVec3h GfDualQuath::Transform ( const GfVec3h vec) const

Transforms the row vector vec by the dual quaternion.

Friends And Related Function Documentation

size_t hash_value ( const GfDualQuath dq)
friend

Hash.

Definition at line 175 of file dualQuath.h.

GfDualQuath operator* ( const GfDualQuath dq1,
const GfDualQuath dq2 
)
friend

Returns the product of dual quaternions dq1 and dq2.

Definition at line 237 of file dualQuath.h.

GfDualQuath operator* ( const GfDualQuath dq,
GfHalf  s 
)
friend

Returns the product of dual quaternion dq and scalar s.

Definition at line 244 of file dualQuath.h.

GfDualQuath operator* ( GfHalf  s,
const GfDualQuath dq 
)
friend

Returns the product of dual quaternion dq and scalar s.

Definition at line 250 of file dualQuath.h.

GfDualQuath operator+ ( const GfDualQuath dq1,
const GfDualQuath dq2 
)
friend

Component-wise binary sum operator.

Definition at line 223 of file dualQuath.h.

GfDualQuath operator- ( const GfDualQuath dq1,
const GfDualQuath dq2 
)
friend

Component-wise binary difference operator.

Definition at line 230 of file dualQuath.h.

GfDualQuath operator/ ( const GfDualQuath dq,
GfHalf  s 
)
friend

Returns the product of dual quaternion dq and scalar 1 / s.

Definition at line 256 of file dualQuath.h.


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