Web Analytics Made Easy - Statcounter
Skip to content

Class SBDTypeDualQuaternion#

ClassList > SBDTypeDualQuaternion

This class describes a dual quaternion. More...

  • #include <SBDTypeDualQuaternion.hpp>

Public Attributes#

Type Name
SBDual w
The first component of the dual quaternion.
SBDual x
The second component of the dual quaternion.
SBDual y
The third component of the dual quaternion.
SBDual z
The fourth component of the dual quaternion.

Public Functions#

Type Name
SBDTypeDualQuaternion ()
Constructs a dual quaternion with components set to zero.
SBDTypeDualQuaternion (double v)
Constructs a dual quaternion such that w=( v [0],v [1]), x=(v [2],v [3]), y=(v [4],v [5]), z=(v [6],v [7])
SBDTypeDualQuaternion (const SBDTypeDual & w, const SBDTypeDual & x, const SBDTypeDual & y, const SBDTypeDual & z)
Constructs a dual quaternion from dual numbers w ,x ,y andz .
SBDTypeDualQuaternion (double wa, double xa, double ya, double za, double wb, double xb, double yb, double zb)
Constructs a dual quaternion such that w=( wa ,wb ), x=(xa ,xb ), y=(ya ,yb ), z=(za ,zb )
SBDTypeDualQuaternion (const SBQuantity::dimensionless & wa, const SBQuantity::dimensionless & xa, const SBQuantity::dimensionless & ya, const SBQuantity::dimensionless & za, const SBQuantity::dimensionless & wb, const SBQuantity::dimensionless & xb, const SBQuantity::dimensionless & yb, const SBQuantity::dimensionless & zb)
Constructs a dual quaternion such that w=( wa ,wb ), x=(xa ,xb ), y=(ya ,yb ), z=(za ,zb )
SBDTypeDualQuaternion biconjugate () const
Returns the bi-conjugate of the dual quaternion.
SBDTypeDualQuaternion conjugate () const
Returns the conjugate of the dual quaternion.
virtual bool isSerializable () const
Returns true __
SBDTypeDual norm () const
Returns the norm of the dual quaternion.
void normalize ()
Normalizes the dual quaternion.
SBDTypeDualQuaternion normalizedVersion () const
Returns the normalized version of the dual quaternion.
SBDTypeDualQuaternion operator* (const SBDTypeDualQuaternion & d) const
Returns the product of this dual quaternion with dual quaternion d .
SBDTypeDualQuaternion operator* (double d) const
Returns the product of this dual quaternion with double d .
SBDTypeDualQuaternion operator* (const SBQuantity::dimensionless & d) const
Returns the product of this dual quaternion with dimensionless quantity d .
SBDTypeDualQuaternion & operator*= (const SBDTypeDualQuaternion & d)
Multiplies this dual quaternion with dual quaternion d .
SBDTypeDualQuaternion & operator*= (double d)
Multiplies this dual quaternion with double d .
SBDTypeDualQuaternion & operator*= (const SBQuantity::dimensionless & d)
Multiplies this dual quaternion with dimensionless quantity d .
SBDTypeDualQuaternion operator+ (const SBDTypeDualQuaternion & d) const
Returns the sum of this dual quaternion with dual quaternion d .
SBDTypeDualQuaternion & operator+= (const SBDTypeDualQuaternion & d)
Adds dual quaternion d to this dual quaternion.
SBDTypeDualQuaternion operator- (const SBDTypeDualQuaternion & d) const
Returns the difference between this dual quaternion and dual quaternion d .
SBDTypeDualQuaternion & operator-= (const SBDTypeDualQuaternion & d)
Subtracts dual quaternion d from this dual quaternion.
void print (std::ostream & os) const
Prints the dual quaternion.
void print () const
Prints the dual quaternion.
virtual void serialize (SBCSerializer * serializer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER) const
Serializes the dual quaternion.
virtual void unserialize (SBCSerializer * serializer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER)
Unserializes the dual quaternion.

Detailed Description#

This class describes dual quaternions, which may be used to represent and interpolate rigid body positions and orientations.

Dual quaternions are quaternions whose components are dual numbers.

Short name: SBDualQuaternion

See also: SBDTypeDual

See also: SAMSON's unit system

Public Attributes Documentation#

variable w#

The first component of the dual quaternion.

SBDual SBDTypeDualQuaternion::w;


variable x#

The second component of the dual quaternion.

SBDual SBDTypeDualQuaternion::x;


variable y#

The third component of the dual quaternion.

SBDual SBDTypeDualQuaternion::y;


variable z#

