OpenLexocad
28.0
|
#include <Rotation.h>
Public Member Functions | |
Rotation () | |
Rotation (const Vector3d &axis, const double fAngle) | |
Rotation (const Matrix4D &matrix) | |
Rotation (const double q[4]) | |
Rotation (const double q0, const double q1, const double q2, const double q3) | |
Rotation (const Vector3d &rotateFrom, const Vector3d &rotateTo) | |
Rotation (const Rotation &rot) | |
const double * | getValue (void) const |
void | getValue (double &q0, double &q1, double &q2, double &q3) const |
void | setValue (const double q0, const double q1, const double q2, const double q3) |
void | getValue (Vector3d &axis, double &rfAngle) const |
If not a null quaternion then axis will be normalized. More... | |
void | getRawValue (Vector3d &axis, double &rfAngle) const |
Does the same as the method above unless normalizing the axis. More... | |
void | getValue (Matrix4D &matrix) const |
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... | |
void | getYawPitchRoll (double &y, double &p, double &r) const |
Euler angles in yaw,pitch,roll notation. More... | |
bool | isIdentity () const |
bool | isNull () const |
Rotation & | invert (void) |
Rotation | inverse (void) const |
Rotation & | operator*= (const Rotation &q) |
Rotation | operator* (const Rotation &q) const |
bool | operator== (const Rotation &q) const |
bool | operator!= (const Rotation &q) const |
double & | operator[] (unsigned short usIndex) |
const double & | operator[] (unsigned short usIndex) const |
void | operator= (const Rotation &) |
void | multVec (const Vector3d &src, Vector3d &dst) const |
Vector3d | multVec (const Vector3d &src) const |
void | scaleAngle (const double scaleFactor) |
bool | isSame (const Rotation &) const |
bool | isSame (const Rotation &, double tol) const |
Static Public Member Functions | |
static Rotation | slerp (const Rotation &rot0, const Rotation &rot1, double t) |
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... | |
Base::Rotation::Rotation | ( | ) |
Construction.
Base::Rotation::Rotation | ( | const Vector3d & | axis, |
const double | fAngle | ||
) |
Base::Rotation::Rotation | ( | const Matrix4D & | matrix | ) |
Base::Rotation::Rotation | ( | const double | q[4] | ) |
Base::Rotation::Rotation | ( | const double | q0, |
const double | q1, | ||
const double | q2, | ||
const double | q3 | ||
) |
Base::Rotation::Rotation | ( | const Rotation & | rot | ) |
void Base::Rotation::getRawValue | ( | Vector3d & | axis, |
double & | rfAngle | ||
) | const |
Does the same as the method above unless normalizing the axis.
void Base::Rotation::getValue | ( | double & | q0, |
double & | q1, | ||
double & | q2, | ||
double & | q3 | ||
) | const |
void Base::Rotation::getValue | ( | Matrix4D & | matrix | ) | const |
void Base::Rotation::getValue | ( | Vector3d & | axis, |
double & | rfAngle | ||
) | const |
If not a null quaternion then axis will be normalized.
const double* Base::Rotation::getValue | ( | void | ) | const |
Methods to get or set rotations.
void Base::Rotation::getYawPitchRoll | ( | double & | y, |
double & | p, | ||
double & | r | ||
) | const |
Euler angles in yaw,pitch,roll notation.
|
static |
Rotation Base::Rotation::inverse | ( | void | ) | const |
Rotation& Base::Rotation::invert | ( | void | ) |
Invert rotations.
bool Base::Rotation::isIdentity | ( | ) | const |
bool Base::Rotation::isNull | ( | ) | const |
bool Base::Rotation::isSame | ( | const Rotation & | ) | const |
bool Base::Rotation::isSame | ( | const Rotation & | , |
double | tol | ||
) | const |
|
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.
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.
bool Base::Rotation::operator!= | ( | const Rotation & | q | ) | const |
void Base::Rotation::operator= | ( | const Rotation & | ) |
bool Base::Rotation::operator== | ( | const Rotation & | q | ) | const |
|
inline |
|
inline |
void Base::Rotation::scaleAngle | ( | const double | scaleFactor | ) |
void Base::Rotation::setValue | ( | const double | q0, |
const double | q1, | ||
const double | q2, | ||
const double | q3 | ||
) |
void Base::Rotation::setValue | ( | const double | q[4] | ) |
void Base::Rotation::setValue | ( | const Matrix4D & | matrix | ) |
void Base::Rotation::setValue | ( | const Vector3d & | axis, |
const double | fAngle | ||
) |
void Base::Rotation::setYawPitchRoll | ( | double | y, |
double | p, | ||
double | r | ||
) |
Euler angles in yaw,pitch,roll notation.
|
static |
Specialty constructors