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

ExMath.h

Aller à la documentation de ce fichier.
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.6 2002/07/08 23:14:46 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 "ExCMatrix4x4.h"
00033 #include "ExCMatrix3x3.h"
00034 #include "ExQuaternion.h"
00035 #include "ExCFrustum.h"
00036 #include "cos.h"
00037 #include "sin.h"
00038 
00039 
00040 ExCMatrix4x4 MatriceByVec3D(const ExCMatrix4x4 &m,const ExCVec3D &v);
00041 float GetDotProduct(const ExCVec3D& Vec1,const ExCVec3D& Vec2);
00042 ExCVec3D GetCrossProduct(const ExCVec3D& Vec1,const ExCVec3D& Vec2);
00043 ExCVec3D GetVecNormale(const ExCVec3D& Vec1);
00044 ExCMatrix4x4 GetMatrixFromQuaternion(const ExQuaternion& Q);
00045 ExCMatrix4x4 GetMatrixFromEuler(float roll,float pitch,float yaw);
00046 ExQuaternion GetQuaternionFromEuler(float x,float y,float z);
00047 void NormalizePlane(float Plane[6][4], int side);
00048 inline float DegreesToRadians(float deg){return deg * PI/180.0f;}
00049 inline float RadiansToDegrees(float rad){return rad * 180.0f /PI;}
00050 
00051 ExCVec3D GetAxisFromQuaternion(const ExQuaternion& Q);
00052 
00053 ExCVec3D  GetNewVecFromEuler(ExCVec3D force,float roll,float pitch,float yaw);
00054 #endif //__EXMATH_H__

Généré le Tue Aug 6 20:25:30 2002 pour ExNihilo par doxygen1.2.17