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

#include <math_types.h>

Public Member Functions

Vec3T< T > getColumn (int i) const
 
void getRotation (QuaternionT< T > &q) const
 
Vec3T< T > getRow (int i) const
 
 Mat3T ()
 
 Mat3T (const Mat3T &v)=default
 
 Mat3T (const T *values)
 
 Mat3T (T value)
 
 Mat3T (T xx_, T xy_, T xz_, T yx_, T yy_, T yz_, T zx_, T zy_, T zz_)
 
 Mat3T (Vec3T< T > x, Vec3T< T > y, Vec3T< T > z)
 
void normalize ()
 
Mat3T normalized ()
 
bool operator!= (const Mat3T &m) const
 
T & operator() (int i, int j)
 
const T & operator() (int i, int j) const
 
Mat3T operator* (const Mat3T &m) const
 
Vec3T< T > operator* (const Vec3T< T > &v) const
 
Mat3T operator* (T s) const
 multiplies vector with a scalar More...
 
Mat3T operator+ (const Mat3T &m) const
 returns addition with v More...
 
Mat3T operator- (const Mat3T &m) const
 returns this minus m More...
 
Mat3T operator/ (T s) const
 divides matrix by scalar More...
 
Mat3Toperator= (const Mat3T &m)
 
bool operator== (const Mat3T &m) const
 
T & operator[] (const uint i)
 
const T & operator[] (const uint i) const
 
Mat2T< T > projectTo2d () const
 Drops the rotation of the 3rd coordinate. More...
 
void setRotation (const QuaternionT< T > &q)
 
void setRPY (T roll, T pitch, T yaw)
 
Mat3T transpose () const
 
 ~Mat3T ()
 

Static Public Member Functions

static Mat3T identity ()
 

Public Attributes

union {
   struct {
      T   xx
 
      T   xy
 
      T   xz
 
      T   yx
 
      T   yy
 
      T   yz
 
      T   zx
 
      T   zy
 
      T   zz
 
   } 
 
   T   m [9]
 
}; 
 

Friends

Mat3T operator* (T s, const Mat3T &m)
 multiplies vector with a scalar More...
 
std::ostreamoperator<< (std::ostream &out, const Mat3T &m)
 

Detailed Description

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

Definition at line 16 of file math_types.h.

Constructor & Destructor Documentation

◆ Mat3T() [1/6]

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

Definition at line 403 of file math_types.h.

◆ Mat3T() [2/6]

template<typename T >
geo::Mat3T< T >::Mat3T ( const Mat3T< T > &  v)
default

◆ Mat3T() [3/6]

template<typename T >
geo::Mat3T< T >::Mat3T ( xx_,
xy_,
xz_,
yx_,
yy_,
yz_,
zx_,
zy_,
zz_ 
)
inline

Definition at line 406 of file math_types.h.

◆ Mat3T() [4/6]

template<typename T >
geo::Mat3T< T >::Mat3T ( value)
inline

Definition at line 409 of file math_types.h.

◆ Mat3T() [5/6]

template<typename T >
geo::Mat3T< T >::Mat3T ( const T *  values)
inline

Definition at line 411 of file math_types.h.

◆ Mat3T() [6/6]

template<typename T >
geo::Mat3T< T >::Mat3T ( Vec3T< T >  x,
Vec3T< T >  y,
Vec3T< T >  z 
)
inline

Definition at line 413 of file math_types.h.

◆ ~Mat3T()

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

Definition at line 425 of file math_types.h.

Member Function Documentation

◆ getColumn()

template<typename T >
Vec3T<T> geo::Mat3T< T >::getColumn ( int  i) const
inline

Definition at line 495 of file math_types.h.

◆ getRotation()

template<typename T >
void geo::Mat3T< T >::getRotation ( QuaternionT< T > &  q) const
inline

Definition at line 520 of file math_types.h.

◆ getRow()

template<typename T >
Vec3T<T> geo::Mat3T< T >::getRow ( int  i) const
inline

Definition at line 491 of file math_types.h.

◆ identity()

template<typename T >
static Mat3T geo::Mat3T< T >::identity ( )
inlinestatic

Definition at line 516 of file math_types.h.

◆ normalize()

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

Definition at line 580 of file math_types.h.

◆ normalized()

template<typename T >
Mat3T geo::Mat3T< T >::normalized ( )
inline

