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

ExCVec3D.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: ExCVec3D.h,v 1.6 2002/07/08 23:14:46 data Exp $
00021  *
00022  */
00023 
00024 
00025 #ifndef __EXCVEC3D_H__
00026 #define __EXCVEC3D_H__
00027 
00028 #include "ExDefine.h"
00029 #include <math.h>
00030 #include <cmath>
00031 
00032 class ExCVec3D  
00033 {
00034 public:
00035 //--------------------------------
00036 //Variable
00037 //--------------------------------
00038         float m_Vector[3];
00039 //--------------------------------
00040 //Constructor // Destructor
00041 //--------------------------------
00042         ExCVec3D();
00043         ExCVec3D(float x,float y,float z);
00044         ~ExCVec3D();
00045 //--------------------------------
00046 //Methode
00047 //--------------------------------
00048         float GetVectorLenght(void);
00049         ExCVec3D GetVecNormale(void);
00050         void SetValue(float x,float y,float z);
00051         inline void SetX(double val){m_Vector[0]=val;}
00052         inline void SetY(double val){m_Vector[1]=val;}
00053         inline void SetZ(double val){m_Vector[2]=val;}
00054         inline double GetX(void){return m_Vector[0];}
00055         inline double GetY(void){return m_Vector[1];}
00056         inline double GetZ(void){return m_Vector[2];}
00057         void Draw(void);
00058 //--------------------------------
00059 // Operator
00060 //--------------------------------
00061         ExCVec3D& operator=(const ExCVec3D& Vec);
00062         bool  operator==(const ExCVec3D& Vec);
00063         ExCVec3D  operator+(const ExCVec3D& Vec);
00064         ExCVec3D  operator-(const ExCVec3D& Vec);
00065         ExCVec3D  operator*(const ExCVec3D& Vec);
00066         ExCVec3D  operator*(float scalar);
00067         ExCVec3D  operator/(const ExCVec3D& Vec);
00068         ExCVec3D  operator/(float scalar);
00069 //--------------------------------
00070 // friends
00071 //--------------------------------      
00072         friend std::ostream& operator<<(std::ostream& s,const ExCVec3D &vec);
00073 
00074 };
00075 
00076 #endif // __EXCVEC3D_H__

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