Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
W3DParticleSystemManager Class Reference

#include <W3DParticleSys.h>

Inherits ParticleSystemManager.

Public Member Functions

 W3DParticleSystemManager ()
 
 ~W3DParticleSystemManager ()
 
virtual void doParticles (RenderInfoClass &rinfo)
 
virtual void queueParticleRender ()
 returns the number of particles shown on screen per frame
 
virtual Int getOnScreenParticleCount ()
 returns the number of particles on screen
 
- Public Member Functions inherited from ParticleSystemManager
 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 void setOnScreenParticleCount (int count)
 
ParticleSystemTemplatefindTemplate (const AsciiString &name) const
 
ParticleSystemTemplatefindParentTemplate (const AsciiString &name, int parentNum) const
 
ParticleSystemTemplatenewTemplate (const AsciiString &name)
 
ParticleSystemcreateParticleSystem (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
 
ParticleSystemfindParticleSystem (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
 
ParticleSystemListgetAllParticleSystems (void)
 
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)
 

Additional Inherited Members

- Public Types inherited from ParticleSystemManager
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
 
- Protected Member Functions inherited from ParticleSystemManager
virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
- Protected Attributes inherited from ParticleSystemManager
Particlem_allParticlesHead [NUM_PARTICLE_PRIORITIES]
 
Particlem_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
 

Detailed Description

W3D implementation of the game display which is responsible for creating all interaction with the screen and updating the display

Definition at line 43 of file W3DParticleSys.h.

Constructor & Destructor Documentation

◆ W3DParticleSystemManager()

W3DParticleSystemManager::W3DParticleSystemManager ( )

Definition at line 53 of file W3DParticleSys.cpp.

◆ ~W3DParticleSystemManager()

W3DParticleSystemManager::~W3DParticleSystemManager ( )

Definition at line 75 of file W3DParticleSys.cpp.

Member Function Documentation

◆ doParticles()

void W3DParticleSystemManager::doParticles ( RenderInfoClass & rinfo)
virtual
Todo
lorenzen sez: this should be debug only:
Todo
lorenzen sez: declare these outside the sys loop, and put some in registers
Todo
Use both QUADS and TRIS for particles
Todo
Support animated texture particles
Todo
Todo
lorenzen sez: unimplemented code wastes cpu cycles
Todo
lorenzen sez: this should be debug only:
Todo
lorenzen sez: this should be debug only:

Implements ParticleSystemManager.

Definition at line 111 of file W3DParticleSys.cpp.

◆ getOnScreenParticleCount()

virtual Int W3DParticleSystemManager::getOnScreenParticleCount ( )
inlinevirtual

returns the number of particles on screen

Implements ParticleSystemManager.

Definition at line 53 of file W3DParticleSys.h.

◆ queueParticleRender()

void W3DParticleSystemManager::queueParticleRender ( )
virtual

returns the number of particles shown on screen per frame

Hack because DoParticles is called from Flush(), which is called multiple times per frame. We only want to render once.

Todo
Clean up the flag/Flush hack.

Implements ParticleSystemManager.

Definition at line 97 of file W3DParticleSys.cpp.


The documentation for this class was generated from the following files: