Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ACG::QuaternionT< Scalar > Class Template Reference

#include <ACG/Math/QuaternionT.hh>

Inheritance diagram for ACG::QuaternionT< Scalar >:
OpenMesh::VectorT< Scalar, DIM >

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
 
Quaternionoperator*= (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

Detailed Description

template<class Scalar>
class ACG::QuaternionT< Scalar >

Quaternion class for representing rotations.

Definition at line 81 of file QuaternionT.hh.


The documentation for this class was generated from the following file: