#include <Rotation.h>
Public Member Functions | |
void | getValue (Matrix4D &matrix) const |
Returns this rotation in form of a matrix. | |
void | getValue (Vector3d &axis, double &rfAngle) const |
void | getValue (double &q0, double &q1, double &q2, double &q3) const |
const double * | getValue (void) const |
Methods to get or set rotations. | |
void | getYawPitchRoll (double &y, double &p, double &r) const |
Euler angles in yaw,pitch,roll notation. | |
Rotation | inverse (void) const |
Rotation & | invert (void) |
Invert rotations. | |
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. | |
bool | operator== (const Rotation &q) const |
const double & | operator[] (unsigned short usIndex) const |
double & | operator[] (unsigned short usIndex) |
Rotation (const Rotation &rot) | |
Rotation (const Vector3d &rotateFrom, const Vector3d &rotateTo) | |
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. | |
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. | |
Rotation (const Matrix4D &matrix) | |
Rotation (const Vector3d &axis, const double fAngle) | |
Construct a rotation by rotation axis and angle. | |
Rotation () | |
Construction. | |
void | scaleAngle (const double scaleFactor) |
void | setValue (const Vector3d &rotateFrom, const Vector3d &rotateTo) |
void | setValue (const Vector3d &axis, const double fAngle) |
void | setValue (const Matrix4D &matrix) |
void | setValue (const double q[4]) |
void | setValue (const double q0, const double q1, const double q2, const double q3) |
void | setYawPitchRoll (double y, double p, double r) |
Euler angles in yaw,pitch,roll notation. | |
Static Public Member Functions | |
static Rotation | identity (void) |
static Rotation | slerp (const Rotation &rot0, const Rotation &rot1, double t) |
Definition at line 34 of file Rotation.h.
Rotation::Rotation | ( | ) |
Rotation::Rotation | ( | const Vector3d & | axis, | |
const double | fAngle | |||
) |
Construct a rotation by rotation axis and angle.
Definition at line 41 of file Rotation.cpp.
References setValue().
Rotation::Rotation | ( | const Matrix4D & | matrix | ) |
Definition at line 46 of file Rotation.cpp.
References setValue().
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.
Definition at line 55 of file Rotation.cpp.
References setValue().
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.
Definition at line 64 of file Rotation.cpp.
References setValue().
Definition at line 69 of file Rotation.cpp.
References setValue().
Rotation::Rotation | ( | const Rotation & | rot | ) |
Definition at line 74 of file Rotation.cpp.
void Rotation::getValue | ( | Matrix4D & | matrix | ) | const |
Returns this rotation in form of a matrix.
Definition at line 127 of file Rotation.cpp.
References RobotExample::w, MovieTool::x, and MovieTool::y.
void Rotation::getValue | ( | Vector3d & | axis, | |
double & | rfAngle | |||
) | const |
Definition at line 104 of file Rotation.cpp.
References KDL::acos(), SketcherExample::f, scale, Base::Vector3< _Precision >::Set(), KDL::sin(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
void Rotation::getValue | ( | double & | q0, | |
double & | q1, | |||
double & | q2, | |||
double & | q3 | |||
) | const |
Definition at line 87 of file Rotation.cpp.
const double * Rotation::getValue | ( | void | ) | const |
Methods to get or set rotations.
Definition at line 82 of file Rotation.cpp.
Referenced by Data::ComplexGeoData::applyRotation(), Base::RotationPy::getAngle(), Base::RotationPy::getAxis(), Base::RotationPy::getQ(), operator*=(), Base::RotationPy::PyInit(), Base::RotationPy::representation(), scaleAngle(), Base::Placement::toMatrix(), and Gui::View3DInventorPy::viewPosition().
void Rotation::getYawPitchRoll | ( | double & | y, | |
double & | p, | |||
double & | r | |||
) | const |
Euler angles in yaw,pitch,roll notation.
Definition at line 395 of file Rotation.cpp.
References KDL::asin(), KDL::atan2(), and D_PI.
Referenced by Robot::WaypointPy::representation(), Base::PlacementPy::representation(), and Base::RotationPy::toEuler().
Rotation Rotation::identity | ( | void | ) | [static] |
Definition at line 373 of file Rotation.cpp.
References SketcherExample::f, and Rotation().
Rotation Rotation::inverse | ( | void | ) | const |
Definition at line 264 of file Rotation.cpp.
Referenced by Base::Placement::invert().
Rotation & Rotation::invert | ( | void | ) |
Invert rotations.
Definition at line 255 of file Rotation.cpp.
Referenced by Base::RotationPy::invert().
Definition at line 309 of file Rotation.cpp.
References RobotExample::w, Base::Vector3< _Precision >::x, MovieTool::x, Base::Vector3< _Precision >::y, MovieTool::y, and Base::Vector3< _Precision >::z.
Referenced by PartDesign::Revolution::execute(), PartDesign::Pocket::execute(), PartDesign::Pad::execute(), Base::Placement::invert(), Base::RotationPy::multVec(), Base::Placement::multVec(), Base::Placement::operator*=(), and Base::Placement::Placement().
bool Rotation::operator!= | ( | const Rotation & | q | ) | const |
Definition at line 304 of file Rotation.cpp.
Definition at line 289 of file Rotation.cpp.
bool Rotation::operator== | ( | const Rotation & | q | ) | const |
Definition at line 296 of file Rotation.cpp.
const double& Base::Rotation::operator[] | ( | unsigned short | usIndex | ) | const [inline] |
Definition at line 78 of file Rotation.h.
double& Base::Rotation::operator[] | ( | unsigned short | usIndex | ) | [inline] |
Definition at line 77 of file Rotation.h.
void Rotation::scaleAngle | ( | const double | scaleFactor | ) |
Definition at line 328 of file Rotation.cpp.
References getValue(), and setValue().
Definition at line 210 of file Rotation.cpp.
References KDL::acos(), draftlibs::fcvec::angle(), boost::numeric::bindings::atlas::dot(), SketcherExample::f, Base::Vector3< _Precision >::Length(), Base::Vector3< _Precision >::Normalize(), setValue(), RobotExample::t, RobotExample::w, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
void Rotation::setValue | ( | const Vector3d & | axis, | |
const double | fAngle | |||
) |
Definition at line 197 of file Rotation.cpp.
References KDL::cos(), Base::Vector3< _Precision >::Normalize(), scale, KDL::sin(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
void Rotation::setValue | ( | const Matrix4D & | matrix | ) |
Definition at line 166 of file Rotation.cpp.
References SketcherExample::f, k, KDL::sqrt(), and Py::trace().
void Rotation::setValue | ( | const double | q[4] | ) |
Definition at line 157 of file Rotation.cpp.
void Rotation::setValue | ( | const double | q0, | |
const double | q1, | |||
const double | q2, | |||
const double | q3 | |||
) |
Definition at line 95 of file Rotation.cpp.
Referenced by Base::Placement::fromMatrix(), import_NASTRAN(), minBoundingBox(), operator*=(), Base::RotationPy::PyInit(), Rotation(), scaleAngle(), Base::RotationPy::setQ(), and setValue().
void Rotation::setYawPitchRoll | ( | double | y, | |
double | p, | |||
double | r | |||
) |
Euler angles in yaw,pitch,roll notation.
Definition at line 378 of file Rotation.cpp.
References Mod::PartDesign::Scripts::Gear::c1, KDL::cos(), D_PI, and KDL::sin().
Referenced by Base::RotationPy::PyInit().
Definition at line 336 of file Rotation.cpp.
References KDL::acos(), draftlibs::fcvec::angle(), boost::numeric::bindings::atlas::dot(), SketcherExample::f, draftlibs::fcvec::neg(), Rotation(), KDL::sin(), RobotExample::w, MovieTool::x, and MovieTool::y.