# Atmel Software Framework

math::matrix3d Class Reference

3-Dimensional Matrix Class

#include <matrix.h>

## Public Member Functions

calculate the adjoint of a 3x3 matrix More...

const scalar determinant () const

void identity ()

const matrix3d inverse () const
calculate the inverse of a 3x3 matrix More...

void transpose ()

void zero ()

class construction and destruction
matrix3d ()

matrix3d (const vector3d &c0, const vector3d &c1, const vector3d &c2)

matrix3d (scalar m11, scalar m12, scalar m13, scalar m21, scalar m22, scalar m23, scalar m31, scalar m32, scalar m33)

matrix3d (const scalar *m)

class member operators
scalaroperator() (int i, int j)

const scalaroperator() (int i, int j) const

const vector3d operator* (const vector3d &v) const

const matrix3doperator+= (const matrix3d &b)

const matrix3doperator-= (const matrix3d &b)

const matrix3doperator*= (const matrix3d &b)

const matrix3doperator*= (const scalar &s)

const matrix3d operator+ (const matrix3d &m) const

const matrix3d operator- (const matrix3d &m) const

const matrix3d operator* (const matrix3d &m) const

## Friends

class friend operators
const matrix3d operator* (const scalar &s, const matrix3d &A)

const matrix3d operator- (const matrix3d &A)

 math::matrix3d::matrix3d ( )
inline
 math::matrix3d::matrix3d ( const vector3d & c0, const vector3d & c1, const vector3d & c2 )
inline

References c0, c1, and c2.

 math::matrix3d::matrix3d ( scalar m11, scalar m12, scalar m13, scalar m21, scalar m22, scalar m23, scalar m31, scalar m32, scalar m33 )
inline
 math::matrix3d::matrix3d ( const scalar * m )
inlineexplicit
 const matrix3d math::matrix3d::adjoint ( ) const

calculate the adjoint of a 3x3 matrix

Calculate the caller's adjoint matrix. Given a square matrix 'A', where 'C[i,j]' is the cofactor of 'a[i,j]', then the matrix:

$\left[ \begin{array}{cccc} C_{11} & C_{12} & ... & C_{1n}\\ C_{21} & C_{22} & ... & C_{2n}\\ : & : & & :\\ C_{n1} & C_{n2} & ... & C_{nn} \end{array} \right]$

is the 'matrix of cofactors from A'. The transpose of this matrix is the 'adjoint of A'.

Return values
 math::matrix3d The adjoint of the invoking object.

References _m11, _m12, _m13, _m21, _m22, _m23, _m31, _m32, _m33, math::det(), and matrix3d().

 const scalar math::matrix3d::determinant ( ) const
inline

References math::vector3d::dot().

 void math::matrix3d::identity ( )
inline
 const matrix3d math::matrix3d::inverse ( ) const

calculate the inverse of a 3x3 matrix

Calculate the caller's inverse matrix. If 'A' and 'B' are square matrices of the same size such that 'AB = BA = I' (where 'I' is the identity matrix), then 'A' is 'invertible' and 'B' is an 'inverse' of 'A'. If no such matrix 'B' exists, then 'A' is 'singular'.

Return values
 math::matrix3d The inverse of the invoking matrix (if nonsingular), else the zero matrix if not invertible (singular).
 scalar& math::matrix3d::operator() ( int i, int j )
inline

References i, and j.

 const scalar& math::matrix3d::operator() ( int i, int j ) const
inline

References i, and j.

 const vector3d math::matrix3d::operator* ( const vector3d & v ) const
inline
 const matrix3d math::matrix3d::operator* ( const matrix3d & m ) const
inline

References matrix3d().

 const matrix3d& math::matrix3d::operator*= ( const matrix3d & b )
inline
 const matrix3d& math::matrix3d::operator*= ( const scalar & s )
inline

References s.

 const matrix3d math::matrix3d::operator+ ( const matrix3d & m ) const
inline

References matrix3d().

 const matrix3d& math::matrix3d::operator+= ( const matrix3d & b )
inline
 const matrix3d math::matrix3d::operator- ( const matrix3d & m ) const
inline

References matrix3d().

 const matrix3d& math::matrix3d::operator-= ( const matrix3d & b )
inline
 void math::matrix3d::transpose ( )
inline
 void math::matrix3d::zero ( )
inline
 const matrix3d operator* ( const scalar & s, const matrix3d & A )
friend
 const matrix3d operator- ( const matrix3d & A )
friend