#include <Rotation.h>
Public Member Functions | |
void | getRawValue (Vector3d &axis, double &rfAngle) const |
Does the same as the method above unless normalizing the axis. More... | |
void | getValue (double &q0, double &q1, double &q2, double &q3) const |
void | getValue (Matrix4D &matrix) const |
Returns this rotation in form of a matrix. More... | |
void | getValue (Vector3d &axis, double &rfAngle) const |
If not a null quaternion then axis will be normalized. More... | |
const double * | getValue (void) const |
Methods to get or set rotations. More... | |
void | getYawPitchRoll (double &y, double &p, double &r) const |
Euler angles in yaw,pitch,roll notation. More... | |
Rotation | inverse (void) const |
Rotation & | invert (void) |
Invert rotations. More... | |
bool | isIdentity () const |
bool | isNull () const |
bool | isSame (const Rotation &) const |
bool | isSame (const Rotation &, double tol) const |
Vector3d | multVec (const Vector3d &src) const |
void | multVec (const Vector3d &src, Vector3d &dst) const |
bool | operator!= (const Rotation &q) const |
Rotation | operator* (const Rotation &q) const |
Rotation & | operator*= (const Rotation &q) |
Operators. More... | |
void | operator= (const Rotation &) |
bool | operator== (const Rotation &q) const |
double & | operator[] (unsigned short usIndex) |
const double & | operator[] (unsigned short usIndex) const |
Rotation () | |
Construction. More... | |
Rotation (const double q0, const double q1, const double q2, const double q3) | |
Construct a rotation initialized with the given quaternion components: q0 = x, q1 = y, q2 = z and q3 = w, where the quaternion is specified by q=w+xi+yj+zk. More... | |
Rotation (const double q[4]) | |
Construct a rotation initialized with the given quaternion components: q[0] = x, q[1] = y, q[2] = z and q[3] = w, where the quaternion is specified by q=w+xi+yj+zk. More... | |
Rotation (const Matrix4D &matrix) | |
Rotation (const Rotation &rot) | |
Rotation (const Vector3d &axis, const double fAngle) | |
Construct a rotation by rotation axis and angle. More... | |
Rotation (const Vector3d &rotateFrom, const Vector3d &rotateTo) | |
void | scaleAngle (const double scaleFactor) |
void | setValue (const double q0, const double q1, const double q2, const double q3) |
void | setValue (const double q[4]) |
void | setValue (const Matrix4D &matrix) |
void | setValue (const Vector3d &axis, const double fAngle) |
void | setValue (const Vector3d &rotateFrom, const Vector3d &rotateTo) |
void | setYawPitchRoll (double y, double p, double r) |
Euler angles in yaw,pitch,roll notation. More... | |
Static Public Member Functions | |
static Rotation | identity (void) |
static Rotation | makeRotationByAxes (Vector3d xdir, Vector3d ydir, Vector3d zdir, const char *priorityOrder="ZXY") |
makeRotationByAxes(xdir, ydir, zdir, priorityOrder): creates a rotation that converts a vector in local cs with axes given as arguments, into a vector in global cs. More... | |
static Rotation | slerp (const Rotation &rot0, const Rotation &rot1, double t) |
Specialty constructors. More... | |
Constructor & Destructor Documentation
◆ Rotation() [1/7]
Rotation::Rotation | ( | ) |
Construction.
Referenced by identity(), makeRotationByAxes(), and slerp().
◆ Rotation() [2/7]
Rotation::Rotation | ( | const Vector3d & | axis, |
const double | fAngle | ||
) |
Construct a rotation by rotation axis and angle.
References setValue().
◆ Rotation() [3/7]
Rotation::Rotation | ( | const Matrix4D & | matrix | ) |
References setValue().
◆ Rotation() [4/7]
Rotation::Rotation | ( | const double | q[4] | ) |
Construct a rotation initialized with the given quaternion components: q[0] = x, q[1] = y, q[2] = z and q[3] = w, where the quaternion is specified by q=w+xi+yj+zk.
References setValue().
◆ Rotation() [5/7]
Rotation::Rotation | ( | const double | q0, |
const double | q1, | ||
const double | q2, | ||
const double | q3 | ||
) |
Construct a rotation initialized with the given quaternion components: q0 = x, q1 = y, q2 = z and q3 = w, where the quaternion is specified by q=w+xi+yj+zk.
References setValue().
◆ Rotation() [6/7]
References setValue().
◆ Rotation() [7/7]
Rotation::Rotation | ( | const Rotation & | rot | ) |
Member Function Documentation
◆ getRawValue()
void Rotation::getRawValue | ( | Vector3d & | axis, |
double & | rfAngle | ||
) | const |
Does the same as the method above unless normalizing the axis.
References Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by Base::RotationPy::setAngle().
◆ getValue() [1/4]
void Rotation::getValue | ( | double & | q0, |
double & | q1, | ||
double & | q2, | ||
double & | q3 | ||
) | const |
◆ getValue() [2/4]
void Rotation::getValue | ( | Matrix4D & | matrix | ) | const |
Returns this rotation in form of a matrix.
◆ getValue() [3/4]
void Rotation::getValue | ( | Vector3d & | axis, |
double & | rfAngle | ||
) | const |
If not a null quaternion then axis will be normalized.
References Base::Vector3< _Precision >::Normalize(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
◆ getValue() [4/4]
const double * Rotation::getValue | ( | void | ) | const |
Methods to get or set rotations.
Referenced by Data::ComplexGeoData::applyRotation(), Import::ExportOCAF::createNode(), Robot::TrajectoryDressUpObject::execute(), Base::RotationPy::getAngle(), Base::RotationPy::getAxis(), Base::RotationPy::getCustomAttributes(), Part::Feature::getLocation(), Part::FeatureReference::getLocation(), Base::RotationPy::getQ(), operator*=(), Base::RotationPy::PyInit(), Path::Toolpath::recalculate(), Base::RotationPy::representation(), Part::GeometryPy::rotate(), Import::ExportOCAF::saveShape(), scaleAngle(), Base::RotationPy::setAxis(), Gui::View3DInventorPy::setCameraOrientation(), Part::TopoShape::setPlacement(), Gui::ViewProviderVRMLObject::updateData(), Gui::ViewProviderInventorObject::updateData(), Gui::ViewProviderDragger::updateTransform(), and Gui::View3DInventorPy::viewPosition().
◆ getYawPitchRoll()
void Rotation::getYawPitchRoll | ( | double & | y, |
double & | p, | ||
double & | r | ||
) | const |
Euler angles in yaw,pitch,roll notation.
Referenced by PartGui::TaskDlgAttacher::accept(), Base::RotationPy::getCustomAttributes(), Base::PlacementPy::representation(), Base::RotationPy::setCustomAttributes(), Path::Command::setFromPlacement(), Base::RotationPy::toEuler(), Path::Command::transform(), and RobotGui::TaskTrajectoryDressUpParameter::viewPlacement().
◆ identity()
|
static |
References Rotation().
◆ inverse()
Rotation Rotation::inverse | ( | void | ) | const |
Referenced by Base::RotationPy::inverted().
◆ invert()
Rotation & Rotation::invert | ( | void | ) |
Invert rotations.
Referenced by PathScripts.PathDressupLeadInOut.ObjectDressup::getLeadEnd(), PathScripts.PathDressupLeadInOut.ObjectDressup::getLeadStart(), and Base::RotationPy::invert().
◆ isIdentity()
bool Rotation::isIdentity | ( | ) | const |
◆ isNull()
bool Rotation::isNull | ( | ) | const |
Referenced by Base::RotationPy::isNull().
◆ isSame() [1/2]
Referenced by Base::RotationPy::isSame().
◆ isSame() [2/2]
◆ makeRotationByAxes()
|
static |
makeRotationByAxes(xdir, ydir, zdir, priorityOrder): creates a rotation that converts a vector in local cs with axes given as arguments, into a vector in global cs.
- Parameters
-
xdir is wanted direction of local X axis ydir ... zdir priorityOrder sets which directions are followed. It is a string like "ZXY". This means, Z direction is followed precisely; X direction is corrected to be perpendicular to Z direction, and used; Y direction argument is ignored altogether (Y direction is generated from Z and X).
If only one vector provided is nonzero, the other two directions are picked automatically.
References Base::Vector3< _Precision >::Cross(), Base::Vector3< _Precision >::Length(), Base::Vector3< _Precision >::Normalize(), Rotation(), Base::Matrix4D::setToUnity(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by Attacher::AttachEngine3D::calculateAttachedPlacement(), and Base::RotationPy::PyInit().
◆ multVec() [1/2]
◆ multVec() [2/2]
Referenced by ReenGui::FitBSplineSurfaceWidget::accept(), Attacher::AttachEngine3D::calculateAttachedPlacement(), Part::Extrusion::calculateShapeNormal(), Path::compensateRotation(), Base::CoordinateSystem::displacement(), PartDesignGui::fixSketchSupport(), PartDesign::ProfileBased::getAxis(), SketcherGui::ViewProviderSketch::getCoordsOnSketchPlane(), PartDesign::Line::getDirection(), PartDesign::Plane::getNormal(), PartDesign::ProfileBased::getProfileNormal(), PartDesign::ProfileBased::getReversedAngle(), PartDesign::Mirrored::getTransformations(), PartDesign::LinearPattern::getTransformations(), PartDesign::PolarPattern::getTransformations(), PartDesign::CoordinateSystem::getXAxis(), PartDesign::CoordinateSystem::getYAxis(), PartDesign::CoordinateSystem::getZAxis(), Sketcher::SketchObject::isCarbonCopyAllowed(), Base::RotationPy::multVec(), multVec(), Attacher::AttachEngine::placementFactory(), Attacher::AttachEngine::readLinks(), SketcherGui::ViewProviderSketch::rebuildConstraintsVisual(), Sketcher::SketchObject::rebuildExternalGeometry(), Gui::View3DInventorViewer::toggleClippingPlane(), Gui::ManualAlignment::Private::transformation2x2(), Gui::ManualAlignment::Private::transformation3x3(), Path::PathSegmentWalker::walk(), Points::PlyWriter::write(), and Points::PcdWriter::write().
◆ operator!=()
◆ operator*()
◆ operator*=()
Operators.
References getValue(), and setValue().
◆ operator=()
void Rotation::operator= | ( | const Rotation & | rot | ) |
◆ operator==()
◆ operator[]() [1/2]
double& Base::Rotation::operator[] | ( | unsigned short | usIndex | ) |
◆ operator[]() [2/2]
const double& Base::Rotation::operator[] | ( | unsigned short | usIndex | ) | const |
◆ scaleAngle()
void Rotation::scaleAngle | ( | const double | scaleFactor | ) |
References getValue(), and setValue().
◆ setValue() [1/5]
void Rotation::setValue | ( | const double | q0, |
const double | q1, | ||
const double | q2, | ||
const double | q3 | ||
) |
◆ setValue() [2/5]
void Rotation::setValue | ( | const double | q[4] | ) |
◆ setValue() [3/5]
void Rotation::setValue | ( | const Matrix4D & | matrix | ) |
◆ setValue() [4/5]
void Rotation::setValue | ( | const Vector3d & | axis, |
const double | fAngle | ||
) |
◆ setValue() [5/5]
◆ setYawPitchRoll()
void Rotation::setYawPitchRoll | ( | double | y, |
double | p, | ||
double | r | ||
) |
Euler angles in yaw,pitch,roll notation.
References setValue().
Referenced by Path::Command::getPlacement(), Base::RotationPy::PyInit(), Base::RotationPy::setCustomAttributes(), and Path::yawPitchRoll().
◆ slerp()
Specialty constructors.
References Base::Vector3< double >::epsilon(), DraftVecUtils::neg(), and Rotation().
Referenced by Base::Placement::slerp().
The documentation for this class was generated from the following files:
- src/Base/Rotation.h
- src/Base/Rotation.cpp