Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

Matrix44.h

00001 
00002 #ifndef _MATRIX44_H_
00003 #define _MATRIX44_H_
00004 /*
00005 Peon - Win32 Games Programming Library
00006 Copyright (C) 2002-2005 Erik Yuzwa
00007 
00008 This library is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU Library General Public
00010 License as published by the Free Software Foundation; either
00011 version 2 of the License, or (at your option) any later version.
00012 
00013 This library is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 Library General Public License for more details.
00017 
00018 You should have received a copy of the GNU Library General Public
00019 License along with this library; if not, write to the Free
00020 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 
00022 Erik Yuzwa
00023 peon AT wazooinc DOT com
00024 */
00025 
00026 #include "Peonstdafx.h"
00027 #include "Vector3.h"
00028 
00029 namespace peon
00030 {
00031 
00041         class PEONMAIN_API Matrix44
00042         {
00043         public:
00044 
00046                 float m[16];
00047 
00048                 Matrix44(){ }
00049 
00050                 Matrix44( float m0, float m4, float  m8, float m12,
00051                                    float m1, float m5, float  m9, float m13,
00052                                    float m2, float m6, float m10, float m14,
00053                                    float m3, float m7, float m11, float m15 );
00054 
00055                 void identity(void);
00056                 void translate(const Vector3 &trans);
00057                 void translate_x(const float &dist);
00058                 void translate_y(const float &dist);
00059                 void translate_z(const float &dist);
00060                 void rotate(const float &angle, Vector3 &axis);
00061                 void rotate_x(const float &angle);
00062                 void rotate_y(const float &angle);
00063                 void rotate_z(const float &angle);
00064                 void scale(const Vector3 &scale);
00065                 void transformPoint( Vector3 *vec );
00066                 void transformVector( Vector3 *vec );
00067 
00068                 // Operators...
00069                 Matrix44 operator + (const Matrix44 &other);
00070                 Matrix44 operator - (const Matrix44 &other);
00071                 Matrix44 operator * (const Matrix44 &other);
00072 
00073                 Matrix44 operator * (const float scalar);
00074         };
00075 
00076 
00077 
00078 }
00079 
00080 #endif 
00081 

Generated on Thu Dec 1 01:55:40 2005 for Peon by  doxygen 1.4.1