The fourth component of the dual quaternion.

SBDual SBDTypeDualQuaternion::z;


Public Functions Documentation#

function SBDTypeDualQuaternion [1/5]#

Constructs a dual quaternion with components set to zero.

SBDTypeDualQuaternion::SBDTypeDualQuaternion () 

Constructs a dual quaternion with all components set to zero.


function SBDTypeDualQuaternion [2/5]#

Constructs a dual quaternion such that w=( v [0],v [1]), x=(v [2],v [3]), y=(v [4],v [5]), z=(v [6],v [7])

SBDTypeDualQuaternion::SBDTypeDualQuaternion (
    double v
) 

Constructs a dual quaternion from an array of eight double values.

Parameters:

  • d Array of eight doubles where the first four values initialize the real parts of the components (w, x, y, z) and the next four values initialize the dual parts.

function SBDTypeDualQuaternion [3/5]#

Constructs a dual quaternion from dual numbers w ,x ,y andz .

SBDTypeDualQuaternion::SBDTypeDualQuaternion (
    const SBDTypeDual & w,
    const SBDTypeDual & x,
    const SBDTypeDual & y,
    const SBDTypeDual & z
) 

Constructs a dual quaternion from four dual numbers representing the components.

Parameters:

  • w Dual number for the w component.
  • x Dual number for the x component.
  • y Dual number for the y component.
  • z Dual number for the z component.

function SBDTypeDualQuaternion [4/5]#

Constructs a dual quaternion such that w=( wa ,wb ), x=(xa ,xb ), y=(ya ,yb ), z=(za ,zb )

SBDTypeDualQuaternion::SBDTypeDualQuaternion (
    double wa,
    double xa,
    double ya,
    double za,
    double wb,
    double xb,
    double yb,
    double zb
) 

Constructs a dual quaternion from eight double values specifying the real and dual parts of each component.

Parameters:

  • wa Real part of the w component.
  • xa Real part of the x component.
  • ya Real part of the y component.
  • za Real part of the z component.
  • wb Dual part of the w component.
  • xb Dual part of the x component.
  • yb Dual part of the y component.
  • zb Dual part of the z component.

function SBDTypeDualQuaternion [5/5]#

Constructs a dual quaternion such that w=( wa ,wb ), x=(xa ,xb ), y=(ya ,yb ), z=(za ,zb )

SBDTypeDualQuaternion::SBDTypeDualQuaternion (
    const SBQuantity::dimensionless & wa,
    const SBQuantity::dimensionless & xa,
    const SBQuantity::dimensionless & ya,
    const SBQuantity::dimensionless & za,
    const SBQuantity::dimensionless & wb,
    const SBQuantity::dimensionless & xb,
    const SBQuantity::dimensionless & yb,
    const SBQuantity::dimensionless & zb
) 

Constructs a dual quaternion from eight dimensionless quantities representing the real and dual parts of the components.

Parameters:

  • wa Real part of the w component.
  • xa Real part of the x component.
  • ya Real part of the y component.
  • za Real part of the z component.
  • wb Dual part of the w component.
  • xb Dual part of the x component.
  • yb Dual part of the y component.
  • zb Dual part of the z component.

function biconjugate#

Returns the bi-conjugate of the dual quaternion.

SBDTypeDualQuaternion SBDTypeDualQuaternion::biconjugate () const

Returns the bi-conjugate of this dual quaternion.

Returns:

The bi-conjugated dual quaternion.


function conjugate#

Returns the conjugate of the dual quaternion.

SBDTypeDualQuaternion SBDTypeDualQuaternion::conjugate () const

Returns the conjugate of this dual quaternion.

Returns:

The conjugated dual quaternion.


function isSerializable#

Returns true __

virtual bool SBDTypeDualQuaternion::isSerializable () const

Indicates whether this type supports serialization.

Returns:

True, indicating that the type is serializable.


function norm#

Returns the norm of the dual quaternion.

SBDTypeDual SBDTypeDualQuaternion::norm () const

Computes the norm of the dual quaternion.

Returns:

The norm as a dual number.


function normalize#

Normalizes the dual quaternion.

void SBDTypeDualQuaternion::normalize () 

Normalizes this dual quaternion in place.


function normalizedVersion#

Returns the normalized version of the dual quaternion.

SBDTypeDualQuaternion SBDTypeDualQuaternion::normalizedVersion () const

Returns a normalized copy of this dual quaternion.

Returns:

A normalized dual quaternion.


function operator*#

Returns the product of this dual quaternion with dual quaternion d .

