OpenStructure
Public Member Functions | Static Public Member Functions
Mat4 Class Reference

#include <mat4.hh>

Inherits equality_comparable< Mat4 >, additive< Mat4 >, and multiplicative< Mat4, Real >.

Public Member Functions

 Mat4 ()
 
 Mat4 (Real i00, Real i01, Real i02, Real i03, Real i10, Real i11, Real i12, Real i13, Real i20, Real i21, Real i22, Real i23, Real i30, Real i31, Real i32, Real i33)
 
 Mat4 (const Mat4 &m)
 
 Mat4 (const Mat2 &m)
 
 Mat4 (const Mat3 &m)
 
 Mat4 (const float[16])
 
 Mat4 (const double[16])
 
Mat4operator= (const Mat4 &m)
 
bool operator== (const Mat4 &rhs) const
 
const RealAt (std::size_t r, std::size_t c) const
 
RealAt (std::size_t r, std::size_t c)
 
Realoperator() (std::size_t r, std::size_t c)
 
const Realoperator() (std::size_t r, std::size_t c) const
 
Mat4operator+= (const Mat4 &rhs)
 
Mat4operator-= (const Mat4 &rhs)
 
Mat4operator*= (const Real d)
 
Mat4operator/= (const Real d)
 
Mat4operator*= (const Mat4 &m)
 
Mat3 ExtractRotation () const
 
void PasteRotation (const Mat3 &m)
 
Vec3 ExtractTranslation () const
 
void PasteTranslation (const Vec3 &v)
 
RealData ()
 
const RealData () const
 

Static Public Member Functions

static Mat4 Identity ()
 

Detailed Description

Definition at line 39 of file mat4.hh.

Constructor & Destructor Documentation

◆ Mat4() [1/7]

Mat4 ( )

Default initialization, identity matrix.

◆ Mat4() [2/7]

Mat4 ( Real  i00,
Real  i01,
Real  i02,
Real  i03,
Real  i10,
Real  i11,
Real  i12,
Real  i13,
Real  i20,
Real  i21,
Real  i22,
Real  i23,
Real  i30,
Real  i31,
Real  i32,
Real  i33 
)

In with 16 values in row-major order.

row-major order means that the matrix

| a b c d | | e f g h | | i j k l | | m n o p |

is initialized with (a,b,c,d, e,f,g,h, i,j,k,l, m,n,o,p)

◆ Mat4() [3/7]

Mat4 ( const Mat4 m)

Copy ctor.

◆ Mat4() [4/7]

Mat4 ( const Mat2 m)
explicit

implicit initialization from mat2

◆ Mat4() [5/7]

Mat4 ( const Mat3 m)
explicit

implicit initialization from mat3

◆ Mat4() [6/7]

Mat4 ( const float  [16])
explicit

initialization from array

◆ Mat4() [7/7]

Mat4 ( const double  [16])
explicit

Member Function Documentation

◆ At() [1/2]

Real& At ( std::size_t  r,
std::size_t  c 
)
inline

Definition at line 91 of file mat4.hh.

◆ At() [2/2]

const Real& At ( std::size_t  r,
std::size_t  c 
) const
inline

Definition at line 83 of file mat4.hh.

◆ Data() [1/2]

Real* Data ( )
inline

Definition at line 126 of file mat4.hh.

◆ Data() [2/2]

const Real* Data ( ) const
inline

Definition at line 127 of file mat4.hh.

◆ ExtractRotation()

Mat3 ExtractRotation ( ) const

◆ ExtractTranslation()

Vec3 ExtractTranslation ( ) const

◆ Identity()

static Mat4 Identity ( )
static

◆ operator()() [1/2]

Real& operator() ( std::size_t  r,
std::size_t  c 
)
inline

Definition at line 99 of file mat4.hh.

◆ operator()() [2/2]

const Real& operator() ( std::size_t  r,
std::size_t  c 
) const
inline

Definition at line 105 of file mat4.hh.

◆ operator*=() [1/2]

Mat4& operator*= ( const Mat4 m)

◆ operator*=() [2/2]

Mat4& operator*= ( const Real  d)

◆ operator+=()

Mat4& operator+= ( const Mat4 rhs)

addable op

◆ operator-=()

Mat4& operator-= ( const Mat4 rhs)

subtractable op

◆ operator/=()

Mat4& operator/= ( const Real  d)

◆ operator=()

Mat4& operator= ( const Mat4 m)

assignement op

◆ operator==()

bool operator== ( const Mat4 rhs) const

comparable

◆ PasteRotation()

void PasteRotation ( const Mat3 m)

◆ PasteTranslation()

void PasteTranslation ( const Vec3 v)

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