CMSC23700 Common Code Library
Support code for CS23700 programming projects
cs237::__detail::mat3x3< T > Struct Template Reference

template class for 3x3 matrices More...

#include <cs237-mat3x3.hxx>

Public Member Functions

 mat3x3 ()
 create an uninitialized matrix More...
 
 mat3x3 (mat3x3 const &m)
 copy constructor More...
 
 mat3x3 (T m00, T m10, T m20, T m01, T m11, T m21, T m02, T m12, T m22)
 construct a matrix from individual elements given in column-major order More...
 
 mat3x3 (vec3< T > const &c0, vec3< T > const &c1, vec3< T > const &c2)
 construct a matrix from column vectors More...
 
 mat3x3 (mat4x4< T > const &mm)
 extract the upper-left 3x3 matrix from a 4x4 matrix More...
 
 mat3x3 (mat3x4< T > const &mm)
 extract the upper-left 3x3 matrix from a 3x4 matrix More...
 
 mat3x3 (mat4x3< T > const &mm)
 extract the upper-left 3x3 matrix from a 4x3 matrix More...
 
 mat3x3 (T const &x)
 construct a diagonal matrix with diagonal elements initialized to x More...
 
mat3x3operator= (mat3x3 const &mm)
 
mat3x3operator+= (T const &s)
 
mat3x3operator+= (mat3x3 const &mm)
 
mat3x3operator-= (T const &s)
 
mat3x3operator-= (mat3x3 const &mm)
 
mat3x3operator*= (T const &s)
 
mat3x3operator*= (mat3x3 const &mm)
 
mat3x3 inverse () const
 return the inverse of this matrix More...
 
mat3x3 transpose () const
 return the transpose of this matrix More...
 
determinant () const
 return the determiniant of this matrix More...
 
vec3< T > & operator[] (unsigned int const &i)
 return the i'th column vector More...
 
vec3< T > const & operator[] (unsigned int const &i) const
 

Public Attributes

vec3< T > cv [3]
 

Detailed Description

template<typename T>
struct cs237::__detail::mat3x3< T >

template class for 3x3 matrices

Constructor & Destructor Documentation

template<typename T>
cs237::__detail::mat3x3< T >::mat3x3 ( )
inline

create an uninitialized matrix

template<typename T >
cs237::__detail::mat3x3< T >::mat3x3 ( mat3x3< T > const &  m)
inline

copy constructor

template<typename T >
cs237::__detail::mat3x3< T >::mat3x3 ( m00,
m10,
m20,
m01,
m11,
m21,
m02,
m12,
m22 
)
inlineexplicit

construct a matrix from individual elements given in column-major order

template<typename T >
cs237::__detail::mat3x3< T >::mat3x3 ( vec3< T > const &  c0,
vec3< T > const &  c1,
vec3< T > const &  c2 
)
inlineexplicit

construct a matrix from column vectors

template<typename T >
cs237::__detail::mat3x3< T >::mat3x3 ( mat4x4< T > const &  mm)
inlineexplicit

extract the upper-left 3x3 matrix from a 4x4 matrix

template<typename T >
cs237::__detail::mat3x3< T >::mat3x3 ( mat3x4< T > const &  mm)
inlineexplicit

extract the upper-left 3x3 matrix from a 3x4 matrix

template<typename T >
cs237::__detail::mat3x3< T >::mat3x3 ( mat4x3< T > const &  mm)
inlineexplicit

extract the upper-left 3x3 matrix from a 4x3 matrix

template<typename T >
cs237::__detail::mat3x3< T >::mat3x3 ( T const &  x)
inlineexplicit

construct a diagonal matrix with diagonal elements initialized to x

Member Function Documentation

template<typename T >
T cs237::__detail::mat3x3< T >::determinant ( ) const
inline

return the determiniant of this matrix

template<typename T >
mat3x3< T > cs237::__detail::mat3x3< T >::inverse ( ) const
inline

return the inverse of this matrix

template<typename T >
mat3x3< T > & cs237::__detail::mat3x3< T >::operator*= ( T const &  s)
inline
template<typename T >
mat3x3< T > & cs237::__detail::mat3x3< T >::operator*= ( mat3x3< T > const &  mm)
inline
template<typename T >
mat3x3< T > & cs237::__detail::mat3x3< T >::operator+= ( T const &  s)
inline
template<typename T >
mat3x3< T > & cs237::__detail::mat3x3< T >::operator+= ( mat3x3< T > const &  mm)
inline
template<typename T >
mat3x3< T > & cs237::__detail::mat3x3< T >::operator-= ( T const &  s)
inline
template<typename T >
mat3x3< T > & cs237::__detail::mat3x3< T >::operator-= ( mat3x3< T > const &  mm)
inline
template<typename T >
mat3x3< T > & cs237::__detail::mat3x3< T >::operator= ( mat3x3< T > const &  mm)
inline
template<typename T >
vec3< T > & cs237::__detail::mat3x3< T >::operator[] ( unsigned int const &  i)
inline

return the i'th column vector

return the i'th column vector of the matrix

template<typename T >
vec3< T > const & cs237::__detail::mat3x3< T >::operator[] ( unsigned int const &  i) const
inline
template<typename T >
mat3x3< T > cs237::__detail::mat3x3< T >::transpose ( ) const
inline

return the transpose of this matrix

Member Data Documentation

template<typename T>
vec3<T> cs237::__detail::mat3x3< T >::cv[3]

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