Developer Documentation
|
#include <ACG/Math/QuaternionT.hh>
Public Types | |
typedef VectorT< Scalar, 4 > | Base |
typedef QuaternionT< Scalar > | Quaternion |
typedef VectorT< Scalar, 3 > | Vec3 |
typedef VectorT< Scalar, 4 > | Vec4 |
typedef Matrix4x4T< Scalar > | Matrix |
Public Member Functions | |
QuaternionT (Scalar _w=1.0, Scalar _x=0.0, Scalar _y=0.0, Scalar _z=0.0) | |
construct from 4 Scalars (default) | |
QuaternionT (const Vec3 &_p) | |
construct from 3D point (pure imaginary quaternion) | |
QuaternionT (const Vec4 &_p) | |
construct from 4D vector | |
QuaternionT (Vec3 _axis, Scalar _angle) | |
construct from rotation axis and angle (in radians) | |
template<class MatrixT > | |
QuaternionT (const MatrixT &_rot) | |
construct from rotation matrix (only valid for rotation matrices!) | |
void | identity () |
identity rotation | |
Quaternion | conjugate () const |
conjugate quaternion | |
Quaternion | invert () const |
invert quaternion | |
Quaternion | operator* (const Quaternion &_q) const |
quaternion * quaternion | |
Quaternion & | operator*= (const Quaternion &_q) |
quaternion *= quaternion | |
template<class Vec3T > | |
Vec3T | rotate (const Vec3T &_v) const |
rotate vector | |
void | axis_angle (Vec3 &_axis, Scalar &_angle) const |
get rotation axis and angle (only valid for unit quaternions!) | |
Matrix | rotation_matrix () const |
cast to rotation matrix | |
Matrix | right_mult_matrix () const |
get matrix for mult from right (p*q = Qp) | |
Matrix | left_mult_matrix () const |
get matrix for mult from left (q*p = Qp) | |
template<class MatrixT > | |
void | init_from_matrix (const MatrixT &_rot) |
get quaternion from rotation matrix | |
Quaternion | exponential () const |
quaternion exponential (for unit quaternions) | |
Quaternion | logarithm () const |
quaternion logarithm (for unit quaternions) | |
void | print_info () |
Additional Inherited Members | |
Related Functions inherited from OpenMesh::VectorT< Scalar, DIM > | |
template<typename Scalar1 , typename Scalar2 , int N> | |
VectorT< Scalar1, N > | operator* (Scalar2 _s, const VectorT< Scalar1, N > &_v) |
template<typename Scalar , int N> | |
Scalar | dot (const VectorT< Scalar, N > &_v1, const VectorT< Scalar, N > &_v2) |
template<typename Scalar , int N> | |
VectorT< Scalar, N > | cross (const VectorT< Scalar, N > &_v1, const VectorT< Scalar, N > &_v2) |
template<typename Scalar , int DIM> | |
Scalar | dot (const VectorT< Scalar, DIM > &_v1, const VectorT< Scalar, DIM > &_v2) |
template<typename LScalar , typename RScalar , int DIM> | |
auto | cross (const VectorT< LScalar, DIM > &_v1, const VectorT< RScalar, DIM > &_v2) -> decltype(_v1%_v2) |
template<typename Scalar , int DIM> | |
void | swap (VectorT< Scalar, DIM > &_v1, VectorT< Scalar, DIM > &_v2) noexcept(noexcept(_v1.swap(_v2))) |
template<typename Scalar1 , typename Scalar2 , int N> | |
VectorT< Scalar1, N > | operator* (Scalar2 _s, const VectorT< Scalar1, N > &_v) |
template<typename Scalar , int N> | |
Scalar | dot (const VectorT< Scalar, N > &_v1, const VectorT< Scalar, N > &_v2) |
template<typename Scalar , int N> | |
VectorT< Scalar, N > | cross (const VectorT< Scalar, N > &_v1, const VectorT< Scalar, N > &_v2) |
Quaternion class for representing rotations.
Definition at line 81 of file QuaternionT.hh.