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

#include <math_types.h>

Public Member Functions

 Mat2T ()
 
 Mat2T (const Mat2T &v)=default
 
 Mat2T (T value)
 
 Mat2T (T xx_, T xy_, T yx_, T yy_)
 
bool operator!= (const Mat2T &m) const
 
T & operator() (int i, int j)
 
const T & operator() (int i, int j) const
 
Mat2T operator* (const Mat2T &m) const
 return this multiplied by m More...
 
Vec2T< T > operator* (const Vec2T< T > &v) const
 
Mat2T operator* (T s) const
 multiplies vector with a scalar More...
 
Mat2T operator+ (const Mat2T &m) const
 returns addition with v More...
 
Mat2T operator- (const Mat2T &m) const
 returns this minus m More...
 
Mat2T operator/ (T s) const
 divides matrix by scalar More...
 
Mat2Toperator= (const Mat2T &v)
 
bool operator== (const Mat2T &m) const
 
T & operator[] (const uint i)
 
const T & operator[] (const uint i) const
 
Mat3T< T > projectTo3d () const
 Expand rotation matrix into 3D, with zero rotation around the 3rd axis. More...
 
Mat2T transpose () const
 
 ~Mat2T ()
 

Static Public Member Functions

static Mat2T identity ()
 

Public Attributes

union {
   struct {
      T   xx
 
      T   xy
 
      T   yx
 
      T   yy
 
   } 
 
   T   m [4]
 
}; 
 

Friends

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

Detailed Description

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

Definition at line 225 of file math_types.h.

Constructor & Destructor Documentation

◆ Mat2T() [1/4]

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

Definition at line 229 of file math_types.h.

◆ Mat2T() [2/4]

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

◆ Mat2T() [3/4]

template<typename T >
geo::Mat2T< T >::Mat2T ( xx_,
xy_,
yx_,
yy_ 
)
inline

Definition at line 231 of file math_types.h.

◆ Mat2T() [4/4]

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

Definition at line 232 of file math_types.h.

◆ ~Mat2T()

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

Definition at line 244 of file math_types.h.

Member Function Documentation

◆ identity()

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

Definition at line 293 of file math_types.h.

◆ operator!=()

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

Definition at line 255 of file math_types.h.

◆ operator()() [1/2]

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

Definition at line 276 of file math_types.h.

◆ operator()() [2/2]

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

Definition at line 280 of file math_types.h.

◆ operator*() [1/3]

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

return this multiplied by m

Definition at line 268 of file math_types.h.

◆ operator*() [2/3]

template<typename T >
Vec2T<T> geo::Mat2T< T >::operator* ( const Vec2T< T > &  v) const
inline

Definition at line 265 of file math_types.h.

◆ operator*() [3/3]

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

multiplies vector with a scalar

Definition at line 285 of file math_types.h.

◆ operator+()

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

returns addition with v

Definition at line 260 of file math_types.h.

◆ operator-()

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

returns this minus m

Definition at line 263 of file math_types.h.

◆ operator/()

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

divides matrix by scalar

Definition at line 288 of file math_types.h.

◆ operator=()

template<typename T >
Mat2T& geo::Mat2T< T >::operator= ( const Mat2T< T > &  v)
inline

Definition at line 234 of file math_types.h.

◆ operator==()

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

Definition at line 250 of file math_types.h.

◆ operator[]() [1/2]

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

Definition at line 246 of file math_types.h.

◆ operator[]() [2/2]

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

Definition at line 248 of file math_types.h.

◆ projectTo3d()

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

Expand rotation matrix into 3D, with zero rotation around the 3rd axis.

Returns
Rotation matrix in 3D

Definition at line 299 of file math_types.h.

◆ transpose()

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

Definition at line 271 of file math_types.h.

Friends And Related Function Documentation

◆ operator*

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

multiplies vector with a scalar

Definition at line 291 of file math_types.h.

◆ operator<<

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

Definition at line 306 of file math_types.h.

Member Data Documentation

◆ @9

union { ... }

◆ m

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

Definition at line 314 of file math_types.h.

◆ xx

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

Definition at line 313 of file math_types.h.

◆ xy

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

Definition at line 313 of file math_types.h.

◆ yx

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

Definition at line 313 of file math_types.h.

◆ yy

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

Definition at line 313 of file math_types.h.


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