![]() |
PIP 5.6.1
Platform-Independent Primitives
|
Quaternion for representing 3D rotations and orientations. More...
#include <piquaternion.h>
Public Member Functions | |
| PIQuaternion (const PIMathVectorT3d &u=PIMathVectorT3d(), double a=0.) | |
| Construct quaternion from rotation axis and angle. | |
| PIQuaternion | conjugate () const |
| Returns conjugate of this quaternion (negated vector part) | |
| PIQuaternion | rotated (const PIMathVectorT3d &u, double a) const |
| Returns new quaternion rotated around axis u by angle a. | |
| void | rotate (const PIMathVectorT3d &u, double a) |
| Rotate this quaternion around axis u by angle a. | |
| void | normalize () |
| Normalize quaternion to unit length. | |
| double & | scalar () |
| Get/Set scalar component. | |
| double | scalar () const |
| Get scalar component. | |
| PIMathVectorT3d | vector () const |
| Returns vector part of quaternion. | |
| PIMathVectorT3d | eyler () const |
| Returns Euler angles from quaternion. | |
| PIMathMatrixT33d | rotationMatrix () const |
| Returns 3x3 rotation matrix from quaternion. | |
| void | axis (PIMathVectorT3d *ret) const |
| Extracts rotation axis from quaternion. | |
Static Public Member Functions | |
| static PIQuaternion | fromEyler (double ax, double ay, double az) |
| Create quaternion from Euler angles (roll, pitch, yaw) | |
| static PIQuaternion | fromRotationMatrix (const PIMathMatrixT33d &m) |
| Create quaternion from 3x3 rotation matrix. | |
| static PIQuaternion | fromAngles (double ax, double ay, double az) |
| Create quaternion from rotation angles. | |
| static PIQuaternion | fromAngles2 (double ax, double ay, double az) |
| Create quaternion from rotation angles (alternative method) | |
Quaternion for representing 3D rotations and orientations.