Loading...
Searching...
No Matches
GfDualQuatd Class Referencefinal

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

#include <dualQuatd.h>

Public Types

typedef double ScalarType
 

Public Member Functions

 GfDualQuatd ()
 The default constructor leaves the dual quaternion undefined.
 
 GfDualQuatd (double realVal)
 Initialize the real part to realVal and the imaginary part to zero quaternion.
 
 GfDualQuatd (const GfQuatd &real)
 Initialize the real part to real quaternion and the imaginary part to zero quaternion.
 
 GfDualQuatd (const GfQuatd &real, const GfQuatd &dual)
 This constructor initializes the real and dual parts.
 
 GfDualQuatd (const GfQuatd &rotation, const GfVec3d &translation)
 This constructor initializes from a rotation and a translation components.
 
GF_API GfDualQuatd (const GfDualQuatf &other)
 Implicitly convert from GfDualQuatf.
 
GF_API GfDualQuatd (const GfDualQuath &other)
 Implicitly convert from GfDualQuath.
 
void SetReal (const GfQuatd &real)
 Sets the real part of the dual quaternion.
 
void SetDual (const GfQuatd &dual)
 Sets the dual part of the dual quaternion.
 
const GfQuatdGetReal () const
 Returns the real part of the dual quaternion.
 
const GfQuatdGetDual () const
 Returns the dual part of the dual quaternion.
 
GF_API std::pair< double, double > GetLength () const
 Returns geometric length of this dual quaternion.
 
GF_API GfDualQuatd GetNormalized (double eps=GF_MIN_VECTOR_LENGTH) const
 Returns a normalized (unit-length) version of this dual quaternion.
 
GF_API std::pair< double, double > Normalize (double eps=GF_MIN_VECTOR_LENGTH)
 Normalizes this dual quaternion in place.
 
GF_API GfDualQuatd GetConjugate () const
 Returns the conjugate of this dual quaternion.
 
GF_API GfDualQuatd GetInverse () const
 Returns the inverse of this dual quaternion.
 
GF_API void SetTranslation (const GfVec3d &translation)
 Set the translation component of this dual quaternion.
 
GF_API GfVec3d GetTranslation () const
 Get the translation component of this dual quaternion.
 
bool operator== (const GfDualQuatd &dq) const
 Component-wise dual quaternion equality test.
 
bool operator!= (const GfDualQuatd &dq) const
 Component-wise dual quaternion inequality test.
 
GfDualQuatdoperator+= (const GfDualQuatd &dq)
 Component-wise unary sum operator.
 
GfDualQuatdoperator-= (const GfDualQuatd &dq)
 Component-wise unary difference operator.
 
GF_API GfDualQuatdoperator*= (const GfDualQuatd &dq)
 Post-multiplies dual quaternion dq into this dual quaternion.
 
GfDualQuatdoperator*= (double s)
 Scales this dual quaternion by s.
 
GfDualQuatdoperator/= (double s)
 Scales this dual quaternion by 1 / s.
 
GF_API GfVec3d Transform (const GfVec3d &vec) const
 Transforms the row vector vec by the dual quaternion.
 

Static Public Member Functions

static GfDualQuatd GetZero ()
 Returns the zero dual quaternion, which has a real part of (0,0,0,0) and a dual part of (0,0,0,0).
 
static GfDualQuatd GetIdentity ()
 Returns the identity dual quaternion, which has a real part of (1,0,0,0) and a dual part of (0,0,0,0).
 

Friends

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

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 66 of file dualQuatd.h.

Member Typedef Documentation

◆ ScalarType

typedef double ScalarType

Definition at line 69 of file dualQuatd.h.

Constructor & Destructor Documentation

◆ GfDualQuatd() [1/7]

GfDualQuatd ( )
inline

The default constructor leaves the dual quaternion undefined.

Definition at line 72 of file dualQuatd.h.

◆ GfDualQuatd() [2/7]

