LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
loos::Matrix44< T > Class Template Reference

Specialized 4x4 Matrix class for handling coordinate transforms. More...

#include <Matrix44.hpp>

Public Member Functions

 Matrix44 ()
 Create a new identity matrix.
 
 Matrix44 (const T v)
 Create a new matrix with all elements set to v.
 
void zero (void)
 Zero all elements.
 
void identity (void)
 Identity matrix.
 
const T & operator() (const int j, const int i) const
 Index the matrix element at row j and col i.
 
T & operator() (const int j, const int i)
 Index the matrix element at row j and col i.
 
T & operator[] (const int i)
 Allow access to the linear array of matrix elements.
 
const T & operator[] (const int i) const
 Allow access to the linear array of matrix elements.
 
T * data (void)
 Returns the array pointer.
 
Matrix44< T > & operator+= (const Matrix44< T > &rhs)
 Addition of two matrices.
 
Matrix44< T > operator+ (const Matrix44< T > &rhs)
 Addition of two matrices.
 
Matrix44< T > & operator-= (const Matrix44< T > &rhs)
 Subtracting matrices.
 
Matrix44< T > operator- (const Matrix44< T > &rhs)
 Subtracting matrices.
 
Matrix44< T > & operator*= (const Matrix44< T > &rhs)
 Matrix-matrix multiply...
 
Matrix44< T > operator* (const Matrix44< T > &rhs) const
 Matrix-matrix multiply.
 
Matrix44< T > & operator*= (const T x)
 Multiplication by a constant.
 
Matrix44< T > operator* (const T x)
 Multiplication by a constant.
 

Friends

Matrix44< T > operator+ (const T lhs, const Matrix44< T > &rhs)
 
Matrix44< T > operator- (const T lhs, const Matrix44< T > &rhs)
 Subtraction of a constant from a matrix.
 
Coord< T > operator* (const Matrix44< T > &, const Coord< T > &)
 Friend declaration for matrix-vector multiply...
 
Matrix44< T > operator* (const T x, const Matrix44< T > &rhs)
 Handle the constant * matrix case.
 
std::ostream & operator<< (std::ostream &os, const Matrix44 &m)
 Output the matrix in pseudo-XML.
 

Detailed Description

template<class T>
class loos::Matrix44< T >

Specialized 4x4 Matrix class for handling coordinate transforms.

Member Function Documentation

◆ operator*=()

template<class T >
Matrix44< T > & loos::Matrix44< T >::operator*= ( const T x)
inline

Multiplication by a constant.

Each element is multiplied by the same constant This operator [hopefully] prevents auto-casting of the constant to a matrix and then a matrix-matrix multiply, but beware...

Friends And Related Symbol Documentation

◆ operator*

template<class T >
Coord< T > operator* ( const Matrix44< T > & M,
const Coord< T > & v )
friend

Friend declaration for matrix-vector multiply...

Matrix-vector multiply This has to be a friend outside the class for GCC to be happy...

◆ operator+

template<class T >
Matrix44< T > operator+ ( const T lhs,
const Matrix44< T > & rhs )
friend

Addition of a matrix and a constant. Each element in the matrix is added with the constant... Relies on the constructor from a constant to handle the case where you have a matrix + a constant...


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