The DualQuat class represents a dual quaternion, as a quaternion of dual number components. More...
#include <DualQuaternion.h>
Public Member Functions | |
DualQuat | conj () const |
conjugate More... | |
DualQuat | dual () const |
return a real-only quaternion made from dual part of this quaternion. More... | |
DualQuat () | |
default constructor: init with zeros More... | |
DualQuat (double x, double y, double z, double w) | |
DualQuat (double x, double y, double z, double w, double dx, double dy, double dz, double dw) | |
DualQuat (DualNumber x, DualNumber y, DualNumber z, DualNumber w) | |
DualQuat (DualQuat re, DualQuat du) | |
Builds a dual quaternion from real and dual parts provided as pure real quaternions. More... | |
double | length () const |
magnitude of the quaternion More... | |
DualQuat | operator- () const |
DualQuat | pow (double t, bool shorten=true) const |
ScLERP. t=0.0 returns identity, t=1.0 returns this. t can also be outside of 0..1 bounds. More... | |
DualQuat | real () const |
return a copy with dual part zeroed out More... | |
double | theta () const |
angle of rotation represented by this quaternion, in radians More... | |
DualQuat | vec () const |
return vector part (with scalar part zeroed out) More... | |
Static Public Member Functions | |
static double | dot (DualQuat a, DualQuat b) |
dot product between real (rotation) parts of two dual quaternions (to determine if one of them should be negated for shortest interpolation) More... | |
static DualQuat | identity () |
returns dual quaternion for identity placement More... | |
Public Attributes | |
DualNumber | w |
DualNumber | x |
DualNumber | y |
DualNumber | z |
Detailed Description
The DualQuat class represents a dual quaternion, as a quaternion of dual number components.
Dual quaternions are useful for placement interpolation, see pow method.
Rotation is stored as non-dual part of DualQ. Translation is encoded into dual part of DualQuat: DualQuat.dual() = 0.5 * t * r, where t is quaternion with x,y,z of translation and w of 0, and r is the rotation quaternion.
Constructor & Destructor Documentation
◆ DualQuat() [1/5]
Base::DualQuat::DualQuat | ( | ) |
default constructor: init with zeros
◆ DualQuat() [2/5]
Base::DualQuat::DualQuat | ( | DualNumber | x, |
DualNumber | y, | ||
DualNumber | z, | ||
DualNumber | w | ||
) |
◆ DualQuat() [3/5]
Base::DualQuat::DualQuat | ( | double | x, |
double | y, | ||
double | z, | ||
double | w, | ||
double | dx, | ||
double | dy, | ||
double | dz, | ||
double | dw | ||
) |
◆ DualQuat() [4/5]
Base::DualQuat::DualQuat | ( | double | x, |
double | y, | ||
double | z, | ||
double | w | ||
) |
◆ DualQuat() [5/5]
Base::DualQuat::DualQuat | ( | Base::DualQuat | re, |
Base::DualQuat | du | ||
) |
Member Function Documentation
◆ conj()
DualQuat Base::DualQuat::conj | ( | ) | const |
conjugate
Referenced by Base::Placement::fromDualQuaternion().
◆ dot()
|
static |
dot product between real (rotation) parts of two dual quaternions (to determine if one of them should be negated for shortest interpolation)
◆ dual()
DualQuat Base::DualQuat::dual | ( | ) | const |
return a real-only quaternion made from dual part of this quaternion.
Referenced by DualQuat(), and Base::Placement::fromDualQuaternion().
◆ identity()
|
static |
returns dual quaternion for identity placement
◆ length()
double Base::DualQuat::length | ( | ) | const |
magnitude of the quaternion
Referenced by DualQuat(), and Mod.PartDesign.Scripts.FilletArc.Vector::norm().
◆ operator-()
DualQuat Base::DualQuat::operator- | ( | ) | const |
◆ pow()
Base::DualQuat Base::DualQuat::pow | ( | double | t, |
bool | shorten = true |
||
) | const |
ScLERP. t=0.0 returns identity, t=1.0 returns this. t can also be outside of 0..1 bounds.
References theta().
◆ real()
DualQuat Base::DualQuat::real | ( | ) | const |
return a copy with dual part zeroed out
Referenced by Base::Placement::fromDualQuaternion().
◆ theta()
double Base::DualQuat::theta | ( | ) | const |
angle of rotation represented by this quaternion, in radians
Referenced by pow().
◆ vec()
DualQuat Base::DualQuat::vec | ( | ) | const |
return vector part (with scalar part zeroed out)
Member Data Documentation
◆ w
DualNumber Base::DualQuat::w |
◆ x
DualNumber Base::DualQuat::x |
Referenced by Mod.PartDesign.Scripts.FilletArc.Vector::add(), DraftGui.DraftToolBar::changeAngleValue(), DraftGui.DraftToolBar::changeXValue(), importSVG.svgHandler::characters(), DraftGui.DraftToolBar::checkSpecialChars(), PathScripts.PathInspect.GCodeEditorDialog::cleanup(), Mod.PartDesign.Scripts.FilletArc.Vector::cross(), PathScripts.PostUtils.GCodeEditorDialog::done(), Mod.PartDesign.Scripts.FilletArc.Vector::dot(), Base::Placement::fromDualQuaternion(), Mod.PartDesign.Scripts.FilletArc.Vector::length(), Mod.PartDesign.Scripts.FilletArc.Vector::mult(), Mod.PartDesign.Scripts.FilletArc.Vector::norm(), PathScripts.PathDressupHoldingTags.Tag::originAt(), DraftGui.DraftToolBar::pointUi(), Mod.PartDesign.Scripts.FilletArc.Vector::sub(), DraftGui.DraftToolBar::taskUi(), Base::Placement::toDualQuaternion(), DraftGui.DraftToolBar::updateSnapper(), DraftGui.DraftToolBar::validatePoint(), and automotive_design.right_angular_wedge::wr1().
◆ y
DualNumber Base::DualQuat::y |
Referenced by Mod.PartDesign.Scripts.FilletArc.Vector::add(), DraftGui.DraftToolBar::changeAngleValue(), DraftGui.DraftToolBar::changeYValue(), importSVG.svgHandler::characters(), DraftGui.DraftToolBar::checkSpecialChars(), PathScripts.PathInspect.GCodeEditorDialog::cleanup(), Mod.PartDesign.Scripts.FilletArc.Vector::cross(), PathScripts.PostUtils.GCodeEditorDialog::done(), Mod.PartDesign.Scripts.FilletArc.Vector::dot(), Base::Placement::fromDualQuaternion(), Mod.PartDesign.Scripts.FilletArc.Vector::length(), Mod.PartDesign.Scripts.FilletArc.Vector::mult(), Mod.PartDesign.Scripts.FilletArc.Vector::norm(), PathScripts.PathDressupHoldingTags.Tag::originAt(), DraftGui.DraftToolBar::pointUi(), Mod.PartDesign.Scripts.FilletArc.Vector::sub(), DraftGui.DraftToolBar::taskUi(), Base::Placement::toDualQuaternion(), DraftGui.DraftToolBar::updateSnapper(), and DraftGui.DraftToolBar::validatePoint().
◆ z
DualNumber Base::DualQuat::z |
Referenced by Mod.PartDesign.Scripts.FilletArc.Vector::add(), automotive_design.revolved_area_solid::axis_line(), automotive_design.surface_of_revolution::axis_line(), automotive_design.revolved_face_solid::axis_line(), ifc4.ifcrevolvedareasolid::axisdirectioninxy(), ifc2x3.ifcsurfaceofrevolution::axisline(), ifc4.ifcsurfaceofrevolution::axisline(), ifc2x3.ifcrevolvedareasolid::axisline(), ifc4.ifcrevolvedareasolid::axisline(), PathScripts.PathDressupHoldingTags.Tag::bottom(), DraftGui.DraftToolBar::changeAngleValue(), DraftGui.DraftToolBar::changeZValue(), DraftGui.DraftToolBar::checkSpecialChars(), PathScripts.PathDressupTag.TagSolid::cloneAt(), PathScripts.PathDressupHoldingTags.Tag::createSolidsAt(), Mod.PartDesign.Scripts.FilletArc.Vector::cross(), Mod.PartDesign.Scripts.FilletArc.Vector::dot(), Base::Placement::fromDualQuaternion(), Mod.PartDesign.Scripts.FilletArc.Vector::length(), Mod.PartDesign.Scripts.FilletArc.Vector::mult(), Mod.PartDesign.Scripts.FilletArc.Vector::norm(), DraftGui.DraftToolBar::pointUi(), importSH3D.SH3DHandler::startElement(), Mod.PartDesign.Scripts.FilletArc.Vector::sub(), DraftGui.DraftToolBar::taskUi(), Base::Placement::toDualQuaternion(), PathScripts.PathDressupHoldingTags.Tag::top(), DraftGui.DraftToolBar::updateSnapper(), DraftGui.DraftToolBar::validatePoint(), and ifc2x3.ifcrevolvedareasolid::wr32().
The documentation for this class was generated from the following files:
- src/Base/DualQuaternion.h
- src/Base/DualQuaternion.cpp