GfDualQuatd ( double  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 81 of file dualQuatd.h.

◆ GfDualQuatd() [3/7]

GfDualQuatd ( const GfQuatd real)
inlineexplicit

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

Definition at line 86 of file dualQuatd.h.

◆ GfDualQuatd() [4/7]

GfDualQuatd ( const GfQuatd real,
const GfQuatd dual 
)
inline

This constructor initializes the real and dual parts.

Definition at line 91 of file dualQuatd.h.

◆ GfDualQuatd() [5/7]

GfDualQuatd ( const GfQuatd rotation,
const GfVec3d translation 
)
inline

This constructor initializes from a rotation and a translation components.

Definition at line 96 of file dualQuatd.h.

◆ GfDualQuatd() [6/7]

GF_API GfDualQuatd ( const GfDualQuatf other)

Implicitly convert from GfDualQuatf.

◆ GfDualQuatd() [7/7]

GF_API GfDualQuatd ( const GfDualQuath other)

Implicitly convert from GfDualQuath.

Member Function Documentation

◆ GetConjugate()

GF_API GfDualQuatd GetConjugate ( ) const

Returns the conjugate of this dual quaternion.

◆ GetDual()

const GfQuatd & GetDual ( ) const
inline

Returns the dual part of the dual quaternion.

Definition at line 124 of file dualQuatd.h.

◆ GetIdentity()

static GfDualQuatd 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 136 of file dualQuatd.h.

◆ GetInverse()

GF_API GfDualQuatd GetInverse ( ) const

Returns the inverse of this dual quaternion.

◆ GetLength()

GF_API std::pair< double, double > GetLength ( ) const

Returns geometric length of this dual quaternion.

◆ GetNormalized()

GF_API GfDualQuatd GetNormalized ( double  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.

◆ GetReal()

const GfQuatd & GetReal ( ) const
inline

Returns the real part of the dual quaternion.

Definition at line 119 of file dualQuatd.h.

◆ GetTranslation()

GF_API GfVec3d GetTranslation ( ) const

Get the translation component of this dual quaternion.

◆ GetZero()

static GfDualQuatd 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 130 of file dualQuatd.h.

◆ Normalize()

GF_API std::pair< double, double > Normalize ( double  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.

◆ operator!=()

bool operator!= ( const GfDualQuatd 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 187 of file dualQuatd.h.

◆ operator*=() [1/2]

GF_API GfDualQuatd & operator*= ( const GfDualQuatd dq)

Post-multiplies dual quaternion dq into this dual quaternion.

◆ operator*=() [2/2]

GfDualQuatd & operator*= ( double  s)
inline

Scales this dual quaternion by s.

Definition at line 210 of file dualQuatd.h.

◆ operator+=()

GfDualQuatd & operator+= ( const GfDualQuatd dq)
inline

Component-wise unary sum operator.

Definition at line 192 of file dualQuatd.h.

◆ operator-=()

GfDualQuatd & operator-= ( const GfDualQuatd dq)
inline

Component-wise unary difference operator.

Definition at line 199 of file dualQuatd.h.

◆ operator/=()

GfDualQuatd & operator/= ( double  s)
inline

Scales this dual quaternion by 1 / s.

Definition at line 217 of file dualQuatd.h.

◆ operator==()

bool operator== ( const GfDualQuatd 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 180 of file dualQuatd.h.

◆ SetDual()

void SetDual ( const GfQuatd dual)
inline

Sets the dual part of the dual quaternion.

Definition at line 114 of file dualQuatd.h.

◆ SetReal()

void SetReal ( const GfQuatd real)
inline

Sets the real part of the dual quaternion.

Definition at line 109 of file dualQuatd.h.

◆ SetTranslation()

GF_API void SetTranslation ( const GfVec3d translation)

Set the translation component of this dual quaternion.

◆ Transform()

GF_API GfVec3d Transform ( const GfVec3d vec) const

Transforms the row vector vec by the dual quaternion.

Friends And Related Function Documentation

◆ hash_value

size_t hash_value ( const GfDualQuatd dq)
friend

Hash.

Definition at line 174 of file dualQuatd.h.

◆ operator* [1/3]

GfDualQuatd operator* ( const GfDualQuatd dq,
double  s 
)
friend

Returns the product of dual quaternion dq and scalar s.

Definition at line 243 of file dualQuatd.h.

◆ operator* [2/3]

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

Returns the product of dual quaternions dq1 and dq2.

Definition at line 236 of file dualQuatd.h.

◆ operator* [3/3]

GfDualQuatd operator* ( double  s,
const GfDualQuatd dq 
)
friend

Returns the product of dual quaternion dq and scalar s.

Definition at line 249 of file dualQuatd.h.

◆ operator+

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

Component-wise binary sum operator.

Definition at line 222 of file dualQuatd.h.

◆ operator-

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

Component-wise binary difference operator.

Definition at line 229 of file dualQuatd.h.

◆ operator/

GfDualQuatd operator/ ( const GfDualQuatd dq,
double  s 
)
friend

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

Definition at line 255 of file dualQuatd.h.


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