#include <TAPsMatrix3x3.hpp>

Public Member Functions | |
| const double * | GetDataDouble () const |
| const float * | GetDataFloat () const |
| const long double * | GetDataLongDouble () const |
| T | GetDeterminant () const |
| Matrix3x3< T > | GetInverse () const |
| Matrix3x3< T > | GetTranspose () const |
| const double * | GetTransposeDataDouble () const |
| const float * | GetTransposeDataFloat () const |
| const long double * | GetTransposeDataLongDouble () const |
| Matrix3x3< T > & | Inversed () |
| bool | IsIdentity () const |
| bool | IsSquare () const |
| bool | IsSymmetric () const |
| void | MakeDiagonal (T const af[3]) |
| void | MakeDiagonal (T d) |
| void | MakeIdentity () |
| void | MakeZero () |
| Matrix3x3 (T const af[9]) | |
| Matrix3x3 (T, T, T, T, T, T, T, T, T) | |
| Matrix3x3 (T) | |
| Matrix3x3 (Matrix3x3< T > const &M) | |
| Matrix3x3 () | |
| void | MultLeft (Matrix3x3< T > const &M) |
| void | MultRight (Matrix3x3< T > const &M) |
| operator const T * () const | |
| operator T * () | |
| T const & | operator() (int r, int c) const |
| T & | operator() (int r, int c) |
| Vector3< T > | operator* (Vector3< T > const &V) const |
| Matrix3x3< T > | operator* (T s) const |
| Matrix3x3< T > | operator* (Matrix3x3< T > const &M) const |
| Matrix3x3< T > & | operator*= (T s) |
| Matrix3x3< T > & | operator*= (Matrix3x3< T > const &M) |
| Matrix3x3< T > | operator+ (Matrix3x3< T > const &M) const |
| Matrix3x3< T > & | operator+= (Matrix3x3< T > const &M) |
| Matrix3x3< T > | operator- (Matrix3x3< T > const &M) const |
| Matrix3x3< T > | operator- () |
| Matrix3x3< T > & | operator-= (Matrix3x3< T > const &M) |
| Matrix3x3< T > | operator/ (T s) const |
| Matrix3x3< T > & | operator/= (T s) |
| Matrix3x3< T > & | operator= (Matrix3x3< T > const &M) |
| T const & | operator[] (int i) const |
| T & | operator[] (int i) |
| void | SetAllElements (T const af[9]) |
| void | SetAllElements (T, T, T, T, T, T, T, T, T) |
| void | SetAllElements (T) |
| Matrix3x3< T > & | Transposed () |
| ~Matrix3x3 () | |
Private Attributes | |
| T | e [9] |
Static Private Attributes | |
| static double | g_d [9] |
| static float | g_f [9] |
| static long double | g_ld [9] |
Friends | |
| Matrix3x3< T > | operator* (T s, Matrix3x3< T > const &M) |
| std::ostream & | operator<< (std::ostream &output, Matrix3x3< T > const &M) |
Definition at line 21 of file TAPsMatrix3x3.hpp.
Definition at line 26 of file TAPsMatrix3x3.cpp.
00027 { 00028 // Identity Matrix 00029 /*e0*/ e[1] = e[2] = 00030 e[3] = /*e4*/ e[5] = 00031 e[6] = e[7] = /*e8*/ Math<T>::ZERO; 00032 e[0] = e[4] = e[8] = Math<T>::ONE; 00033 }
| const double * Matrix3x3< T >::GetDataDouble | ( | ) | const [inline] |
Definition at line 393 of file TAPsMatrix3x3.cpp.
00394 { 00395 for ( int i = 0; i < 9; ++i ) { 00396 g_d[i] = static_cast<double>( e[i] ); 00397 } 00398 return g_d; 00399 }
| const float * Matrix3x3< T >::GetDataFloat | ( | ) | const [inline] |
Definition at line 384 of file TAPsMatrix3x3.cpp.
00385 { 00386 for ( int i = 0; i < 9; ++i ) { 00387 g_f[i] = static_cast<float>( e[i] ); 00388 } 00389 return g_f; 00390 }
| const long double * Matrix3x3< T >::GetDataLongDouble | ( | ) | const [inline] |
Definition at line 402 of file TAPsMatrix3x3.cpp.
00403 { 00404 for ( int i = 0; i < 9; ++i ) { 00405 g_ld[i] = static_cast<long double>( e[i] ); 00406 } 00407 return g_ld; 00408 }
| T Matrix3x3< T >::GetDeterminant | ( | ) | const [inline] |
Definition at line 210 of file TAPsMatrix3x3.cpp.
00211 { 00212 T det = GetDeterminant(); 00213 00214 if ( -Math<T>::EPSILON < det && det < Math<T>::EPSILON ) 00215 return Matrix3x3( Math<T>::INFINITY ); 00216 00217 return Matrix3x3<T>( ( e[4]*e[8] - e[7]*e[5] ) / det, 00218 -( e[1]*e[8] - e[7]*e[2] ) / det, 00219 ( e[1]*e[5] - e[4]*e[2] ) / det, 00220 -( e[3]*e[8] - e[6]*e[5] ) / det, 00221 ( e[0]*e[8] - e[6]*e[2] ) / det, 00222 -( e[0]*e[5] - e[3]*e[2] ) / det, 00223 ( e[3]*e[7] - e[6]*e[4] ) / det, 00224 -( e[0]*e[7] - e[6]*e[1] ) / det, 00225 ( e[0]*e[4] - e[3]*e[1] ) / det ); 00226 }
Definition at line 193 of file TAPsMatrix3x3.cpp.
00194 { 00195 return Matrix3x3<T> ( e[0], e[3], e[6], 00196 e[1], e[4], e[7], 00197 e[2], e[5], e[8] ); 00198 }
| const double * Matrix3x3< T >::GetTransposeDataDouble | ( | ) | const [inline] |
Definition at line 426 of file TAPsMatrix3x3.cpp.
00427 { 00428 g_d[0] = static_cast<double>( e[0] ); 00429 g_d[1] = static_cast<double>( e[3] ); 00430 g_d[2] = static_cast<double>( e[6] ); 00431 g_d[3] = static_cast<double>( e[1] ); 00432 g_d[4] = static_cast<double>( e[4] ); 00433 g_d[5] = static_cast<double>( e[7] ); 00434 g_d[6] = static_cast<double>( e[2] ); 00435 g_d[7] = static_cast<double>( e[5] ); 00436 g_d[8] = static_cast<double>( e[8] ); 00437 return g_d; 00438 }
| const float * Matrix3x3< T >::GetTransposeDataFloat | ( | ) | const [inline] |
Definition at line 411 of file TAPsMatrix3x3.cpp.
00412 { 00413 g_f[0] = static_cast<float>( e[0] ); 00414 g_f[1] = static_cast<float>( e[3] ); 00415 g_f[2] = static_cast<float>( e[6] ); 00416 g_f[3] = static_cast<float>( e[1] ); 00417 g_f[4] = static_cast<float>( e[4] ); 00418 g_f[5] = static_cast<float>( e[7] ); 00419 g_f[6] = static_cast<float>( e[2] ); 00420 g_f[7] = static_cast<float>( e[5] ); 00421 g_f[8] = static_cast<float>( e[8] ); 00422 return g_f; 00423 }
| const long double * Matrix3x3< T >::GetTransposeDataLongDouble | ( | ) | const [inline] |
Definition at line 441 of file TAPsMatrix3x3.cpp.
00442 { 00443 g_ld[0] = static_cast<long double>( e[0] ); 00444 g_ld[1] = static_cast<long double>( e[3] ); 00445 g_ld[2] = static_cast<long double>( e[6] ); 00446 g_ld[3] = static_cast<long double>( e[1] ); 00447 g_ld[4] = static_cast<long double>( e[4] ); 00448 g_ld[5] = static_cast<long double>( e[7] ); 00449 g_ld[6] = static_cast<long double>( e[2] ); 00450 g_ld[7] = static_cast<long double>( e[5] ); 00451 g_ld[8] = static_cast<long double>( e[8] ); 00452 return g_ld; 00453 }
| bool Matrix3x3< T >::IsIdentity | ( | ) | const [inline] |
Definition at line 165 of file TAPsMatrix3x3.cpp.
00166 { 00167 return e[ 0] == Math<T>::ONE && 00168 e[ 1] == Math<T>::ZERO && 00169 e[ 2] == Math<T>::ZERO && 00170 00171 e[ 3] == Math<T>::ZERO && 00172 e[ 4] == Math<T>::ONE && 00173 e[ 5] == Math<T>::ZERO && 00174 00175 e[ 6] == Math<T>::ZERO && 00176 e[ 7] == Math<T>::ZERO && 00177 e[ 8] == Math<T>::ONE; 00178 }
| bool Matrix3x3< T >::IsSquare | ( | ) | const [inline] |
| bool Matrix3x3< T >::IsSymmetric | ( | ) | const [inline] |
| void Matrix3x3< T >::MakeDiagonal | ( | T const | af[3] | ) | [inline] |
| void Matrix3x3< T >::MakeDiagonal | ( | T | d | ) | [inline] |
| void Matrix3x3< T >::MakeIdentity | ( | ) | [inline] |
Definition at line 133 of file TAPsMatrix3x3.cpp.
00134 { 00135 e[0] = e[4] = e[8] = Math<T>::ONE; 00136 e[1] = e[2] = e[3] = e[5] = e[6] = e[7] = Math<T>::ZERO; 00137 }
| void Matrix3x3< T >::MakeZero | ( | ) | [inline] |
| Matrix3x3< T >::operator const T * | ( | ) | const [inline] |
| Matrix3x3< T >::operator T * | ( | ) | [inline] |
| T const & Matrix3x3< T >::operator() | ( | int | r, | |
| int | c | |||
| ) | const [inline] |
| T & Matrix3x3< T >::operator() | ( | int | r, | |
| int | c | |||
| ) | [inline] |
| Vector3< T > Matrix3x3< T >::operator* | ( | Vector3< T > const & | V | ) | const [inline] |
Definition at line 371 of file TAPsMatrix3x3.cpp.
00372 { 00373 return Vector3<T>( 00374 V[0]*e[0] + V[1]*e[1] + V[2]*e[2], 00375 V[0]*e[3] + V[1]*e[4] + V[2]*e[5], 00376 V[0]*e[6] + V[1]*e[7] + V[2]*e[8] ); 00377 }
| Matrix3x3< T > Matrix3x3< T >::operator* | ( | Matrix3x3< T > const & | M | ) | const [inline] |
Definition at line 328 of file TAPsMatrix3x3.cpp.
00329 { 00330 return Matrix3x3<T>( e[0]*M.e[0] + e[1]*M.e[3] + e[2]*M.e[6], 00331 e[0]*M.e[1] + e[1]*M.e[4] + e[2]*M.e[7], 00332 e[0]*M.e[2] + e[1]*M.e[5] + e[2]*M.e[8], 00333 e[3]*M.e[0] + e[4]*M.e[3] + e[5]*M.e[6], 00334 e[3]*M.e[1] + e[4]*M.e[4] + e[5]*M.e[7], 00335 e[3]*M.e[2] + e[4]*M.e[5] + e[5]*M.e[8], 00336 e[6]*M.e[0] + e[7]*M.e[3] + e[8]*M.e[6], 00337 e[6]*M.e[1] + e[7]*M.e[4] + e[8]*M.e[7], 00338 e[6]*M.e[2] + e[7]*M.e[5] + e[8]*M.e[8] ); 00339 }
| Matrix3x3< T > & Matrix3x3< T >::operator*= | ( | Matrix3x3< T > const & | M | ) | [inline] |
Definition at line 256 of file TAPsMatrix3x3.cpp.
00257 { 00258 return Matrix3x3<T>( -e[0], -e[1], -e[2], 00259 -e[3], -e[4], -e[5], 00260 -e[6], -e[7], -e[8] ); 00261 }
| T const & Matrix3x3< T >::operator[] | ( | int | i | ) | const [inline] |
| T & Matrix3x3< T >::operator[] | ( | int | i | ) | [inline] |
| void Matrix3x3< T >::SetAllElements | ( | T const | af[9] | ) | [inline] |
| void Matrix3x3< T >::SetAllElements | ( | T | e00, | |
| T | e01, | |||
| T | e02, | |||
| T | e10, | |||
| T | e11, | |||
| T | e12, | |||
| T | e20, | |||
| T | e21, | |||
| T | e22 | |||
| ) | [inline] |
| void Matrix3x3< T >::SetAllElements | ( | T | t | ) | [inline] |
| std::ostream& operator<< | ( | std::ostream & | output, | |
| Matrix3x3< T > const & | M | |||
| ) | [friend] |
Definition at line 40 of file TAPsMatrix3x3.hpp.
00041 { 00042 int width = 14; 00043 //output << typeid(*this).name() << "( "; 00044 output << "Matrix3x3<" << typeid(T).name() << "> =\n" 00045 << "| " << std::setw(width) << M.e[0] 00046 << std::setw(width) << M.e[1] 00047 << std::setw(width) << M.e[2] << " |\n" 00048 << "| " << std::setw(width) << M.e[3] 00049 << std::setw(width) << M.e[4] 00050 << std::setw(width) << M.e[5] << " |\n" 00051 << "| " << std::setw(width) << M.e[6] 00052 << std::setw(width) << M.e[7] 00053 << std::setw(width) << M.e[8] << " |\n"; 00054 //output << std::endl; 00055 return output; 00056 }
Definition at line 30 of file TAPsMatrix3x3.hpp.
Definition at line 34 of file TAPsMatrix3x3.hpp.
Definition at line 33 of file TAPsMatrix3x3.hpp.
Definition at line 35 of file TAPsMatrix3x3.hpp.
1.5.6