Quat Class Reference

unit quaternion More...

#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- ()
Quatoperator+= (const Quat &q)
Quatoperator-= (const Quat &q)
Quatoperator*= (Real s)
Quatoperator*= (const Quat &q)
Quatoperator/= (Real s)
Quatoperator/= (const Quat &q)
bool operator== (const Quat &q) const
bool operator!= (const Quat &q) const
Vec3 Rotate (const Vec3 &vec) const

Data Fields

Real w
Real x
Real y
Real z

Detailed Description

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.

Definition at line 54 of file quat.hh.


Constructor & Destructor Documentation

Quat (  ) 
Quat ( Real  w,
Real  x,
Real  y,
Real  z 
)
Quat ( Real  angle,
const geom::Vec3 axis 
)
Quat ( const Mat3 rotmat  ) 

Member Function Documentation

Real GetAngle (  )  const
Vec3 GetAxis (  )  const
bool operator!= ( const Quat q  )  const [inline]

Definition at line 96 of file quat.hh.

Quat& operator*= ( const Quat q  ) 
Quat& operator*= ( Real  s  ) 
Quat& operator+= ( const Quat q  ) 
Quat operator- (  ) 
Quat& operator-= ( const Quat q  ) 
Quat& operator/= ( const Quat q  ) 
Quat& operator/= ( Real  s  ) 
bool operator== ( const Quat q  )  const
Vec3 Rotate ( const Vec3 vec  )  const
Mat3 ToRotationMatrix (  )  const

Field Documentation

Definition at line 103 of file quat.hh.

Definition at line 103 of file quat.hh.

Definition at line 103 of file quat.hh.

Definition at line 103 of file quat.hh.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 10 Nov 2016 for OpenStructure by  doxygen 1.6.1