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

ExCParticule.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: ExCParticule.h,v 1.14 2002/06/21 18:03:33 data Exp $
00021  *
00022  */
00023  
00024 #ifndef __EXCPARTICULE_H__
00025 #define __EXCPARTICULE_H__
00026 
00027 //--------------------------------
00028 // File to include
00029 //--------------------------------
00030 #include "ExDefine.h"
00031 #include "ExMath.h"
00032 #include "ExManagerTexture.h"
00033 //--------------------------------
00034 #define PARTICULE_POINT         1
00035 #define PARTICULE_LINE          2
00036 #define PARTICULE_TEXTURE       3
00037 //--------------------------------
00038 class ExCParticule 
00039 {
00040 protected:
00041         //--------------------------------
00042         // Variable
00043         //--------------------------------
00044         ExCVec3D                m_Position;
00045         ExCVec3D                m_Velocity;
00046         ExCVec3D                m_Acceleration;
00047         ExCVec3D                m_Gravity;
00048     float                       m_Size;
00049         float                   m_Mass;
00050         int                             m_LifeSpan;
00051         int                             m_TotalLife;
00052         int                             m_Weight;
00053         int                             m_Type;
00054         int                             m_ColorR;
00055         int                             m_ColorG;
00056         int                             m_ColorB;
00057         int                             m_Blending;
00058         int                             m_Texture;
00059                         
00060         std::vector<ExCVec3D>                   m_VecPosition;
00061         std::vector<ExCVec3D>::iterator m_ItVecPosition;
00062 
00063         ExManagerTexture        *ManagerTexture;
00064         
00065 public:
00066         //--------------------------------
00067         // Constructor // Destructor
00068         //--------------------------------
00069         ExCParticule(void);
00070         ~ExCParticule(void);
00071         //--------------------------------
00072         // Methode
00073         //--------------------------------
00074         void PrecalculeParticuleTrajectory(int start,int end); 
00075         void ApplyForceToParitcule(ExCVec3D force);
00076 
00077         void Draw(void);
00078         void SetParticuleType(int type);
00079         void SetParticuleTexture(int texture);
00080 
00081         inline void SetManagerTexture(ExManagerTexture * Texture){ManagerTexture = Texture;}
00082 
00083         inline void SetParticuleSize(float Size) {m_Size=Size;}
00084         inline float    GetParticuleSize(void)  {return m_Size;}
00085 
00086         inline void SetParticuleMass(float Mass) {m_Mass=Mass;}
00087         inline float    GetParticuleMass(void)  {return m_Mass;}
00088 
00089         inline void SetParticuleLife(int life) {m_LifeSpan=life;m_TotalLife=life;}
00090         inline int      GetParticuleLife(void)  {return m_LifeSpan;}
00091 
00092         inline void SetParticuleWeight(int Weight) {m_Weight=Weight;}
00093         inline int      GetParticuleWeight(void)        {return m_Weight;}
00094         
00095         inline void SetParticuleColorR(int ColorR) {m_ColorR=ColorR;}
00096         inline int      GetParticuleColorR(void)        {return m_ColorR;}
00097 
00098         inline void SetParticuleColorG(int ColorG) {m_ColorG=ColorG;}
00099         inline int      GetParticuleColorG(void)        {return m_ColorG;}
00100 
00101         inline void SetParticuleColorB(int ColorB) {m_ColorB=ColorB;}
00102         inline int      GetParticuleColorB(void)        {return m_ColorB;}
00103 
00104         inline void SetParticuleBlending(int Blending) {m_Blending=Blending;}
00105         inline int      GetParticuleBlending(void)      {return m_Blending;}
00106 
00107         inline void SetParticuleVelocity(ExCVec3D Velocity) {m_Velocity=Velocity;}
00108         inline ExCVec3D GetParticuleVelocity(void)      {return m_Velocity;}
00109 
00110         inline void SetParticuleAcceleration(ExCVec3D Acceleration) {m_Acceleration=Acceleration;}
00111         inline ExCVec3D GetParticuleAcceleration(void)  {return m_Acceleration;}
00112 
00113         inline void SetParticuleGravity(ExCVec3D Gravity){m_Gravity=Gravity;}
00114         inline ExCVec3D GetParticuleGravity(void)       {return m_Gravity;}
00115 
00116         inline void SetParticulePosition(ExCVec3D Position){m_Position=Position;}
00117         inline ExCVec3D GetParticulePosition(void)      {return m_Position;}
00118 
00119         inline void DecreaseLifeSpan(void){m_LifeSpan--;}
00120 };
00121 
00122 #endif  //__EXCPARTICULE_H__
00123 

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