Page principale | Liste des namespaces | Hiérarchie des classes | Liste par ordre alphabétique | Liste des composants | Liste des fichiers | Composants | Déclarations

Matrix33.h

Aller à la documentation de ce fichier.
00001 /*=========================================================================
00002 UberSim Source Code Release
00003 -------------------------------------------------------------------------
00004 Copyright (C) 2002 Manuela Veloso, Brett Browning, Mike Bowling,
00005                    James Bruce; {mmv, brettb, mhb, jbruce}@cs.cmu.edu
00006                    Erick Tryzelaar {erickt}@andrew.cmu.edu
00007 School of Computer Science, Carnegie Mellon University
00008 -------------------------------------------------------------------------
00009 This software is distributed under the GNU General Public License,
00010 version 2.  If you do not have a copy of this licence, visit
00011 www.gnu.org, or write: Free Software Foundation, 59 Temple Place,
00012 Suite 330 Boston, MA 02111-1307 USA.  This program is distributed
00013 in the hope that it will be useful, but WITHOUT ANY WARRANTY,
00014 including MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00015 -------------------------------------------------------------------------*/
00016 
00017 #ifndef __SIM_MATRIX33_H__
00018 #define __SIM_MATRIX33_H__
00019 
00020 #include "Vector3.h"
00027 class Matrix33
00028 {
00029     public:
00030         static const Matrix33 ZERO;
00031         static const Matrix33 IDENTITY;
00032 
00033     public:
00034         static Matrix33 rotateAboutX (Real a);
00035         static Matrix33 rotateAboutY (Real a);
00036         static Matrix33 rotateAboutZ (Real a);
00037         static Matrix33 rotate       (Real a, const Vector3& axis);
00038         
00039     public:
00040         Matrix33 ();
00041         Matrix33 (const Matrix33& matrix);
00042         Matrix33 (const Vector3& euler);
00043         Matrix33 (const Vector3& c0, const Vector3& c1, const Vector3& c2);
00044         Matrix33 (const Real matrix[3][3]);
00045         Matrix33 (const Real m00, const Real m01, const Real m02,
00046                   const Real m10, const Real m11, const Real m12, 
00047                   const Real m20, const Real m21, const Real m22);
00048         
00049         ~Matrix33 ();
00050 
00051     public:
00052         Real* operator [] (const unsigned int i) const;
00053         //operator Real* ();
00054 
00055         Matrix33& operator = (const Matrix33&   matrix);    
00056         Matrix33& operator = (const Real*     matrix);
00057         
00058         Matrix33 operator + (const Matrix33& matrix) const;
00059         Matrix33 operator - (const Matrix33& matrix) const;
00060         Matrix33 operator * (const Real      scalar) const;
00061         Vector3  operator * (const Vector3&  vector) const;
00062         Matrix33 operator * (const Matrix33& matrix) const;
00063     void print() const;
00064 
00065         friend Matrix33 operator * (const Real     scalar, const Matrix33& matrix);
00066         friend Vector3  operator * (const Vector3& vector, const Matrix33& matrix);
00067 
00068     public:
00069         Matrix33 transpose   ();
00070         Vector3  eulerAngles ();
00071 
00072     protected:
00073         Real m[3][3];
00074 };
00075 
00076 #endif

Généré le Mon Mar 1 01:29:41 2004 par doxygen 1.3.3