CellModules
MecaCell::Matrix4x4 Struct Reference

#include <matrix4x4.h>

Public Member Functions

 Matrix4x4 ()
 
 Matrix4x4 (std::array< std::array< double, 4 >, 4 > a)
 
template<typename V >
void scale (const V &s)
 Multiplies this matrix by another that scales coordinates by the components of the given vector. More...
 
template<typename V >
void translate (const V &v)
 Multiplies this matrix by another that translates coordinates by the components of the given vector. More...
 
template<typename R >
void rotate (const R &r)
 Multiplies this matrix by another that rotates coordinates by the according to the given rotation. More...
 
Matrix4x4 operator* (const Matrix4x4 &N)
 
template<typename V >
operator* (const V &v)
 
std::array< double, 4 > & operator[] (const size_t index)
 
const std::array< double, 4 > & operator[] (const size_t index) const
 

Public Attributes

std::array< std::array< double, 4 >, 4 > m
 

Friends

ostream & operator<< (ostream &, const Matrix4x4 &)
 

Detailed Description

Definition at line 9 of file matrix4x4.h.

Constructor & Destructor Documentation

◆ Matrix4x4() [1/2]

MecaCell::Matrix4x4::Matrix4x4 ( )
inline

Definition at line 12 of file matrix4x4.h.

◆ Matrix4x4() [2/2]

MecaCell::Matrix4x4::Matrix4x4 ( std::array< std::array< double, 4 >, 4 >  a)
inline

Definition at line 13 of file matrix4x4.h.

Member Function Documentation

◆ operator*() [1/2]

Matrix4x4 MecaCell::Matrix4x4::operator* ( const Matrix4x4 N)
inline

Definition at line 69 of file matrix4x4.h.

◆ operator*() [2/2]

template<typename V >
V MecaCell::Matrix4x4::operator* ( const V &  v)
inline

Definition at line 103 of file matrix4x4.h.

◆ operator[]() [1/2]

std::array< double, 4 > & MecaCell::Matrix4x4::operator[] ( const size_t  index)
inline

Definition at line 109 of file matrix4x4.h.

◆ operator[]() [2/2]

const std::array< double, 4 > & MecaCell::Matrix4x4::operator[] ( const size_t  index) const
inline

Definition at line 110 of file matrix4x4.h.

◆ rotate()

template<typename R >
void MecaCell::Matrix4x4::rotate ( const R &  r)
inline

Multiplies this matrix by another that rotates coordinates by the according to the given rotation.

Template Parameters
VRotation type
Parameters
rthe rotation

Definition at line 48 of file matrix4x4.h.

◆ scale()

template<typename V >
void MecaCell::Matrix4x4::scale ( const V &  s)
inline

Multiplies this matrix by another that scales coordinates by the components of the given vector.

Template Parameters
V3D vector type
Parameters
sscale vector

Definition at line 22 of file matrix4x4.h.

◆ translate()

template<typename V >
void MecaCell::Matrix4x4::translate ( const V &  v)
inline

Multiplies this matrix by another that translates coordinates by the components of the given vector.

Template Parameters
V3D vector type
Parameters
vtranslation vector

Definition at line 35 of file matrix4x4.h.

Friends And Related Function Documentation

◆ operator<<

ostream & operator<< ( ostream &  out,
const Matrix4x4 M 
)
friend

Definition at line 116 of file matrix4x4.h.

Member Data Documentation

◆ m

std::array<std::array<double, 4>, 4> MecaCell::Matrix4x4::m
Initial value:
= {
{{{1, 0, 0, 0}}, {{0, 1, 0, 0}}, {{0, 0, 1, 0}}, {{0, 0, 0, 1}}}}

Definition at line 10 of file matrix4x4.h.


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