Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ParticleSystemManager Class Reference

Manages a set of individual ParticleSystem objects, so that each individual one doesn't have to be updated and rendered every frame. More...

#include <particleSystemManager.h>

List of all members.

Public Member Functions

 ParticleSystemManager (int every_nth_frame=1)
 default constructor

void set_frame_stepping (int every_nth_frame)
int get_frame_stepping (void) const
void attach_particlesystem (ParticleSystem *ps)
void remove_particlesystem (ParticleSystem *ps)
 removes a ps from the maintenance list

void clear (void)
void do_particles (float dt)
 does an update and render for each ps in the list.


Private Attributes

plist< PointerTo< ParticleSystem > > _ps_list
int _nth_frame
int _cur_frame


Detailed Description

Manages a set of individual ParticleSystem objects, so that each individual one doesn't have to be updated and rendered every frame.

Definition at line 42 of file particleSystemManager.h.


Constructor & Destructor Documentation

ParticleSystemManager::ParticleSystemManager int  every_nth_frame = 1  ) 
 

default constructor

Definition at line 40 of file particleSystemManager.cxx.

References _ps_list, and PT.


Member Function Documentation

void ParticleSystemManager::attach_particlesystem ParticleSystem ps  )  [inline]
 

Definition at line 54 of file particleSystemManager.I.

References _ps_list, and INLINE.

void ParticleSystemManager::clear void   )  [inline]
 

Definition at line 71 of file particleSystemManager.I.

void ParticleSystemManager::do_particles float  dt  ) 
 

does an update and render for each ps in the list.

this is probably the one you want to use. Rendering is the expensive operation, and particles REALLY should at least be updated every frame, so nth_frame stepping applies only to rendering.

Definition at line 82 of file particleSystemManager.cxx.

References _ps_list, ParticleSystem::get_active_system_flag(), ParticleSystem::get_system_age(), ParticleSystem::get_system_grows_older_flag(), ParticleSystem::get_system_lifespan(), ParticleSystem::render(), ParticleSystem::set_system_age(), and ParticleSystem::update().

int ParticleSystemManager::get_frame_stepping void   )  const [inline]
 

Definition at line 42 of file particleSystemManager.I.

References ParticleSystem::_manager, _ps_list, INLINE, and PT.

void ParticleSystemManager::remove_particlesystem ParticleSystem ps  ) 
 

removes a ps from the maintenance list

Definition at line 53 of file particleSystemManager.cxx.

References _ps_list.

void ParticleSystemManager::set_frame_stepping int  every_nth_frame  )  [inline]
 

Definition at line 30 of file particleSystemManager.I.

References _nth_frame, and INLINE.


Member Data Documentation

int ParticleSystemManager::_cur_frame [private]
 

Definition at line 48 of file particleSystemManager.h.

int ParticleSystemManager::_nth_frame [private]
 

Definition at line 47 of file particleSystemManager.h.

Referenced by set_frame_stepping().

plist< PointerTo< ParticleSystem > > ParticleSystemManager::_ps_list [private]
 

Definition at line 45 of file particleSystemManager.h.

Referenced by attach_particlesystem(), do_particles(), get_frame_stepping(), ParticleSystemManager(), and remove_particlesystem().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:53:15 2003 for Panda by doxygen1.3