Definition at line 587 of file math_types.h.

◆ operator!=()

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

Definition at line 437 of file math_types.h.

◆ operator()() [1/2]

template<typename T >
T& geo::Mat3T< T >::operator() ( int  i,
int  j 
)
inline

Definition at line 472 of file math_types.h.

◆ operator()() [2/2]

template<typename T >
const T& geo::Mat3T< T >::operator() ( int  i,
int  j 
) const
inline

Definition at line 476 of file math_types.h.

◆ operator*() [1/3]

template<typename T >
Mat3T geo::Mat3T< T >::operator* ( const Mat3T< T > &  m) const
inline

Definition at line 457 of file math_types.h.

◆ operator*() [2/3]

template<typename T >
Vec3T<T> geo::Mat3T< T >::operator* ( const Vec3T< T > &  v) const
inline

Definition at line 451 of file math_types.h.

◆ operator*() [3/3]

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

multiplies vector with a scalar

Definition at line 463 of file math_types.h.

◆ operator+()

template<typename T >
Mat3T geo::Mat3T< T >::operator+ ( const Mat3T< T > &  m) const
inline

returns addition with v

Definition at line 442 of file math_types.h.

◆ operator-()

template<typename T >
Mat3T geo::Mat3T< T >::operator- ( const Mat3T< T > &  m) const
inline

returns this minus m

Definition at line 447 of file math_types.h.

◆ operator/()

template<typename T >
Mat3T geo::Mat3T< T >::operator/ ( s) const
inline

divides matrix by scalar

Definition at line 468 of file math_types.h.

◆ operator=()

template<typename T >
Mat3T& geo::Mat3T< T >::operator= ( const Mat3T< T > &  m)
inline

Definition at line 416 of file math_types.h.

◆ operator==()

template<typename T >
bool geo::Mat3T< T >::operator== ( const Mat3T< T > &  m) const
inline

Definition at line 431 of file math_types.h.

◆ operator[]() [1/2]

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

Definition at line 427 of file math_types.h.

◆ operator[]() [2/2]

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

Definition at line 429 of file math_types.h.

◆ projectTo2d()

template<typename T >
Mat2T<T> geo::Mat3T< T >::projectTo2d ( ) const
inline

Drops the rotation of the 3rd coordinate.

Returns
Rotation matrix in 2D

Definition at line 563 of file math_types.h.

◆ setRotation()

template<typename T >
void geo::Mat3T< T >::setRotation ( const QuaternionT< T > &  q)
inline

Definition at line 546 of file math_types.h.

◆ setRPY()

template<typename T >
void geo::Mat3T< T >::setRPY ( roll,
pitch,
yaw 
)
inline

Definition at line 499 of file math_types.h.

◆ transpose()

template<typename T >
Mat3T geo::Mat3T< T >::transpose ( ) const
inline

Definition at line 485 of file math_types.h.

Friends And Related Function Documentation

◆ operator*

template<typename T >
Mat3T operator* ( s,
const Mat3T< T > &  m 
)
friend

multiplies vector with a scalar

Definition at line 481 of file math_types.h.

◆ operator<<

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

Definition at line 568 of file math_types.h.

Member Data Documentation

◆ @17

union { ... }

◆ m

template<typename T >
T geo::Mat3T< T >::m[9]

Definition at line 577 of file math_types.h.

◆ xx

template<typename T >
T geo::Mat3T< T >::xx

Definition at line 576 of file math_types.h.

◆ xy

template<typename T >
T geo::Mat3T< T >::xy

Definition at line 576 of file math_types.h.

◆ xz

template<typename T >
T geo::Mat3T< T >::xz

Definition at line 576 of file math_types.h.

◆ yx

template<typename T >
T geo::Mat3T< T >::yx

Definition at line 576 of file math_types.h.

◆ yy

template<typename T >
T geo::Mat3T< T >::yy

Definition at line 576 of file math_types.h.

◆ yz

template<typename T >
T geo::Mat3T< T >::yz

Definition at line 576 of file math_types.h.

◆ zx

template<typename T >
T geo::Mat3T< T >::zx

Definition at line 576 of file math_types.h.

◆ zy

template<typename T >
T geo::Mat3T< T >::zy

Definition at line 576 of file math_types.h.

◆ zz

template<typename T >
T geo::Mat3T< T >::zz

Definition at line 576 of file math_types.h.


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