Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Matrix.h

Go to the documentation of this file.
00001 
00002 #ifndef __MATRIX_H
00003 #define __MATRIX_H
00004 
00005 #include <ostream>
00006 
00007 #include "Vector.h"
00008 
00020 class Matrix {
00021 private:
00033     float m_data[16];
00034 
00035 private:
00040     float determinant(int row, int col) const;
00041 
00043     void initialize(const float* const data);
00044 
00046     void initialize(const Vector& col1, const Vector& col2, 
00047         const Vector& col3, const Vector& col4);
00048 
00049 public:
00051     static const Matrix IDENTITY;
00052 
00054     Matrix();
00056     Matrix(const float* const data);
00061     Matrix(const Vector& col1, const Vector& col2, const Vector& col3);
00063     Matrix(const Vector& col1, const Vector& col2, const Vector& col3, const Vector& col4);
00064 
00066     float& operator()(int row, int col);
00068     float operator()(int row, int col) const;
00069 
00071     const float* toArray() const;
00072 
00074     const Matrix invert() const;
00075 
00077     const Matrix transpose() const;
00078 
00080     float determinant() const;
00081 
00083     const Matrix multiplyRight(const Matrix& matrix) const;
00084 
00086     const Matrix multiplyLeft(const Matrix& matrix) const;
00087 
00089     const Vector multiplyRight(const Vector& vector) const;
00090 
00095     friend std::ostream& operator<< (std::ostream& out, const Matrix& matrix);
00096 };
00097 
00098 #endif // __MATRIX_H

Generated on Sat Mar 22 15:12:06 2003 for Bumpmap by doxygen1.3-rc2