SBDTypeDualQuaternion SBDTypeDualQuaternion::operator* (
    const SBDTypeDualQuaternion & d
) const

Returns the product of this dual quaternion with another dual quaternion.

Parameters:

  • d Dual quaternion to multiply with.

Returns:

The resulting dual quaternion.


function operator*#

Returns the product of this dual quaternion with double d .

SBDTypeDualQuaternion SBDTypeDualQuaternion::operator* (
    double d
) const

Returns a new dual quaternion scaled by a double factor.

Parameters:

  • d Scaling factor.

Returns:

The scaled dual quaternion.


function operator*#

Returns the product of this dual quaternion with dimensionless quantity d .

SBDTypeDualQuaternion SBDTypeDualQuaternion::operator* (
    const SBQuantity::dimensionless & d
) const

Returns a new dual quaternion scaled by a dimensionless quantity.

Parameters:

  • d Scaling factor.

Returns:

The scaled dual quaternion.


function operator*=#

Multiplies this dual quaternion with dual quaternion d .

SBDTypeDualQuaternion & SBDTypeDualQuaternion::operator*= (
    const SBDTypeDualQuaternion & d
) 

Multiplies this dual quaternion by another dual quaternion.

Parameters:

  • d Dual quaternion to multiply with.

Returns:

Reference to this dual quaternion after multiplication.


function operator*=#

Multiplies this dual quaternion with double d .

SBDTypeDualQuaternion & SBDTypeDualQuaternion::operator*= (
    double d
) 

Scales this dual quaternion by a double factor.

Parameters:

  • d Scaling factor.

Returns:

Reference to this dual quaternion after scaling.


function operator*=#

Multiplies this dual quaternion with dimensionless quantity d .

SBDTypeDualQuaternion & SBDTypeDualQuaternion::operator*= (
    const SBQuantity::dimensionless & d
) 

Scales this dual quaternion by a dimensionless quantity.

Parameters:

  • d Scaling factor.

Returns:

Reference to this dual quaternion after scaling.


function operator+#

Returns the sum of this dual quaternion with dual quaternion d .

SBDTypeDualQuaternion SBDTypeDualQuaternion::operator+ (
    const SBDTypeDualQuaternion & d
) const

Returns the sum of this dual quaternion and another dual quaternion.

Parameters:

  • d Dual quaternion to add.

Returns:

The resulting dual quaternion.


function operator+=#

Adds dual quaternion d to this dual quaternion.

SBDTypeDualQuaternion & SBDTypeDualQuaternion::operator+= (
    const SBDTypeDualQuaternion & d
) 

Adds another dual quaternion to this dual quaternion.

Parameters:

  • d Dual quaternion to add.

Returns:

Reference to this dual quaternion after addition.


function operator-#

Returns the difference between this dual quaternion and dual quaternion d .

SBDTypeDualQuaternion SBDTypeDualQuaternion::operator- (
    const SBDTypeDualQuaternion & d
) const

Returns the difference between this dual quaternion and another dual quaternion.

Parameters:

  • d Dual quaternion to subtract.

Returns:

The resulting dual quaternion.


function operator-=#

Subtracts dual quaternion d from this dual quaternion.

SBDTypeDualQuaternion & SBDTypeDualQuaternion::operator-= (
    const SBDTypeDualQuaternion & d
) 

Subtracts another dual quaternion from this dual quaternion.

Parameters:

  • d Dual quaternion to subtract.

Returns:

Reference to this dual quaternion after subtraction.


function print [1/2]#

Prints the dual quaternion.

void SBDTypeDualQuaternion::print (
    std::ostream & os
) const

Prints the dual quaternion to the provided output stream.

Parameters:

  • os Output stream to print to.

function print [2/2]#

Prints the dual quaternion.

void SBDTypeDualQuaternion::print () const

Prints the dual quaternion to the standard output stream.


function serialize#

Serializes the dual quaternion.

virtual void SBDTypeDualQuaternion::serialize (
    SBCSerializer * serializer,
    const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER
) const

Serializes the dual quaternion using the provided serializer.

Parameters:

  • serializer Pointer to the serializer object.
  • sdkVersionNumber Version number of the SDK; defaults to SB_SDK_VERSION_NUMBER.

function unserialize#

Unserializes the dual quaternion.

virtual void SBDTypeDualQuaternion::unserialize (
    SBCSerializer * serializer,
    const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER
) 

Deserializes the dual quaternion from the provided serializer.

Parameters:

  • serializer Pointer to the serializer object.
  • sdkVersionNumber Version number of the SDK; defaults to SB_SDK_VERSION_NUMBER.