Geophysical Inversion and Modelling Library v1.5.4
Loading...
Searching...
No Matches
GIMLI::Quaternion< ValueType > Class Template Reference
+ Collaboration diagram for GIMLI::Quaternion< ValueType >:

Public Member Functions

 Quaternion (ValueType w=1.0, ValueType i=0.0, ValueType j=0.0, ValueType k=0.0)
 
 Quaternion (ValueType re, const Pos &im)
 
 Quaternion (const Pos &xAxis, const Pos &yAxis, const Pos &zAxis)
 
 Quaternion (const Quaternion< ValueType > &q)
 
Quaternionoperator= (const Quaternion< ValueType > &q)
 
const ValueType operator[] (const size_t i) const
 
ValueType & operator[] (const size_t i)
 
Quaternionoperator/= (const ValueType &s)
 
Quaternionoperator*= (const ValueType &s)
 
void createFromAxisAngle (const Pos &axis, double angle)
 
template<class Matrix>
void rotMatrix (Matrix &rot) const
 
ValueType norm () const
 
ValueType length () const
 
void normalise ()
 
void setRe (const ValueType re)
 
ValueType re () const
 
void setIm (const Pos &im)
 
Pos im () const
 

Protected Member Functions

void copy_ (const Quaternion< ValueType > &q)
 

Protected Attributes

ValueType re_
 
Pos im_