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

ParticleSystem Class Reference

#include <particleSystem.h>

Inheritance diagram for ParticleSystem:

Physical TypedReferenceCount TypedObject ReferenceCount List of all members.

Private Member Functions

bool birth_particle (void)
void kill_particle (int pool_index)
void birth_litter (void)
void resize_pool (int size)
 PT (BaseParticleFactory) _factory
 PT (BaseParticleEmitter) _emitter
 PT (BaseParticleRenderer) _renderer
 PT (PandaNode) _render_parent
 PT (PandaNode) _render_node
 PT (PandaNode) _spawn_render_node
void spawn_child_system (BaseParticle *bp)
 ParticleSystem (const ParticleSystem &copy)
 ~ParticleSystem (void)
INLINE void set_pool_size (int size)
INLINE void set_birth_rate (float new_br)
INLINE void set_litter_size (int new_ls)
INLINE void set_litter_spread (int new_ls)
INLINE void set_local_velocity_flag (bool lv)
INLINE void set_system_grows_older_flag (bool sgo)
INLINE void set_system_lifespan (float sl)
INLINE void set_system_age (float age)
INLINE void set_active_system_flag (bool a)
INLINE void set_spawn_on_death_flag (bool sod)
INLINE void set_spawn_render_node (PandaNode *node)
INLINE void set_template_system_flag (bool tsf)
INLINE void set_render_parent (PandaNode *node)
INLINE void set_renderer (BaseParticleRenderer *r)
INLINE void set_emitter (BaseParticleEmitter *e)
INLINE void set_factory (BaseParticleFactory *f)
INLINE int get_pool_size (void) const
INLINE float get_birth_rate (void) const
INLINE int get_litter_size (void) const
INLINE int get_litter_spread (void) const
INLINE bool get_local_velocity_flag (void) const
INLINE bool get_system_grows_older_flag (void) const
INLINE float get_system_lifespan (void) const
INLINE float get_system_age (void) const
INLINE bool get_active_system_flag (void) const
INLINE bool get_spawn_on_death_flag (void) const
INLINE PandaNodeget_spawn_render_node (void) const
INLINE bool get_i_was_spawned_flag (void) const
INLINE int get_living_particles (void) const
INLINE PandaNodeget_render_parent (void) const
INLINE BaseParticleRendererget_renderer (void) const
INLINE BaseParticleEmitterget_emitter (void) const
INLINE BaseParticleFactoryget_factory (void) const
INLINE void add_spawn_template (ParticleSystem *ps)
INLINE void clear_spawn_templates (void)
INLINE void render (void)
INLINE void induce_labor (void)
void update (float dt)

Private Attributes

pdeque< int > _free_particle_fifo
int _particle_pool_size
int _living_particles
float _birth_rate
float _tics_since_birth
int _litter_size
int _litter_spread
float _system_age
float _system_lifespan
ParticleSystemManager_manager
bool _template_system_flag
bool _active_system_flag
bool _local_velocity_flag
bool _system_grows_older_flag
bool _spawn_on_death_flag
pvector< PT(ParticleSystem) _spawn_templates )
bool _i_was_spawned_flag
PUBLISHED __pad0__: ParticleSystem(int pool_size = 0)

Friends

class ParticleSystemManager

Constructor & Destructor Documentation

ParticleSystem::ParticleSystem const ParticleSystem &  copy  )  [private]
 

Definition at line 85 of file particleSystem.cxx.

References _active_system_flag, _birth_rate, _i_was_spawned_flag, _litter_size, _litter_spread, _living_particles, _local_velocity_flag, _spawn_on_death_flag, _system_grows_older_flag, _system_lifespan, _tics_since_birth, and set_pool_size().

Referenced by spawn_child_system().

ParticleSystem::~ParticleSystem void   )  [private]
 

Definition at line 119 of file particleSystem.cxx.

References _template_system_flag, and set_pool_size().


Member Function Documentation

INLINE void ParticleSystem::add_spawn_template ParticleSystem *  ps  )  [private]
 

void ParticleSystem::birth_litter void   )  [private]
 

Definition at line 207 of file particleSystem.cxx.

References _litter_size, _litter_spread, birth_particle(), and I_SPREAD.

Referenced by update().

bool ParticleSystem::birth_particle void   )  [private]
 

Definition at line 137 of file particleSystem.cxx.

