Panda3D
|
Manages a set of individual ParticleSystem objects, so that each individual one doesn't have to be updated and rendered every frame See Also : particleSystemManager.cxx. More...
#include "particleSystemManager.h"
Public Member Functions | |
ParticleSystemManager (int every_nth_frame=1) | |
default constructor | |
virtual | ~ParticleSystemManager () |
Destructor. | |
void | attach_particlesystem (ParticleSystem *ps) |
void | clear () |
void | do_particles (PN_stdfloat dt) |
does an update and render for each ps in the list. | |
void | do_particles (PN_stdfloat dt, ParticleSystem *ps, bool do_render=true) |
does an update and an optional render for a specific ps. | |
int | get_frame_stepping () const |
virtual void | output (ostream &out) const |
Write a string representation of this instance to <out>. | |
void | remove_particlesystem (ParticleSystem *ps) |
removes a ps from the maintenance list | |
void | set_frame_stepping (int every_nth_frame) |
virtual void | write (ostream &out, int indent=0) const |
Write a string representation of this instance to <out>. | |
virtual void | write_ps_list (ostream &out, int indent=0) const |
Write a string representation of this instance to <out>. |
Manages a set of individual ParticleSystem objects, so that each individual one doesn't have to be updated and rendered every frame See Also : particleSystemManager.cxx.
Definition at line 30 of file particleSystemManager.h.
ParticleSystemManager::ParticleSystemManager | ( | int | every_nth_frame = 1 | ) |
default constructor
Definition at line 33 of file particleSystemManager.cxx.
ParticleSystemManager::~ParticleSystemManager | ( | ) | [virtual] |
Destructor.
Definition at line 43 of file particleSystemManager.cxx.
void ParticleSystemManager::do_particles | ( | PN_stdfloat | 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 74 of file particleSystemManager.cxx.
References ParticleSystem::render(), and ParticleSystem::update().
void ParticleSystemManager::do_particles | ( | PN_stdfloat | dt, |
ParticleSystem * | ps, | ||
bool | do_render = true |
||
) |
does an update and an optional render for a specific ps.
Since rendering is the expensive operation, multiple updates could be applied before calling the final render.
Definition at line 140 of file particleSystemManager.cxx.
References ParticleSystem::render(), and ParticleSystem::update().
void ParticleSystemManager::output | ( | ostream & | out | ) | const [virtual] |
Write a string representation of this instance to <out>.
Definition at line 163 of file particleSystemManager.cxx.
void ParticleSystemManager::remove_particlesystem | ( | ParticleSystem * | ps | ) |
removes a ps from the maintenance list
Definition at line 52 of file particleSystemManager.cxx.
void ParticleSystemManager::write | ( | ostream & | out, |
int | indent = 0 |
||
) | const [virtual] |
Write a string representation of this instance to <out>.
Definition at line 195 of file particleSystemManager.cxx.
References write_ps_list().
void ParticleSystemManager::write_ps_list | ( | ostream & | out, |
int | indent = 0 |
||
) | const [virtual] |
Write a string representation of this instance to <out>.
Definition at line 176 of file particleSystemManager.cxx.
Referenced by write().