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

# ExCSDKParticuleSyteme.h

Go to the documentation of this file.

    00001 #pragma once
    00002
    00003 #ifndef __EXSYSTEMEPARTICULE_H__
    00004 #define __EXSYSTEMEPARTICULE_H__
    00005
    00006 #include "ExDefine.h"
    00007 #include "ExCVec3D.h"
    00008 #include "ExCSDKParticule.h"
    00009 #include "ExCRandomNumber.h"
    00010 #include "cos.h"
    00011 #include "sin.h"
    00012
    00013
    00014 //--------------------------------
    00015 //Emmeteur type
    00016 //--------------------------------
    00017 #define EMMETEUR_POINT                  1
    00018 #define EMMETEUR_LIGNE                  2
    00019 #define EMMETEUR_RECTANGLE              3
    00020 #define EMMETEUR_CUBE                   4
    00021 #define EMMETEUR_CERCLE                 5
    00022 #define EMMETEUR_SPIRAL                 6
    00023 #define EMMETEUR_DISQUE                 7
    00024 //--------------------------------
    00025
    00026 class ExCSDKParticuleSyteme
    00027 {
    00028 protected:
    00029         //--------------------------------
    00030         // Variable
    00031         //--------------------------------
    00032         std::vector<ExCSDKParticule>                    m_VecParticule;
    00033         std::vector<ExCSDKParticule>::iterator m_ItVecParticule;
    00034
    00035
    00036         bool                            m_State;
    00037         bool                            m_Pause;
    00038
    00039         float                           m_TimeLastParticule;
    00040         char                            *m_ParticuleSystemeName;
    00041
    00042         //pram for emmeteur
    00043         float                           m_EmissionRate;
    00044         int                                     m_MaxParticule;
    00045         int                                     m_TypeEmmeteur;
    00046         ExCVec3D                        m_P1;//use for point
    00047         ExCVec3D                        m_P2;//use for line
    00048         ExCVec3D                        m_Position;
    00049
    00050         float                           m_rayon;
    00051         int                                     m_angle;
    00052         int                                     m_vitesseangle;
    00053
    00054         //struct for bmp
    00055         GLuint                          m_Texture;
    00056
    00057         //Max and min value for particule
    00058         int                             m_Type;
    00059         int                             m_MaxLifeSpan;
    00060         int                             m_MinLifeSpan;
    00061         float                   m_MaxSize;
    00062         float                   m_MinSize;
    00063         int                             m_MaxWeight;
    00064         int                             m_MinWeight;
    00065         int                             m_MaxColorR;
    00066         int                             m_MinColorR;
    00067         int                             m_MaxColorG;
    00068         int                             m_MinColorG;
    00069         int                             m_MaxColorB;
    00070         int                             m_MinColorB;
    00071         int                             m_MaxBlending;
    00072         int                             m_MinBlending;
    00073         ExCVec3D                m_MaxVelocity;
    00074         ExCVec3D                m_MinVelocity;
    00075         ExCVec3D                m_MaxAcceleration;
    00076         ExCVec3D                m_MinAcceleration;
    00077         ExCVec3D                m_MaxGravity;
    00078         ExCVec3D                m_MinGravity;
    00079 public:
    00080         ExCSDKParticuleSyteme(void);
    00081         ~ExCSDKParticuleSyteme(void);
    00082
    00083                 //--------------------------------
    00084         // Methode
    00085         //--------------------------------
    00086         void Draw(void);
    00087         void Start(void);
    00088         void Pause(void);
    00089         void Stop(void);
    00090
    00091         bool LoadParticuleSysteme(const char * FileName);
    00092         bool SaveParticuleSysteme(const char * FileName);
    00093         bool LoadTexture(const char * name);
    00094
    00095         inline char * GetParticuleSystemeName(void){return m_ParticuleSystemeName;}
    00096         void SetParticuleSystemeName(char * name);
    00097
    00098         inline bool GetParticuleSystemeState(void){return m_State;}
    00099         inline void SetParticuleSystemeState(bool state){m_State=state;}
    00100
    00101         void SetParticuleType(int type);
    00102         void SetParticuleTexture(char *texture);
    00103
    00104         inline void SetParticuleMaxLife(int life) {m_MaxLifeSpan=life;}
    00105         inline int      GetParticuleMaxLife(void)       {return m_MaxLifeSpan;}
    00106         inline void SetParticuleMinLife(int life) {m_MinLifeSpan=life;}
    00107         inline int      GetParticuleMinLife(void)       {return m_MinLifeSpan;}
    00108
    00109         inline void SetParticuleMaxSize(float Size) {m_MaxSize=Size;}
    00110         inline float    GetParticuleMaxSize(void)       {return m_MaxSize;}
    00111         inline void SetParticuleMinSize(float Size) {m_MinSize=Size;}
    00112         inline float    GetParticuleMinSize(void)       {return m_MinSize;}
    00113
    00114         inline void SetParticuleMaxWeight(int Weight) {m_MaxWeight=Weight;}
    00115         inline int      GetParticuleMaxWeight(void)     {return m_MaxWeight;}
    00116         inline void SetParticuleMinWeight(int Weight) {m_MinWeight=Weight;}
    00117         inline int      GetParticuleMinWeight(void)     {return m_MinWeight;}
    00118
    00119         inline void SetParticuleMaxColorR(int ColorR) {m_MaxColorR=ColorR;}
    00120         inline int      GetParticuleMaxColorR(void)     {return m_MaxColorR;}
    00121         inline void SetParticuleMinColorR(int ColorR) {m_MinColorR=ColorR;}
    00122         inline int      GetParticuleMinColorR(void)     {return m_MinColorR;}
    00123
    00124         inline void SetParticuleMaxColorG(int ColorG) {m_MaxColorG=ColorG;}
    00125         inline int      GetParticuleMaxColorG(void)     {return m_MaxColorG;}
    00126         inline void SetParticuleMinColorG(int ColorG) {m_MinColorG=ColorG;}
    00127         inline int      GetParticuleMinColorG(void)     {return m_MinColorG;}
    00128
    00129         inline void SetParticuleMaxColorB(int ColorB) {m_MaxColorB=ColorB;}
    00130         inline int      GetParticuleMaxColorB(void)     {return m_MaxColorB;}
    00131         inline void SetParticuleMinColorB(int ColorB) {m_MinColorB=ColorB;}
    00132         inline int      GetParticuleMinColorB(void)     {return m_MinColorB;}
    00133
    00134         inline void SetParticuleMaxBlending(int Blending) {m_MaxBlending=Blending;}
    00135         inline int      GetParticuleMaxBlending(void)   {return m_MaxBlending;}
    00136         inline void SetParticuleMinBlending(int Blending) {m_MinBlending=Blending;}
    00137         inline int      GetParticuleMinBlending(void)   {return m_MinBlending;}
    00138
    00139         inline void SetParticuleMaxVelocity(ExCVec3D Velocity) {m_MaxVelocity=Velocity;}
    00140         inline ExCVec3D GetParticuleMaxVelocity(void)   {return m_MaxVelocity;}
    00141         inline void SetParticuleMinVelocity(ExCVec3D Velocity) {m_MinVelocity=Velocity;}
    00142         inline ExCVec3D GetParticuleMinVelocity(void)   {return m_MinVelocity;}
    00143
    00144         inline void SetParticuleMaxAcceleration(ExCVec3D Acceleration) {m_MaxAcceleration=Acceleration;}
    00145         inline ExCVec3D GetParticuleMaxAcceleration(void)       {return m_MaxAcceleration;}
    00146         inline void SetParticuleMinAcceleration(ExCVec3D Acceleration) {m_MinAcceleration=Acceleration;}
    00147         inline ExCVec3D GetParticuleMinAcceleration(void)       {return m_MinAcceleration;}
    00148
    00149 };
    00150
    00151 #endif