geolib2
Public Member Functions | Public Attributes | Friends | List of all members
geo::QuaternionT< T > Class Template Reference

#include <math_types.h>

Public Member Functions

dot (const QuaternionT &q) const
 returns dot product More...
 
getW () const
 
getX () const
 
getY () const
 
getZ () const
 
length () const
 Returns the length of the vector. More...
 
length2 () const
 Returns the squared length of the vector. More...
 
void normalize ()
 Normalizes the quaternion. More...
 
QuaternionT normalized () const
 Returns the normalized version of the vector. More...
 
bool operator!= (const QuaternionT &q) const
 
QuaternionT operator* (T s) const
 
QuaternionT operator+ (const QuaternionT &q) const
 returns addition with q More...
 
QuaternionT operator- (const QuaternionT &q) const
 returns this minus q More...
 
QuaternionToperator= (const QuaternionT &q)
 
bool operator== (const QuaternionT &q) const
 
T & operator[] (const uint i)
 
const T & operator[] (const uint i) const
 
 QuaternionT ()
 
 QuaternionT (const QuaternionT &q)=default
 
 QuaternionT (T x_, T y_, T z_, T w_)
 
 ~QuaternionT ()
 

Public Attributes

union {
   struct {
      T   w
 
      T   x
 
      T   y
 
      T   z
 
   } 
 
   T   m [4]
 
}; 
 

Friends

QuaternionT operator* (T s, const QuaternionT &q)
 
std::ostreamoperator<< (std::ostream &out, const QuaternionT &q)
 

Detailed Description

template<typename T>
class geo::QuaternionT< T >

Definition at line 322 of file math_types.h.

Constructor & Destructor Documentation

◆ QuaternionT() [1/3]

template<typename T >
geo::QuaternionT< T >::QuaternionT ( )
inline

Definition at line 327 of file math_types.h.

◆ QuaternionT() [2/3]

template<typename T >
geo::QuaternionT< T >::QuaternionT ( const QuaternionT< T > &  q)
default

◆ QuaternionT() [3/3]

template<typename T >
geo::QuaternionT< T >::QuaternionT ( x_,
y_,
z_,
w_ 
)
inline

Definition at line 329 of file math_types.h.

◆ ~QuaternionT()

template<typename T >
geo::QuaternionT< T >::~QuaternionT ( )
inline

Definition at line 341 of file math_types.h.

Member Function Documentation

◆ dot()

template<typename T >
T geo::QuaternionT< T >::dot ( const QuaternionT< T > &  q) const
inline

returns dot product

Definition at line 356 of file math_types.h.

◆ getW()

template<typename T >
T geo::QuaternionT< T >::getW ( ) const
inline

Definition at line 367 of file math_types.h.

◆ getX()

template<typename T >
T geo::QuaternionT< T >::getX ( ) const
inline

Definition at line 364 of file math_types.h.

◆ getY()

template<typename T >
T geo::QuaternionT< T >::getY ( ) const
inline

Definition at line 365 of file math_types.h.

◆ getZ()

template<typename T >
T geo::QuaternionT< T >::getZ ( ) const
inline

Definition at line 366 of file math_types.h.

◆ length()

template<typename T >
T geo::QuaternionT< T >::length ( ) const
inline

Returns the length of the vector.

Definition at line 374 of file math_types.h.

◆ length2()

template<typename T >
T geo::QuaternionT< T >::length2 ( ) const
inline

Returns the squared length of the vector.

Definition at line 377 of file math_types.h.

◆ normalize()

template<typename T >
void geo::QuaternionT< T >::normalize ( )
inline

Normalizes the quaternion.

Definition at line 383 of file math_types.h.

◆ normalized()

template<typename T >
QuaternionT geo::QuaternionT< T >::normalized ( ) const
inline

Returns the normalized version of the vector.

Definition at line 380 of file math_types.h.

◆ operator!=()

template<typename T >
bool geo::QuaternionT< T >::operator!= ( const QuaternionT< T > &  q) const
inline

Definition at line 351 of file math_types.h.

◆ operator*()

template<typename T >
QuaternionT geo::QuaternionT< T >::operator* ( s) const
inline

Definition at line 371 of file math_types.h.

◆ operator+()

template<typename T >
QuaternionT geo::QuaternionT< T >::operator+ ( const QuaternionT< T > &  q) const
inline

returns addition with q

Definition at line 359 of file math_types.h.

◆ operator-()

template<typename T >
QuaternionT geo::QuaternionT< T >::operator- ( const QuaternionT< T > &  q) const
inline

returns this minus q

Definition at line 362 of file math_types.h.

◆ operator=()

template<typename T >
QuaternionT& geo::QuaternionT< T >::operator= ( const QuaternionT< T > &  q)
inline

Definition at line 331 of file math_types.h.

◆ operator==()

template<typename T >
bool geo::QuaternionT< T >::operator== ( const QuaternionT< T > &  q) const
inline

Definition at line 347 of file math_types.h.

◆ operator[]() [1/2]

template<typename T >
T& geo::QuaternionT< T >::operator[] ( const uint  i)
inline

Definition at line 343 of file math_types.h.

◆ operator[]() [2/2]

template<typename T >
const T& geo::QuaternionT< T >::operator[] ( const uint  i) const
inline

Definition at line 345 of file math_types.h.

Friends And Related Function Documentation

◆ operator*

template<typename T >
QuaternionT operator* ( s,
const QuaternionT< T > &  q 
)
friend

Definition at line 369 of file math_types.h.

◆ operator<<

template<typename T >
std::ostream& operator<< ( std::ostream out,
const QuaternionT< T > &  q 
)
friend

Definition at line 385 of file math_types.h.

Member Data Documentation

◆ @13

union { ... }

◆ m

template<typename T >
T geo::QuaternionT< T >::m[4]

Definition at line 392 of file math_types.h.

◆ w

template<typename T >
T geo::QuaternionT< T >::w

Definition at line 391 of file math_types.h.

◆ x

template<typename T >
T geo::QuaternionT< T >::x

Definition at line 391 of file math_types.h.

◆ y

template<typename T >
T geo::QuaternionT< T >::y

Definition at line 391 of file math_types.h.

◆ z

template<typename T >
T geo::QuaternionT< T >::z

Definition at line 391 of file math_types.h.


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