References _free_particle_fifo, _living_particles, _local_velocity_flag, _particle_pool_size, Physical::_physics_objects, NodePath::get_mat(), Physical::get_physical_node(), BaseParticle::init(), and BaseParticle::set_alive().

Referenced by birth_litter().

INLINE void ParticleSystem::clear_spawn_templates void   )  [private]
 

INLINE bool ParticleSystem::get_active_system_flag void   )  const [private]
 

Referenced by ParticleSystemManager::do_particles().

INLINE float ParticleSystem::get_birth_rate void   )  const [private]
 

INLINE BaseParticleEmitter* ParticleSystem::get_emitter void   )  const [private]
 

INLINE BaseParticleFactory* ParticleSystem::get_factory void   )  const [private]
 

INLINE bool ParticleSystem::get_i_was_spawned_flag void   )  const [private]
 

INLINE int ParticleSystem::get_litter_size void   )  const [private]
 

INLINE int ParticleSystem::get_litter_spread void   )  const [private]
 

INLINE int ParticleSystem::get_living_particles void   )  const [private]
 

INLINE bool ParticleSystem::get_local_velocity_flag void   )  const [private]
 

INLINE int ParticleSystem::get_pool_size void   )  const [private]
 

INLINE PandaNode* ParticleSystem::get_render_parent void   )  const [private]
 

INLINE BaseParticleRenderer* ParticleSystem::get_renderer void   )  const [private]
 

INLINE bool ParticleSystem::get_spawn_on_death_flag void   )  const [private]
 

INLINE PandaNode* ParticleSystem::get_spawn_render_node void   )  const [private]
 

INLINE float ParticleSystem::get_system_age void   )  const [private]
 

Referenced by ParticleSystemManager::do_particles().

INLINE bool ParticleSystem::get_system_grows_older_flag void   )  const [private]
 

Referenced by ParticleSystemManager::do_particles().

INLINE float ParticleSystem::get_system_lifespan void   )  const [private]
 

Referenced by ParticleSystemManager::do_particles().

INLINE void ParticleSystem::induce_labor void   )  [private]
 

void ParticleSystem::kill_particle int  pool_index  )  [private]
 

Definition at line 293 of file particleSystem.cxx.

References _free_particle_fifo, _living_particles, Physical::_physics_objects, _spawn_on_death_flag, BaseParticle::die(), BaseParticle::set_alive(), and spawn_child_system().

Referenced by resize_pool(), and update().

ParticleSystem::PT PandaNode   )  [private]
 

ParticleSystem::PT PandaNode   )  [private]
 

ParticleSystem::PT PandaNode   )  [private]
 

ParticleSystem::PT BaseParticleRenderer   )  [private]
 

ParticleSystem::PT BaseParticleEmitter   )  [private]
 

ParticleSystem::PT BaseParticleFactory   )  [private]
 

Referenced by spawn_child_system().

INLINE void ParticleSystem::render void   )  [private]
 

Referenced by ParticleSystemManager::do_particles().

void ParticleSystem::resize_pool int  size  )  [private]
 

Definition at line 323 of file particleSystem.cxx.

References _free_particle_fifo, _particle_pool_size, Physical::_physics_objects, BaseParticle::get_alive(), and kill_particle().

INLINE void ParticleSystem::set_active_system_flag bool  a  )  [private]
 

INLINE void ParticleSystem::set_birth_rate float  new_br  )  [private]
 

INLINE void ParticleSystem::set_emitter BaseParticleEmitter e  )  [private]
 

INLINE void ParticleSystem::set_factory BaseParticleFactory f  )  [private]
 

INLINE void ParticleSystem::set_litter_size int  new_ls  )  [private]
 

INLINE void ParticleSystem::set_litter_spread int  new_ls  )  [private]
 

INLINE void ParticleSystem::set_local_velocity_flag bool  lv  )  [private]
 

INLINE void ParticleSystem::set_pool_size int  size  )  [private]
 

Referenced by ParticleSystem(), and ~ParticleSystem().

INLINE void ParticleSystem::set_render_parent PandaNode node  )  [private]
 

INLINE void ParticleSystem::set_renderer BaseParticleRenderer r  )  [private]
 

INLINE void ParticleSystem::set_spawn_on_death_flag bool  sod  )  [private]
 

INLINE void ParticleSystem::set_spawn_render_node PandaNode node  )  [private]
 

