Main Page   Namespace List   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals  

ExMath.h

Go to the documentation of this file.
00001 /*
00002  * ExNihilo 3D Engine
00003  * 
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  *
00018  * Please read AUTHORS file !!!
00019  * 
00020  * $Id: ExMath.h,v 1.7 2002/08/14 15:32:32 data Exp $
00021  *
00022  */
00023 
00024 #ifndef __EXMATH_H__
00025 #define __EXMATH_H__
00026 
00027 #include <math.h>
00028 #include <cmath>
00029 #include "ExCVertex.h"
00030 #include "ExCMesh.h"
00031 #include "ExCVec3D.h"
00032 #include "ExCVec2D.h"
00033 #include "ExCMatrix4x4.h"
00034 #include "ExCMatrix3x3.h"
00035 #include "ExQuaternion.h"
00036 #include "ExCFrustum.h"
00037 #include "cos.h"
00038 #include "sin.h"
00039 
00040 
00041 ExCMatrix4x4 MatriceByVec3D(const ExCMatrix4x4 &m,const ExCVec3D &v);
00042 float GetDotProduct(const ExCVec3D& Vec1,const ExCVec3D& Vec2);
00043 ExCVec3D GetCrossProduct(const ExCVec3D& Vec1,const ExCVec3D& Vec2);
00044 ExCVec3D GetVecNormale(const ExCVec3D& Vec1);
00045 ExCMatrix4x4 GetMatrixFromQuaternion(const ExQuaternion& Q);
00046 ExCMatrix4x4 GetMatrixFromEuler(float roll,float pitch,float yaw);
00047 ExQuaternion GetQuaternionFromEuler(float x,float y,float z);
00048 void NormalizePlane(float Plane[6][4], int side);
00049 inline float DegreesToRadians(float deg){return deg * PI/180.0f;}
00050 inline float RadiansToDegrees(float rad){return rad * 180.0f /PI;}
00051 
00052 ExCVec3D GetAxisFromQuaternion(const ExQuaternion& Q);
00053 
00054 ExCVec3D  GetNewVecFromEuler(ExCVec3D force,float roll,float pitch,float yaw);
00055 #endif //__EXMATH_H__

Generated on Tue Dec 10 18:20:08 2002 for ExNihilo by doxygen1.3-rc1