Panda3D
Public Member Functions | List of all 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 See Also : particleSystemManager.cxx. More...

#include "particleSystemManager.h"

Public Member Functions

 ParticleSystemManager (int every_nth_frame=1)
 default constructor More...
 
virtual ~ParticleSystemManager ()
 Destructor. More...
 
void attach_particlesystem (ParticleSystem *ps)
 
void clear ()
 
void do_particles (PN_stdfloat dt)
 does an update and render for each ps in the list. More...
 
void do_particles (PN_stdfloat dt, ParticleSystem *ps, bool do_render=true)
 does an update and an optional render for a specific ps. More...
 
int get_frame_stepping () const
 
virtual void output (std::ostream &out) const
 Write a string representation of this instance to <out>. More...
 
void remove_particlesystem (ParticleSystem *ps)
 removes a ps from the maintenance list More...
 
void set_frame_stepping (int every_nth_frame)
 
virtual void write (std::ostream &out, int indent=0) const
 Write a string representation of this instance to <out>. More...
 
virtual void write_ps_list (std::ostream &out, int indent=0) const
 Write a string representation of this instance to <out>. More...
 

Detailed Description

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 27 of file particleSystemManager.h.

Constructor & Destructor Documentation

◆ ParticleSystemManager()

ParticleSystemManager::ParticleSystemManager ( int  every_nth_frame = 1)
explicit

default constructor

Definition at line 30 of file particleSystemManager.cxx.

◆ ~ParticleSystemManager()

ParticleSystemManager::~ParticleSystemManager ( )
virtual

Destructor.

Definition at line 38 of file particleSystemManager.cxx.

Member Function Documentation

◆ do_particles() [1/2]

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 64 of file particleSystemManager.cxx.

◆ do_particles() [2/2]

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 128 of file particleSystemManager.cxx.

References ParticleSystem::render(), and ParticleSystem::update().

◆ output()

void ParticleSystemManager::output ( std::ostream &  out) const
virtual

Write a string representation of this instance to <out>.

Definition at line 148 of file particleSystemManager.cxx.

◆ remove_particlesystem()

void ParticleSystemManager::remove_particlesystem ( ParticleSystem ps)

removes a ps from the maintenance list

Definition at line 45 of file particleSystemManager.cxx.

◆ write()

void ParticleSystemManager::write ( std::ostream &  out,
int  indent = 0 
) const
virtual

Write a string representation of this instance to <out>.

Definition at line 174 of file particleSystemManager.cxx.

References indent(), and write_ps_list().

◆ write_ps_list()

void ParticleSystemManager::write_ps_list ( std::ostream &  out,
int  indent = 0 
) const
virtual

Write a string representation of this instance to <out>.

Definition at line 158 of file particleSystemManager.cxx.

References indent().

Referenced by write().


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