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.
variable x#
The second component of the dual quaternion.
variable y#
The third component of the dual quaternion.
variable z#
The fourth component of the dual quaternion.
Public Functions Documentation#
function SBDTypeDualQuaternion [1/5]#
Constructs a dual quaternion with components set to zero.
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])
Constructs a dual quaternion from an array of eight double values.
Parameters:
dArray 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:
wDual number for the w component.xDual number for the x component.yDual number for the y component.zDual 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:
waReal part of the w component.xaReal part of the x component.yaReal part of the y component.zaReal part of the z component.wbDual part of the w component.xbDual part of the x component.ybDual part of the y component.zbDual 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:
waReal part of the w component.xaReal part of the x component.yaReal part of the y component.zaReal part of the z component.wbDual part of the w component.xbDual part of the x component.ybDual part of the y component.zbDual part of the z component.
function biconjugate#
Returns the bi-conjugate of the dual quaternion.
Returns the bi-conjugate of this dual quaternion.
Returns:
The bi-conjugated dual quaternion.
function conjugate#
Returns the conjugate of the dual quaternion.
Returns the conjugate of this dual quaternion.
Returns:
The conjugated dual quaternion.
function isSerializable#
Returns true __
Indicates whether this type supports serialization.
Returns:
True, indicating that the type is serializable.
function norm#
Returns the norm of the dual quaternion.
Computes the norm of the dual quaternion.
Returns:
The norm as a dual number.
function normalize#
Normalizes the dual quaternion.
Normalizes this dual quaternion in place.
function normalizedVersion#
Returns the normalized version of the dual quaternion.
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 .
Returns the product of this dual quaternion with another dual quaternion.
Parameters:
dDual quaternion to multiply with.
Returns:
The resulting dual quaternion.
function operator*#
Returns the product of this dual quaternion with double d .
Returns a new dual quaternion scaled by a double factor.
Parameters:
dScaling 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:
dScaling factor.
Returns:
The scaled dual quaternion.
function operator*=#
Multiplies this dual quaternion with dual quaternion d .
Multiplies this dual quaternion by another dual quaternion.
Parameters:
dDual quaternion to multiply with.
Returns:
Reference to this dual quaternion after multiplication.
function operator*=#
Multiplies this dual quaternion with double d .
Scales this dual quaternion by a double factor.
Parameters:
dScaling factor.
Returns:
Reference to this dual quaternion after scaling.
function operator*=#
Multiplies this dual quaternion with dimensionless quantity d .
Scales this dual quaternion by a dimensionless quantity.
Parameters:
dScaling factor.
Returns:
Reference to this dual quaternion after scaling.
function operator+#
Returns the sum of this dual quaternion with dual quaternion d .
Returns the sum of this dual quaternion and another dual quaternion.
Parameters:
dDual quaternion to add.
Returns:
The resulting dual quaternion.
function operator+=#
Adds dual quaternion d to this dual quaternion.
Adds another dual quaternion to this dual quaternion.
Parameters:
dDual quaternion to add.
Returns:
Reference to this dual quaternion after addition.
function operator-#
Returns the difference between this dual quaternion and dual quaternion d .
Returns the difference between this dual quaternion and another dual quaternion.
Parameters:
dDual quaternion to subtract.
Returns:
The resulting dual quaternion.
function operator-=#
Subtracts dual quaternion d from this dual quaternion.
Subtracts another dual quaternion from this dual quaternion.
Parameters:
dDual quaternion to subtract.
Returns:
Reference to this dual quaternion after subtraction.
function print [1/2]#
Prints the dual quaternion.
Prints the dual quaternion to the provided output stream.
Parameters:
osOutput stream to print to.
function print [2/2]#
Prints the dual quaternion.
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:
serializerPointer to the serializer object.sdkVersionNumberVersion 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:
serializerPointer to the serializer object.sdkVersionNumberVersion number of the SDK; defaults to SB_SDK_VERSION_NUMBER.