OpenStructure
|
#include <quat.hh>
Public Member Functions | |
Quat () | |
Quat (Real w, Real x, Real y, Real z) | |
Quat (Real angle, const geom::Vec3 &axis) | |
Quat (const Mat3 &rotmat) | |
Mat3 | ToRotationMatrix () const |
Vec3 | GetAxis () const |
Real | GetAngle () const |
Quat | operator- () |
Quat & | operator+= (const Quat &q) |
Quat & | operator-= (const Quat &q) |
Quat & | operator*= (Real s) |
Quat & | operator*= (const Quat &q) |
Quat & | operator/= (Real s) |
Quat & | operator/= (const Quat &q) |
bool | operator== (const Quat &q) const |
Vec3 | Rotate (const Vec3 &vec) const |
Data Fields | |
Real | w |
Real | x |
Real | y |
Real | z |
unit quaternion
The four components of a unit quaternion can be seen as [cos(theta),sin(theta)*x,sin(theta)*y,sin(theta)*z], where (x,y,z) constitute the unit vector of the rotation axis, and theta the half-rotation angle around that axis.
Quat | ( | ) |
Quat | ( | Real | angle, |
const geom::Vec3 & | axis | ||
) |
Real GetAngle | ( | ) | const |
Vec3 GetAxis | ( | ) | const |
Quat operator- | ( | ) |
bool operator== | ( | const Quat & | q | ) | const |
Mat3 ToRotationMatrix | ( | ) | const |