#include <particle.h>
Inheritance diagram for ParticleSystem:
Public Methods | |
ParticleSystem () | |
~ParticleSystem () | |
int | Compare (const ParticleSystem &ParticleSys) |
int | GetMyPosition () const |
void | SetMyPosition (int newPosition) |
int | GetNumAlive () |
void | SetupParticles () |
PARTICLE * | Add () |
void | Remove () |
virtual void | SetDefaults (PARTICLE *Particle) |
virtual void | SetShape (PARTICLE *Particle) |
virtual void | Update () |
virtual void | Render (int nodeid) |
Public Attributes | |
int | linkPosition |
LinkedList< PARTICLE > | ParticleList |
SystemInfo | SysInfo |
|
Definition at line 64 of file particle.h.
00064 {}; |
|
Definition at line 65 of file particle.h.
00065 {}; |
|
Definition at line 91 of file particle.cpp. References LinkedList< PARTICLE >::Insert(), PARTICLE::linkPosition, SystemInfo::numParticles, ParticleList, SetDefaults(), SetShape(), and SysInfo.
00092 { 00093 PARTICLE* newParticle = new PARTICLE; 00094 SetDefaults(newParticle); 00095 SetShape(newParticle); 00096 newParticle->linkPosition = ++SysInfo.numParticles; 00097 ParticleList.Insert(newParticle); 00098 return newParticle; 00099 } |
|
Definition at line 101 of file particle.cpp. References bigger, linkPosition, same, and smaller.
00102 { 00103 if (linkPosition < ParticleSys.linkPosition) 00104 return smaller; 00105 if (linkPosition > ParticleSys.linkPosition) 00106 return bigger; 00107 else 00108 return same; 00109 } |
|
Definition at line 68 of file particle.h. References linkPosition.
00068 {return linkPosition;} |
|
Definition at line 56 of file particle.cpp. References ParticleInfo::Alive, LinkedList< PARTICLE >::Get(), SystemInfo::numParticles, ParticleList, PARTICLE::PartInfo, and SysInfo. Referenced by ParticleManager::Update().
00057 { 00058 int numParticles = 0; 00059 PARTICLE* tempParticle; 00060 for (int loop = 1; loop <= SysInfo.numParticles; loop++) 00061 { 00062 tempParticle = ParticleList.Get(loop); 00063 if (tempParticle->PartInfo.Alive) 00064 numParticles++; 00065 } 00066 return numParticles; 00067 } |
|
Definition at line 82 of file particle.cpp. References LinkedList< PARTICLE >::Delete(), SystemInfo::numParticles, ParticleList, and SysInfo.
00083 { 00084 if (SysInfo.numParticles > 0) 00085 { 00086 ParticleList.Delete(1); 00087 --SysInfo.numParticles; 00088 } 00089 } |
|
Reimplemented in Spark, Roman, and Bouncy. Definition at line 36 of file particle.cpp. Referenced by ParticleManager::Render().
00037 { 00038 // Add a default method 00039 } |
|
Reimplemented in Spark, Roman, and Bouncy. Definition at line 46 of file particle.cpp. Referenced by Add(), and SetupParticles().
00047 { 00048 // Add a default method 00049 } |
|
Definition at line 69 of file particle.h. References linkPosition.
00069 {linkPosition = newPosition;} |
|
Reimplemented in Spark, Roman, and Bouncy. Definition at line 51 of file particle.cpp. Referenced by Add(), and SetupParticles().
00052 { 00053 // Add a default method 00054 } |
|
Definition at line 70 of file particle.cpp. References LinkedList< PARTICLE >::Insert(), PARTICLE::linkPosition, SystemInfo::numParticles, ParticleList, SetDefaults(), SetShape(), and SysInfo. Referenced by ParticleManager::Add().
00071 { 00072 for (int loop = 1; loop <= SysInfo.numParticles; loop++) 00073 { 00074 PARTICLE* newParticle = new PARTICLE; 00075 SetDefaults(newParticle); 00076 SetShape(newParticle); 00077 newParticle->linkPosition = loop; 00078 ParticleList.Insert(newParticle); 00079 } 00080 } |
|
Reimplemented in Spark, Roman, and Bouncy. Definition at line 41 of file particle.cpp. Referenced by ParticleManager::Update().
00042 { 00043 // Add a default method 00044 } |
|
Definition at line 70 of file particle.h. Referenced by ParticleManager::Add(), Compare(), GetMyPosition(), ParticleManager::Remove(), ParticleManager::RemoveType(), SetMyPosition(), and ParticleManager::Update(). |
|
Definition at line 72 of file particle.h. Referenced by Add(), GetNumAlive(), Remove(), Bouncy::Render(), Roman::Render(), Spark::Render(), SetupParticles(), Bouncy::Update(), Roman::Update(), Spark::Update(), and ParticleManager::Update(). |
|
Definition at line 73 of file particle.h. Referenced by Add(), CreateBouncy(), CreateRomanCandle(), CreateSparks(), GetNumAlive(), ParticleManager::Remove(), Remove(), ParticleManager::RemoveType(), Bouncy::Render(), Roman::Render(), Spark::Render(), ParticleManager::SetBlendMode(), Bouncy::SetDefaults(), Roman::SetDefaults(), Spark::SetDefaults(), ParticleManager::SetId(), ParticleManager::SetTextureId(), ParticleManager::SetType(), SetupParticles(), ParticleManager::SetVisibility(), ParticleManager::ToggleVisibility(), Bouncy::Update(), Roman::Update(), Spark::Update(), and ParticleManager::Update(). |