INLINE void ParticleSystem::set_system_age float  age  )  [private]
 

Referenced by ParticleSystemManager::do_particles().

INLINE void ParticleSystem::set_system_grows_older_flag bool  sgo  )  [private]
 

INLINE void ParticleSystem::set_system_lifespan float  sl  )  [private]
 

INLINE void ParticleSystem::set_template_system_flag bool  tsf  )  [private]
 

void ParticleSystem::spawn_child_system BaseParticle bp  )  [private]
 

Definition at line 229 of file particleSystem.cxx.

References _manager, _spawn_templates, PandaNode::add_child(), ParticleSystemManager::attach_particlesystem(), PhysicsManager::attach_physical(), NodePath::get_mat(), PandaNode::get_num_parents(), PandaNode::get_parent(), Physical::get_physical_node(), Physical::get_physics_manager(), ParticleSystem(), Physical::PhysicalNode, and PT().

Referenced by kill_particle().

void ParticleSystem::update float  dt  )  [private]
 

Definition at line 463 of file particleSystem.cxx.

References _birth_rate, _living_particles, _particle_pool_size, Physical::_physics_objects, _tics_since_birth, birth_litter(), BaseParticle::get_age(), BaseParticle::get_alive(), BaseParticle::get_lifespan(), kill_particle(), BaseParticle::set_age(), and BaseParticle::update().

Referenced by ParticleSystemManager::do_particles().


Friends And Related Function Documentation

friend class ParticleSystemManager [friend]
 

Definition at line 153 of file particleSystem.h.


Member Data Documentation

PUBLISHED ParticleSystem::__pad0__ [private]
 

Reimplemented from Physical.

Definition at line 101 of file particleSystem.h.

bool ParticleSystem::_active_system_flag [private]
 

Definition at line 83 of file particleSystem.h.

Referenced by ParticleSystem().

float ParticleSystem::_birth_rate [private]
 

Definition at line 63 of file particleSystem.h.

Referenced by ParticleSystem(), and update().

pdeque< int > ParticleSystem::_free_particle_fifo [private]
 

Definition at line 59 of file particleSystem.h.

Referenced by birth_particle(), kill_particle(), and resize_pool().

bool ParticleSystem::_i_was_spawned_flag [private]
 

Definition at line 96 of file particleSystem.h.

Referenced by ParticleSystem().

int ParticleSystem::_litter_size [private]
 

Definition at line 65 of file particleSystem.h.

Referenced by birth_litter(), and ParticleSystem().

int ParticleSystem::_litter_spread [private]
 

Definition at line 66 of file particleSystem.h.

Referenced by birth_litter(), and ParticleSystem().

int ParticleSystem::_living_particles [private]
 

Definition at line 62 of file particleSystem.h.

Referenced by birth_particle(), kill_particle(), ParticleSystem(), and update().

bool ParticleSystem::_local_velocity_flag [private]
 

Definition at line 84 of file particleSystem.h.

Referenced by birth_particle(), and ParticleSystem().

ParticleSystemManager* ParticleSystem::_manager [private]
 

Definition at line 73 of file particleSystem.h.

Referenced by spawn_child_system().

int ParticleSystem::_particle_pool_size [private]
 

Definition at line 61 of file particleSystem.h.

Referenced by birth_particle(), resize_pool(), and update().

bool ParticleSystem::_spawn_on_death_flag [private]
 

Definition at line 89 of file particleSystem.h.

Referenced by kill_particle(), and ParticleSystem().

pvector< PT(ParticleSystem) ParticleSystem::_spawn_templates) [private]
 

Definition at line 91 of file particleSystem.h.

Referenced by spawn_child_system().

float ParticleSystem::_system_age [private]
 

Definition at line 67 of file particleSystem.h.

bool ParticleSystem::_system_grows_older_flag [private]
 

Definition at line 85 of file particleSystem.h.

Referenced by ParticleSystem().

float ParticleSystem::_system_lifespan [private]
 

Definition at line 68 of file particleSystem.h.

Referenced by ParticleSystem().

bool ParticleSystem::_template_system_flag [private]
 

Definition at line 75 of file particleSystem.h.

Referenced by ~ParticleSystem().

float ParticleSystem::_tics_since_birth [private]
 

Definition at line 64 of file particleSystem.h.

Referenced by ParticleSystem(), and update().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:13:03 2003 for Panda by doxygen1.3