#include <particle.h>
Public Methods | |
ParticleManager () | |
~ParticleManager () | |
void | SetVisibility (int Id, bool State) |
void | ToggleVisibility (int Id) |
void | SetType (int Id, ParticleType Type) |
void | SetBlendMode (int Id, int BlendMode) |
void | SetTextureId (int Id, unsigned int TexID) |
void | SetId (int Id, int newId) |
void | Remove (int Id) |
void | RemoveType (ParticleType Type) |
void | Update () |
void | Render (int nodeid) |
ParticleSystem * | Add (ParticleSystem *PartSys) |
Public Attributes | |
int | numSystems |
LinkedList< ParticleSystem > | SystemList |
|
Definition at line 89 of file particle.h. References numSystems.
00089 {numSystems = 0;} |
|
Definition at line 90 of file particle.h.
00090 {}; |
|
Definition at line 207 of file particle.cpp. References LinkedList< ParticleSystem >::Insert(), ParticleSystem::linkPosition, numSystems, ParticleSystem::SetupParticles(), and SystemList. Referenced by CreateBouncy(), CreateRomanCandle(), and CreateSparks().
00208 { 00209 PartSys->SetupParticles(); 00210 PartSys->linkPosition = ++numSystems; 00211 SystemList.Insert(PartSys); 00212 return PartSys; 00213 } |
|
Definition at line 215 of file particle.cpp. References LinkedList< ParticleSystem >::Delete(), LinkedList< ParticleSystem >::Get(), SystemInfo::Id, ParticleSystem::linkPosition, numSystems, ParticleSystem::SysInfo, and SystemList.
00216 { 00217 for (int loop = 1; loop <= numSystems; loop++) 00218 { 00219 ParticleSystem* PartSys = SystemList.Get(loop); 00220 if (Id == PartSys->SysInfo.Id) 00221 { 00222 SystemList.Delete(PartSys->linkPosition); 00223 --numSystems; 00224 } 00225 } 00226 } |
|
Definition at line 228 of file particle.cpp. References LinkedList< ParticleSystem >::Delete(), LinkedList< ParticleSystem >::Get(), ParticleSystem::linkPosition, numSystems, ParticleType, ParticleSystem::SysInfo, SystemList, and SystemInfo::Type.
00229 { 00230 for (int loop = 1; loop <= numSystems; loop++) 00231 { 00232 ParticleSystem* PartSys = SystemList.Get(loop); 00233 if (Type == PartSys->SysInfo.Type) 00234 { 00235 SystemList.Delete(PartSys->linkPosition); 00236 --numSystems; 00237 } 00238 } 00239 } |
|
Definition at line 138 of file particle.cpp. References LinkedList< ParticleSystem >::Get(), numSystems, ParticleSystem::Render(), and SystemList. Referenced by RenderParticles().
00139 { 00140 for (int loop = 1; loop <= numSystems; loop++) 00141 { 00142 ParticleSystem* PartSys = SystemList.Get(loop); 00143 PartSys->Render(nodeid); 00144 } 00145 } |
|
Definition at line 167 of file particle.cpp. References SystemInfo::BlendMode, LinkedList< ParticleSystem >::Get(), SystemInfo::Id, numSystems, ParticleSystem::SysInfo, and SystemList.
00168 { 00169 for (int loop = 1; loop <= numSystems; loop++) 00170 { 00171 ParticleSystem* PartSys = SystemList.Get(loop); 00172 if (Id == PartSys->SysInfo.Id) 00173 PartSys->SysInfo.BlendMode = BlendMode; 00174 } 00175 } |
|
Definition at line 147 of file particle.cpp. References LinkedList< ParticleSystem >::Get(), SystemInfo::Id, numSystems, ParticleSystem::SysInfo, and SystemList.
00148 { 00149 for (int loop = 1; loop <= numSystems; loop++) 00150 { 00151 ParticleSystem* PartSys = SystemList.Get(loop); 00152 if (Id == PartSys->SysInfo.Id) 00153 PartSys->SysInfo.Id = newId; 00154 } 00155 } |
|
Definition at line 157 of file particle.cpp. References LinkedList< ParticleSystem >::Get(), SystemInfo::Id, numSystems, ParticleSystem::SysInfo, SystemList, and SystemInfo::TexID.
00158 { 00159 for (int loop = 1; loop <= numSystems; loop++) 00160 { 00161 ParticleSystem* PartSys = SystemList.Get(loop); 00162 if (Id == PartSys->SysInfo.Id) 00163 PartSys->SysInfo.TexID = TexID; 00164 } 00165 } |
|
Definition at line 177 of file particle.cpp. References LinkedList< ParticleSystem >::Get(), SystemInfo::Id, numSystems, ParticleType, ParticleSystem::SysInfo, SystemList, and SystemInfo::Type.
00178 { 00179 for (int loop = 1; loop <= numSystems; loop++) 00180 { 00181 ParticleSystem* PartSys = SystemList.Get(loop); 00182 if (Id == PartSys->SysInfo.Id) 00183 PartSys->SysInfo.Type = Type; 00184 } 00185 } |
|
Definition at line 187 of file particle.cpp. References LinkedList< ParticleSystem >::Get(), SystemInfo::Id, numSystems, ParticleSystem::SysInfo, SystemList, and SystemInfo::Visibility.
00188 { 00189 for (int loop = 1; loop <= numSystems; loop++) 00190 { 00191 ParticleSystem* PartSys = SystemList.Get(loop); 00192 if (Id == PartSys->SysInfo.Id) 00193 PartSys->SysInfo.Visibility = State; 00194 } 00195 } |
|
Definition at line 197 of file particle.cpp. References LinkedList< ParticleSystem >::Get(), SystemInfo::Id, numSystems, ParticleSystem::SysInfo, SystemList, and SystemInfo::Visibility.
00198 { 00199 for (int loop = 1; loop <= numSystems; loop++) 00200 { 00201 ParticleSystem* PartSys = SystemList.Get(loop); 00202 if (Id == PartSys->SysInfo.Id) 00203 PartSys->SysInfo.Visibility = !PartSys->SysInfo.Visibility; 00204 } 00205 } |
|
Definition at line 112 of file particle.cpp. References LinkedList< ParticleSystem >::Delete(), FindCurrentLeaf(), LinkedList< PARTICLE >::Get(), LinkedList< ParticleSystem >::Get(), ParticleSystem::GetNumAlive(), ParticleInfo::Leaf, ParticleSystem::linkPosition, SystemInfo::numParticles, numSystems, ParticleSystem::ParticleList, PARTICLE::PartInfo, ParticleInfo::Pos, ParticleSystem::SysInfo, SystemList, and ParticleSystem::Update(). Referenced by DrawGLScene().
00113 { 00114 int loop, innerloop; 00115 ParticleSystem* PartSys; 00116 PARTICLE* tempParticle; 00117 for (loop = 1; loop <= numSystems; loop++) 00118 { 00119 PartSys = SystemList.Get(loop); 00120 00121 if (!PartSys->GetNumAlive()) 00122 { 00123 SystemList.Delete(PartSys->linkPosition); 00124 numSystems--; 00125 } 00126 else 00127 { 00128 PartSys->Update(); 00129 for (innerloop = 1; innerloop < PartSys->SysInfo.numParticles; innerloop++) 00130 { 00131 tempParticle = PartSys->ParticleList.Get(innerloop); 00132 tempParticle->PartInfo.Leaf = FindCurrentLeaf(tempParticle->PartInfo.Pos, root); 00133 } 00134 } 00135 } 00136 } |
|
Definition at line 92 of file particle.h. Referenced by Add(), ParticleManager(), Remove(), RemoveType(), Render(), SetBlendMode(), SetId(), SetTextureId(), SetType(), SetVisibility(), ToggleVisibility(), and Update(). |
|
Definition at line 93 of file particle.h. Referenced by Add(), Remove(), RemoveType(), Render(), SetBlendMode(), SetId(), SetTextureId(), SetType(), SetVisibility(), ToggleVisibility(), and Update(). |