#include <ExCSDKParticuleSyteme.h>
|
|
|
Définition à la ligne 42 du fichier ExCSDKParticuleSyteme.cpp.
00044 {
|
|
|
Définition à la ligne 63 du fichier ExCSDKParticuleSyteme.cpp.
00065 {
00066 /* ExCRandomNumber Randomnum;
00067 double a,c;
00068 unsigned int i;
00069
00070 glPushMatrix();
00071
00072 ExCVec3D Position;
00073
00074 switch(m_TypeEmmeteur)
00075 {
00076 case EMMETEUR_POINT :
00077 Position=m_Position+m_P1;
00078 break;
00079
00080 case EMMETEUR_LIGNE :
00081 case EMMETEUR_RECTANGLE :
00082 case EMMETEUR_CUBE :
00083 Position.SetValue(Randomnum.getFloat(m_P1.m_Vector[0],m_P2.m_Vector[0]),
00084 Randomnum.getFloat(m_P1.m_Vector[1],m_P2.m_Vector[1]),
00085 Randomnum.getFloat(m_P1.m_Vector[2],m_P2.m_Vector[2]));
00086 Position=m_Position+Position;
00087 break;
00088
00089 case EMMETEUR_CERCLE :
00090 a=Cos[m_angle]*m_rayon;
00091 c=Sin[m_angle]*m_rayon;
00092 m_angle=Randomnum.getInt(0,360);
00093 Position.SetValue(a,0.0f,c);
00094 Position=m_Position+Position;
00095 break;
00096
00097 case EMMETEUR_DISQUE :
00098 a=Cos[m_angle]*(Randomnum.getFloat(0.0f,m_rayon));
00099 c=Sin[m_angle]*(Randomnum.getFloat(0.0f,m_rayon));
00100 m_angle++;
00101 if(m_angle>360)m_angle=0;
00102 Position.SetValue(a,0.0f,c);
00103 Position=m_Position+Position;
00104 break;
00105
00106 case EMMETEUR_SPIRAL :
00107 a=Cos[m_angle]*m_rayon;
00108 c=Sin[m_angle]*m_rayon;
00109 m_angle+=m_vitesseangle;
00110 if(m_angle>360)m_angle=0;
00111 Position.SetValue(a,0.0f,c);
00112 Position=m_Position+Position;
00113 break;
00114 }
00115
00116 time_t ltime;
00117 time( <ime );
00118
00119 // create new particule
00120 if(!m_Pause)
00121 {
00122 if(m_TimeLastParticule<ltime)
00123 {
00124 ExCSDKParticule Particule;
00125 ExCVec3D Velocity,Acceleration,Gravity;
00126 Particule.SetParticuleTexture(m_Texture);
00127 Particule.SetParticuleType(m_Type);
00128 Particule.SetParticulePosition(Position);
00129 Particule.SetParticuleLife(Randomnum.getInt(m_MinLifeSpan,m_MaxLifeSpan));
00130 Particule.SetParticuleWeight(Randomnum.getInt(m_MinWeight,m_MaxWeight));
00131 Particule.SetParticuleColorB(Randomnum.getInt(m_MinColorB,m_MaxColorB));
00132 Particule.SetParticuleColorG(Randomnum.getInt(m_MinColorG,m_MaxColorG));
00133 Particule.SetParticuleColorR(Randomnum.getInt(m_MinColorR,m_MaxColorR));
00134 Particule.SetParticuleBlending(Randomnum.getInt(m_MinBlending,m_MaxBlending));
00135 Particule.SetParticuleMass(1.0f);
00136 //Particule.SetParticuleSize(Randomnum.getFloat (m_MinSize,m_MaxSize));
00137 Velocity.m_Vector[0]=Randomnum.getFloat(m_MaxVelocity.m_Vector[0],m_MinVelocity.m_Vector[0]);
00138 Velocity.m_Vector[1]=Randomnum.getFloat(m_MaxVelocity.m_Vector[1],m_MinVelocity.m_Vector[1]);
00139 Velocity.m_Vector[2]=Randomnum.getFloat(m_MaxVelocity.m_Vector[2],m_MinVelocity.m_Vector[2]);
00140 Particule.SetParticuleVelocity(Velocity);
00141 Acceleration.m_Vector[0]=Randomnum.getFloat(m_MaxAcceleration.m_Vector[0],m_MinAcceleration.m_Vector[0]);
00142 Acceleration.m_Vector[1]=Randomnum.getFloat(m_MaxAcceleration.m_Vector[1],m_MinAcceleration.m_Vector[1]);
00143 Acceleration.m_Vector[2]=Randomnum.getFloat(m_MaxAcceleration.m_Vector[2],m_MinAcceleration.m_Vector[2]);
00144 Particule.SetParticuleAcceleration(Acceleration);
00145 Gravity.m_Vector[0]=Randomnum.getFloat(m_MaxGravity.m_Vector[0],m_MinGravity.m_Vector[0]);
00146 Gravity.m_Vector[1]=Randomnum.getFloat(m_MaxGravity.m_Vector[1],m_MinGravity.m_Vector[1]);
00147 Gravity.m_Vector[2]=Randomnum.getFloat(m_MaxGravity.m_Vector[2],m_MinGravity.m_Vector[2]);
00148 Particule.SetParticuleGravity(Gravity);
00149 Particule.PrecalculeParticuleTrajectory(0,Particule.GetParticuleLife());
00150 m_VecParticule.push_back(Particule);
00151 }
00152 }
00153 glPopMatrix();
00154
00155 if(m_VecParticule.size()>0)
00156 {
00157
00158 for(i=0,m_ItVecParticule=m_VecParticule.begin();i<m_VecParticule.size();m_ItVecParticule++,i++)
00159 {
00160 m_ItVecParticule->Draw();
00161 if(!m_Pause)m_ItVecParticule->DecreaseLifeSpan();
00162 if(!m_State)m_ItVecParticule->DecreaseLifeSpan();
00163 if(m_ItVecParticule->GetParticuleLife()<0)
00164 {
00165 m_VecParticule.erase(m_ItVecParticule);
00166 }
00167 }
00168 }*/
|
|
|
Définition à la ligne 144 du fichier ExCSDKParticuleSyteme.h.
00144 {m_MaxAcceleration=Acceleration;}
|
|
|
Définition à la ligne 134 du fichier ExCSDKParticuleSyteme.h. Références m_MaxBlending.
00134 {m_MaxBlending=Blending;}
|
|
|
Définition à la ligne 129 du fichier ExCSDKParticuleSyteme.h. Références m_MaxColorB.
00129 {m_MaxColorB=ColorB;}
|
|
|
Définition à la ligne 124 du fichier ExCSDKParticuleSyteme.h. Références m_MaxColorG.
00124 {m_MaxColorG=ColorG;}
|
|
|
Définition à la ligne 119 du fichier ExCSDKParticuleSyteme.h. Références m_MaxColorR.
00119 {m_MaxColorR=ColorR;}
|
|
|
Définition à la ligne 104 du fichier ExCSDKParticuleSyteme.h. Références m_MaxLifeSpan.
00104 {m_MaxLifeSpan=life;}
|
|
|
Définition à la ligne 109 du fichier ExCSDKParticuleSyteme.h. Références m_MaxSize.
00109 {m_MaxSize=Size;}
|
|
|
Définition à la ligne 139 du fichier ExCSDKParticuleSyteme.h.
00139 {m_MaxVelocity=Velocity;}
|
|
|
Définition à la ligne 114 du fichier ExCSDKParticuleSyteme.h. Références m_MaxWeight.
00114 {m_MaxWeight=Weight;}
|
|
|
Définition à la ligne 146 du fichier ExCSDKParticuleSyteme.h.
00146 {m_MinAcceleration=Acceleration;}
|
|
|
Définition à la ligne 136 du fichier ExCSDKParticuleSyteme.h. Références m_MinBlending.
00136 {m_MinBlending=Blending;}
|
|
|
Définition à la ligne 131 du fichier ExCSDKParticuleSyteme.h. Références m_MinColorB.
00131 {m_MinColorB=ColorB;}
|
|
|
Définition à la ligne 126 du fichier ExCSDKParticuleSyteme.h. Références m_MinColorG.
00126 {m_MinColorG=ColorG;}
|
|
|
Définition à la ligne 121 du fichier ExCSDKParticuleSyteme.h. Références m_MinColorR.
00121 {m_MinColorR=ColorR;}
|
|
|
Définition à la ligne 106 du fichier ExCSDKParticuleSyteme.h. Références m_MinLifeSpan.
00106 {m_MinLifeSpan=life;}
|
|
|
Définition à la ligne 111 du fichier ExCSDKParticuleSyteme.h. Références m_MinSize.
00111 {m_MinSize=Size;}
|
|
|
Définition à la ligne 141 du fichier ExCSDKParticuleSyteme.h.
00141 {m_MinVelocity=Velocity;}
|
|
|
Définition à la ligne 116 du fichier ExCSDKParticuleSyteme.h. Références m_MinWeight.
00116 {m_MinWeight=Weight;}
|
|
|
Définition à la ligne 94 du fichier ExCSDKParticuleSyteme.h. Références m_ParticuleSystemeName.
00095 {return m_ParticuleSystemeName;}
|
|
|
Définition à la ligne 97 du fichier ExCSDKParticuleSyteme.h.
00098 {return m_State;}
|
|
|
Définition à la ligne 191 du fichier ExCSDKParticuleSyteme.cpp.
00193 {
00194 /* SetParticuleTexture("star");
00195 m_Type=PARTICULE_TEXTURE;
00196
00197 int i=0;
00198 char ch;
00199 int FileSize;
00200 FILE *MyFile;
00201 bool endfile=false;
00202 std::string StBuffer;
00203 char buffer[255],bufferbis[255];
00204 std::vector<float> vecvalue;
00205
00206
00207 sprintf(buffer,"../Data/ParticuleSystem/%s",FileName);
00208 m_ParticuleSystemeName=new char[strlen(FileName)];
00209 sprintf(m_ParticuleSystemeName,"%s",FileName);
00210
00211 MyFile=fopen (buffer,"r");
00212 if(!MyFile)
00213 {
00214 sprintf(bufferbis,"Particule syteme File not found:%s",buffer);
00215 AfxMessageBox(bufferbis);
00216 return false;
00217 }else
00218 {
00219 sprintf(buffer,"Loading Particule systeme file :%s",FileName);
00220 AfxMessageBox(buffer);
00221
00222 fseek(MyFile,0,SEEK_END);
00223 FileSize=ftell(MyFile);
00224 sprintf(bufferbis,"Size:%d",FileSize);
00225 AfxMessageBox(bufferbis);
00226 //Start of file
00227 fseek(MyFile,0,SEEK_SET);
00228 do
00229 {
00230 fread(&ch,sizeof(char),1,MyFile);
00231 }while(ch!='#');
00232 //reading file type;
00233 do
00234 {
00235 fread(&ch,sizeof(char),1,MyFile);
00236 StBuffer=StBuffer+ch;
00237 }while(ch!='#');
00238 if(strcmp(StBuffer.data(),"particulesystem#")==0)
00239 {
00240 for(i=0;i<44;i++)
00241 {
00242 StBuffer.erase(StBuffer.begin(),StBuffer.end());
00243 do
00244 {
00245 fread(&ch,sizeof(char),1,MyFile);
00246 StBuffer=StBuffer+ch;
00247 }while(ch!='#');
00248 StBuffer.erase(StBuffer.begin(),StBuffer.end());
00249 do
00250 {
00251 fread(&ch,sizeof(char),1,MyFile);
00252 StBuffer=StBuffer+ch;
00253 }while(ch!='#');
00254
00255 StBuffer.erase(StBuffer.end()-1,StBuffer.end());
00256
00257 try
00258 {
00259 vecvalue.push_back(atof(StBuffer.data()));
00260 }catch(...)
00261 {
00262 vecvalue.push_back(0);
00263 }
00264 }
00265
00266
00267 //read texture for particule
00268 StBuffer.erase(StBuffer.begin(),StBuffer.end());
00269 do
00270 {
00271 fread(&ch,sizeof(char),1,MyFile);
00272 StBuffer=StBuffer+ch;
00273 }while(ch!='#');
00274
00275 StBuffer.erase(StBuffer.begin(),StBuffer.end());
00276 do
00277 {
00278 fread(&ch,sizeof(char),1,MyFile);
00279 StBuffer=StBuffer+ch;
00280 }while(ch!='#');
00281 StBuffer.erase(StBuffer.end()-1,StBuffer.end());
00282
00283 SetParticuleTexture((char *)StBuffer.data());
00284 //-----------------------------------
00285 m_EmissionRate =vecvalue.at(0);
00286 m_MaxParticule =vecvalue.at(1);
00287 m_TypeEmmeteur=vecvalue.at(2);
00288 m_P1.SetValue(vecvalue.at(3),vecvalue.at(4),vecvalue.at(5));
00289 m_P2.SetValue(vecvalue.at(6),vecvalue.at(7),vecvalue.at(8));
00290 m_rayon=vecvalue.at(9);
00291 m_vitesseangle=vecvalue.at(10);
00292 m_MaxLifeSpan = vecvalue.at(11);
00293 m_MinLifeSpan = vecvalue.at(12);
00294 m_MaxSize = vecvalue.at(13);
00295 m_MinSize = vecvalue.at(14);
00296 m_MaxWeight = vecvalue.at(15);
00297 m_MinWeight = vecvalue.at(16);
00298 m_MaxColorR = vecvalue.at(17);
00299 m_MinColorR = vecvalue.at(18);
00300 m_MaxColorG = vecvalue.at(19);
00301 m_MinColorG = vecvalue.at(20);
00302 m_MaxColorB = vecvalue.at(21);
00303 m_MinColorB = vecvalue.at(22);
00304 m_MaxBlending = vecvalue.at(23);
00305 m_MinBlending = vecvalue.at(24);
00306 m_MaxVelocity.SetValue(vecvalue.at(25),vecvalue.at(26),vecvalue.at(27));
00307 m_MinVelocity.SetValue(vecvalue.at(28),vecvalue.at(29),vecvalue.at(30));
00308 m_MaxAcceleration.SetValue(vecvalue.at(31),vecvalue.at(32),vecvalue.at(33));
00309 m_MinAcceleration.SetValue(vecvalue.at(34),vecvalue.at(35),vecvalue.at(36));
00310 m_MaxGravity.SetValue(vecvalue.at(37),vecvalue.at(38),vecvalue.at(39));
00311 m_MinGravity.SetValue(vecvalue.at(40),vecvalue.at(41),vecvalue.at(42));
00312
00313 m_Type = vecvalue.at(43);
00314
00315 return true;
00316 }else
00317 {
00318 sprintf(buffer,"%s is not a valide particule syteme file",FileName);
00319 AfxMessageBox(buffer);
00320 return false;
00321 }
00322 fclose(MyFile);
00323 }*/
00324 return false;
|
|
|
Définition à la ligne 187 du fichier ExCSDKParticuleSyteme.cpp. Référencé par SetParticuleTexture().
00189 {
00190 return true;
|
|
|
Définition à la ligne 176 du fichier ExCSDKParticuleSyteme.cpp. Références m_Pause.
00178 {
00179 m_Pause=true;
|
|
|
|
|
|
Définition à la ligne 143 du fichier ExCSDKParticuleSyteme.h.
00144 {m_MaxAcceleration=Acceleration;}
|
|
|
Définition à la ligne 133 du fichier ExCSDKParticuleSyteme.h.
00134 {m_MaxBlending=Blending;}
|
|
|
Définition à la ligne 128 du fichier ExCSDKParticuleSyteme.h.
00129 {m_MaxColorB=ColorB;}
|
|
|
Définition à la ligne 123 du fichier ExCSDKParticuleSyteme.h.
00124 {m_MaxColorG=ColorG;}
|
|
|
Définition à la ligne 118 du fichier ExCSDKParticuleSyteme.h.
00119 {m_MaxColorR=ColorR;}
|
|
|
Définition à la ligne 103 du fichier ExCSDKParticuleSyteme.h.
00104 {m_MaxLifeSpan=life;}
|
|
|
Définition à la ligne 108 du fichier ExCSDKParticuleSyteme.h.
00109 {m_MaxSize=Size;}
|
|
|
Définition à la ligne 138 du fichier ExCSDKParticuleSyteme.h.
00139 {m_MaxVelocity=Velocity;}
|
|
|
Définition à la ligne 113 du fichier ExCSDKParticuleSyteme.h.
00114 {m_MaxWeight=Weight;}
|
|
|
Définition à la ligne 145 du fichier ExCSDKParticuleSyteme.h.
00145 {return m_MaxAcceleration;}
|
|
|
Définition à la ligne 135 du fichier ExCSDKParticuleSyteme.h. Références m_MaxBlending.
00135 {return m_MaxBlending;}
|
|
|
Définition à la ligne 130 du fichier ExCSDKParticuleSyteme.h. Références m_MaxColorB.
00130 {return m_MaxColorB;}
|
|
|
Définition à la ligne 125 du fichier ExCSDKParticuleSyteme.h. Références m_MaxColorG.
00125 {return m_MaxColorG;}
|
|
|
Définition à la ligne 120 du fichier ExCSDKParticuleSyteme.h. Références m_MaxColorR.
00120 {return m_MaxColorR;}
|
|
|
Définition à la ligne 105 du fichier ExCSDKParticuleSyteme.h. Références m_MaxLifeSpan.
00105 {return m_MaxLifeSpan;}
|
|
|
Définition à la ligne 110 du fichier ExCSDKParticuleSyteme.h. Références m_MaxSize.
00110 {return m_MaxSize;}
|
|
|
Définition à la ligne 140 du fichier ExCSDKParticuleSyteme.h.
00140 {return m_MaxVelocity;}
|
|
|
Définition à la ligne 115 du fichier ExCSDKParticuleSyteme.h. Références m_MaxWeight.
00115 {return m_MaxWeight;}
|
|
|
Définition à la ligne 46 du fichier ExCSDKParticuleSyteme.cpp. Références m_ParticuleSystemeName.
00048 {
00049 m_ParticuleSystemeName=new char[strlen(name)];
00050 strcpy(m_ParticuleSystemeName,name);
|
|
|
Définition à la ligne 98 du fichier ExCSDKParticuleSyteme.h. Références m_State.
00098 {return m_State;}
|
|
|
Définition à la ligne 58 du fichier ExCSDKParticuleSyteme.cpp. Références LoadTexture().
00060 {
00061 LoadTexture(texture);
|
|
|
Définition à la ligne 52 du fichier ExCSDKParticuleSyteme.cpp. Références m_Type.
|
|
|
Définition à la ligne 170 du fichier ExCSDKParticuleSyteme.cpp. Références m_Pause, et m_State.
|
|
|
Définition à la ligne 181 du fichier ExCSDKParticuleSyteme.cpp. Références m_Pause, et m_State.
|
|
|
Définition à la ligne 50 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(). |
|
|
Définition à la ligne 42 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(). |
|
|
Définition à la ligne 32 du fichier ExCSDKParticuleSyteme.h. |
|
|
Définition à la ligne 74 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(). |
|
|
Définition à la ligne 70 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), GetParticuleMaxBlending(), et SetParticuleMinBlending(). |
|
|
Définition à la ligne 68 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), GetParticuleMaxColorB(), et SetParticuleMinColorB(). |
|
|
Définition à la ligne 66 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), GetParticuleMaxColorG(), et SetParticuleMinColorG(). |
|
|
Définition à la ligne 64 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), GetParticuleMaxColorR(), et SetParticuleMinColorR(). |
|
|
Définition à la ligne 76 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(). |
|
|
Définition à la ligne 58 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), GetParticuleMaxLife(), et SetParticuleMinLife(). |
|
|
Définition à la ligne 43 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(). |
|
|
Définition à la ligne 60 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), GetParticuleMaxSize(), et SetParticuleMinSize(). |
|
|
Définition à la ligne 72 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(). |
|
|
Définition à la ligne 62 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), GetParticuleMaxWeight(), et SetParticuleMinWeight(). |
|
|
Définition à la ligne 75 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(). |
|
|
Définition à la ligne 71 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), et GetParticuleMinBlending(). |
|
|
Définition à la ligne 69 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), et GetParticuleMinColorB(). |
|
|
Définition à la ligne 67 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), et GetParticuleMinColorG(). |
|
|
Définition à la ligne 65 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), et GetParticuleMinColorR(). |
|
|
Définition à la ligne 77 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(). |
|
|
Définition à la ligne 59 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), et GetParticuleMinLife(). |
|
|
Définition à la ligne 61 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), et GetParticuleMinSize(). |
|
|
Définition à la ligne 73 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(). |
|
|
Définition à la ligne 63 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), et GetParticuleMinWeight(). |
|
|
Définition à la ligne 45 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(). |
|
|
Définition à la ligne 46 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(). |
|
|
Définition à la ligne 39 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), GetParticuleSystemeName(), et SetParticuleSystemeName(). |
|
|
Définition à la ligne 36 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), Pause(), Start(), et Stop(). |
|
|
Définition à la ligne 47 du fichier ExCSDKParticuleSyteme.h. |
|
|
Définition à la ligne 49 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(). |
|
|
Définition à la ligne 35 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), SetParticuleSystemeState(), Start(), et Stop(). |
|
|
Définition à la ligne 54 du fichier ExCSDKParticuleSyteme.h. |
|
|
Définition à la ligne 38 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(). |
|
|
Définition à la ligne 57 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(), et SetParticuleType(). |
|
|
Définition à la ligne 44 du fichier ExCSDKParticuleSyteme.h. Référencé par ExCSDKParticuleSyteme(). |
|
|
Définition à la ligne 31 du fichier ExCSDKParticuleSyteme.h. |
|
|
Définition à la ligne 51 du fichier ExCSDKParticuleSyteme.h. |
1.3-rc1