Stellarium  0.20.4
Public Member Functions | Static Public Member Functions | Data Fields
Matrix3< T > Class Template Reference

A templatized column-major 3x3 matrix compatible with OpenGL (mostly for NormalMatrix calculation). More...

#include <VecMath.hpp>

Public Member Functions

 Matrix3 (T, T, T, T, T, T, T, T, T)
 
 Matrix3 (const T *)
 
 Matrix3 (const Vector3< T > &, const Vector3< T > &, const Vector3< T > &)
 
Matrix3operator= (const T *)
 
void set (T, T, T, T, T, T, T, T, T)
 
T & operator[] (int)
 
 operator T* ()
 
 operator const T * () const
 
Matrix3 operator- (const Matrix3< T > &) const
 
Matrix3 operator+ (const Matrix3< T > &) const
 
Matrix3 operator* (const Matrix3< T > &) const
 
Vector3< T > operator* (const Vector3< T > &) const
 
Matrix3< T > transpose () const
 
Matrix3< T > inverse () const
 
trace () const
 return trace (sum of diagonal elements).
 
angle () const
 return rotational angle
 
void print (void) const
 
QString toString (int fieldWidth=0, char format='g', int precision=-1) const
 

Static Public Member Functions

static Matrix3< T > identity ()
 

Data Fields

r [9]
 

Detailed Description

template<class T>
class Matrix3< T >

Use Mat3d or Mat3f typedef for matrices of doubles and floats respectively.