OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Data Fields
Quat Class Reference

#include <quat.hh>

Inherits additive< Quat >, multiplicative< Quat, Real >, and multiplicative< Quat, Quat >.

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*= ( Real  s)
Quat& operator*= ( const Quat q)
Quat& operator+= ( const Quat q)
Quat operator- ( )
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
Mat3 ToRotationMatrix ( ) const

Field Documentation

Real w

Definition at line 103 of file quat.hh.

Real x

Definition at line 103 of file quat.hh.

Real y

Definition at line 103 of file quat.hh.

Real z

Definition at line 103 of file quat.hh.


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