#include <ParticleSys.h>
Inherits SubsystemInterface, and Snapshot.
Inherited by W3DParticleSystemManager.
Public Types | |
| typedef std::list< ParticleSystem * > | ParticleSystemList |
| typedef std::list< ParticleSystem * >::iterator | ParticleSystemListIt |
| typedef std::hash_map< AsciiString, ParticleSystemTemplate *, rts::hash< AsciiString >, rts::equal_to< AsciiString > > | TemplateMap |
Public Member Functions | |
| ParticleSystemManager (void) | |
| virtual | ~ParticleSystemManager () |
| virtual void | init (void) |
| initialize the manager | |
| virtual void | reset (void) |
| reset the manager and all particle systems | |
| virtual void | update (void) |
| update all particle systems | |
| virtual Int | getOnScreenParticleCount (void)=0 |
| returns the number of particles on screen | |
| virtual void | setOnScreenParticleCount (int count) |
| ParticleSystemTemplate * | findTemplate (const AsciiString &name) const |
| ParticleSystemTemplate * | findParentTemplate (const AsciiString &name, int parentNum) const |
| ParticleSystemTemplate * | newTemplate (const AsciiString &name) |
| ParticleSystem * | createParticleSystem (const ParticleSystemTemplate *sysTemplate, Bool createSlaves=TRUE) |
| given a template, instantiate a particle system | |
| ParticleSystemID | createAttachedParticleSystemID (const ParticleSystemTemplate *sysTemplate, Object *attachTo, Bool createSlaves=TRUE) |
| given a template, instantiate a particle system attached to the given object, and return its ID | |
| ParticleSystem * | findParticleSystem (ParticleSystemID id) |
| find a particle system given a unique system identifier | |
| void | destroyParticleSystemByID (ParticleSystemID id) |
| destroy the particle system with the given id (if it still exists) | |
| TemplateMap::iterator | beginParticleSystemTemplate () |
| return iterators to the particle system template | |
| TemplateMap::iterator | endParticleSystemTemplate () |
| TemplateMap::const_iterator | beginParticleSystemTemplate () const |
| TemplateMap::const_iterator | endParticleSystemTemplate () const |
| void | destroyAttachedSystems (Object *obj) |
| destroy attached systems to object | |
| void | setLocalPlayerIndex (Int index) |
| void | addParticle (Particle *particleToAdd, ParticlePriorityType priority) |
| void | removeParticle (Particle *particleToRemove) |
| Int | removeOldestParticles (UnsignedInt count, ParticlePriorityType priorityCap) |
| UnsignedInt | getParticleCount (void) const |
| UnsignedInt | getFieldParticleCount (void) const |
| UnsignedInt | getParticleSystemCount (void) const |
| ParticleSystemList & | getAllParticleSystems (void) |
| virtual void | doParticles (RenderInfoClass &rinfo)=0 |
| virtual void | queueParticleRender ()=0 |
| virtual void | preloadAssets (TimeOfDay timeOfDay) |
| void | friend_addParticleSystem (ParticleSystem *particleSystemToAdd) |
| void | friend_removeParticleSystem (ParticleSystem *particleSystemToRemove) |
Public Member Functions inherited from SubsystemInterface | |
| SubsystemInterface () | |
| virtual | ~SubsystemInterface () |
| virtual void | postProcessLoad () |
| virtual void | draw (void) |
| void | UPDATE (void) |
| void | DRAW (void) |
| AsciiString | getName (void) |
| void | setName (AsciiString name) |
Public Member Functions inherited from Snapshot | |
| Snapshot (void) | |
| ~Snapshot (void) | |
Protected Member Functions | |
| virtual void | crc (Xfer *xfer) |
| virtual void | xfer (Xfer *xfer) |
| virtual void | loadPostProcess (void) |
Protected Attributes | |
| Particle * | m_allParticlesHead [NUM_PARTICLE_PRIORITIES] |
| Particle * | m_allParticlesTail [NUM_PARTICLE_PRIORITIES] |
| ParticleSystemID | m_uniqueSystemID |
| unique system ID to assign to each system created | |
| ParticleSystemList | m_allParticleSystemList |
| UnsignedInt | m_particleCount |
| UnsignedInt | m_fieldParticleCount |
| this does not need to be xfered, since it is evaluated every frame | |
| UnsignedInt | m_particleSystemCount |
| Int | m_onScreenParticleCount |
| number of particles displayed on screen per frame | |
| UnsignedInt | m_lastLogicFrameUpdate |
| Int | m_localPlayerIndex |
| used to tell particle systems which particles can be skipped due to player shroud status | |
Protected Attributes inherited from SubsystemInterface | |
| AsciiString | m_name |
The particle system manager, responsible for maintaining all ParticleSystems
Definition at line 713 of file ParticleSys.h.
| typedef std::list<ParticleSystem*> ParticleSystemManager::ParticleSystemList |
Definition at line 719 of file ParticleSys.h.
| typedef std::list<ParticleSystem*>::iterator ParticleSystemManager::ParticleSystemListIt |
Definition at line 720 of file ParticleSys.h.
| typedef std::hash_map<AsciiString, ParticleSystemTemplate *, rts::hash<AsciiString>, rts::equal_to<AsciiString> > ParticleSystemManager::TemplateMap |
Definition at line 721 of file ParticleSys.h.
| ParticleSystemManager::ParticleSystemManager | ( | void | ) |
Definition at line 2825 of file ParticleSys.cpp.
|
virtual |
Definition at line 2853 of file ParticleSys.cpp.
| void ParticleSystemManager::addParticle | ( | Particle * | particleToAdd, |
| ParticlePriorityType | priority ) |
Add a particle to the global particle list.
Definition at line 3116 of file ParticleSys.cpp.
|
inline |
return iterators to the particle system template
Definition at line 756 of file ParticleSys.h.
|
inline |
Definition at line 758 of file ParticleSys.h.
|
protectedvirtual |
| ParticleSystemID ParticleSystemManager::createAttachedParticleSystemID | ( | const ParticleSystemTemplate * | sysTemplate, |
| Object * | attachTo, | ||
| Bool | createSlaves = TRUE ) |
given a template, instantiate a particle system attached to the given object, and return its ID
given a template, instantiate a particle system. if attachTo is not null, attach the particle system to the given object. return the particle system's ID, NOT its pointer.
Definition at line 2982 of file ParticleSys.cpp.
| ParticleSystem * ParticleSystemManager::createParticleSystem | ( | const ParticleSystemTemplate * | sysTemplate, |
| Bool | createSlaves = TRUE ) |
given a template, instantiate a particle system
Given a file containing particle system properties, create a new instance of it
Definition at line 2968 of file ParticleSys.cpp.
| void ParticleSystemManager::destroyAttachedSystems | ( | Object * | obj | ) |
destroy attached systems to object
Destroy any particle systems that are attached to this object
Definition at line 3087 of file ParticleSys.cpp.
| void ParticleSystemManager::destroyParticleSystemByID | ( | ParticleSystemID | id | ) |
destroy the particle system with the given id (if it still exists)
destroy the particle system with the given id (if it still exists)
Definition at line 3021 of file ParticleSys.cpp.
|
pure virtual |
Implemented in W3DParticleSystemManager.
|
inline |
Definition at line 757 of file ParticleSys.h.
|
inline |
Definition at line 759 of file ParticleSys.h.
| ParticleSystemTemplate * ParticleSystemManager::findParentTemplate | ( | const AsciiString & | name, |
| int | parentNum ) const |
Find a particle system's parent. Should really only be called by TheScriptEngine
Definition at line 3064 of file ParticleSys.cpp.
| ParticleSystem * ParticleSystemManager::findParticleSystem | ( | ParticleSystemID | id | ) |
find a particle system given a unique system identifier
Find a particle system with the matching system id
Definition at line 2996 of file ParticleSys.cpp.
| ParticleSystemTemplate * ParticleSystemManager::findTemplate | ( | const AsciiString & | name | ) | const |
Locate an existing ParticleSystemTemplate
Definition at line 3031 of file ParticleSys.cpp.
| void ParticleSystemManager::friend_addParticleSystem | ( | ParticleSystem * | particleSystemToAdd | ) |
Add a particle system to the master particle system list.
Definition at line 3178 of file ParticleSys.cpp.
| void ParticleSystemManager::friend_removeParticleSystem | ( | ParticleSystem * | particleSystemToRemove | ) |
Remove a particle system from the master particle system list.
Definition at line 3187 of file ParticleSys.cpp.
|
inline |
Definition at line 775 of file ParticleSys.h.
|
inline |
Definition at line 770 of file ParticleSys.h.
|
pure virtual |
returns the number of particles on screen
Implemented in W3DParticleSystemManager.
|
inline |
Definition at line 768 of file ParticleSys.h.
|
inline |
Definition at line 772 of file ParticleSys.h.
|
virtual |
initialize the manager
Initialize the manager
Read INI data and build templates
Implements SubsystemInterface.
Definition at line 2867 of file ParticleSys.cpp.
|
protectedvirtual |
| ParticleSystemTemplate * ParticleSystemManager::newTemplate | ( | const AsciiString & | name | ) |
Create a new ParticleSystemTemplate
Definition at line 3046 of file ParticleSys.cpp.
|
virtual |
Preload particle system textures
Definition at line 3228 of file ParticleSys.cpp.
|
pure virtual |
Implemented in W3DParticleSystemManager.
| Int ParticleSystemManager::removeOldestParticles | ( | UnsignedInt | count, |
| ParticlePriorityType | priorityCap ) |
Remove the oldest N number of particles from the lowest priority lists first. We will not remove particles from any priorities higher or equal to the priorityCap parameter.
Definition at line 3201 of file ParticleSys.cpp.
| void ParticleSystemManager::removeParticle | ( | Particle * | particleToRemove | ) |
Remove a particle from the global particle list.
Definition at line 3148 of file ParticleSys.cpp.
|
virtual |
reset the manager and all particle systems
Reset the manager and all particle systems
Implements SubsystemInterface.
Definition at line 2892 of file ParticleSys.cpp.
|
inline |
Definition at line 764 of file ParticleSys.h.
|
virtual |
sets the count of the particles on screen after each frame
Definition at line 2960 of file ParticleSys.cpp.
|
virtual |
update all particle systems
Update all particle systems
Implements SubsystemInterface.
Definition at line 2928 of file ParticleSys.cpp.
|
protectedvirtual |
Xfer method Version Info: 1: Initial version
Implements Snapshot.
Definition at line 3256 of file ParticleSys.cpp.
|
protected |
Definition at line 793 of file ParticleSys.h.
|
protected |
Definition at line 794 of file ParticleSys.h.
|
protected |
Definition at line 798 of file ParticleSys.h.
|
protected |
this does not need to be xfered, since it is evaluated every frame
Definition at line 801 of file ParticleSys.h.
|
protected |
Definition at line 804 of file ParticleSys.h.
|
protected |
used to tell particle systems which particles can be skipped due to player shroud status
Definition at line 805 of file ParticleSys.h.
|
protected |
number of particles displayed on screen per frame
Definition at line 803 of file ParticleSys.h.
|
protected |
Definition at line 800 of file ParticleSys.h.
|
protected |
Definition at line 802 of file ParticleSys.h.
|
protected |
unique system ID to assign to each system created
Definition at line 796 of file ParticleSys.h.