Panda3D
|
Contains and manages a particle system. More...
#include "particleSystem.h"
Public Member Functions | |
ParticleSystem (int pool_size=0) | |
Default Constructor. | |
ParticleSystem (const ParticleSystem ©) | |
Copy Constructor. | |
~ParticleSystem () | |
You get the ankles and I'll get the wrists. | |
void | add_spawn_template (ParticleSystem *ps) |
void | clear_floor_z () |
void | clear_spawn_templates () |
void | clear_to_initial () |
Resets the system to its start state by resizing to 0, then resizing back to current size. | |
virtual TypeHandle | force_init_type () |
bool | get_active_system_flag () const |
PN_stdfloat | get_birth_rate () const |
BaseParticleEmitter * | get_emitter () const |
BaseParticleFactory * | get_factory () const |
PN_stdfloat | get_floor_z () const |
bool | get_i_was_spawned_flag () const |
int | get_litter_size () const |
int | get_litter_spread () const |
int | get_living_particles () const |
bool | get_local_velocity_flag () const |
int | get_pool_size () const |
NodePath | get_render_parent () const |
BaseParticleRenderer * | get_renderer () const |
PN_stdfloat | get_soft_birth_rate () const |
bool | get_spawn_on_death_flag () const |
PandaNode * | get_spawn_render_node () const |
NodePath | get_spawn_render_node_path () const |
PN_stdfloat | get_system_age () const |
bool | get_system_grows_older_flag () const |
PN_stdfloat | get_system_lifespan () const |
virtual TypeHandle | get_type () const |
void | induce_labor () |
Forces the birth of a particle litter this frame by resetting _tics_since_birth. | |
virtual void | output (ostream &out) const |
Write a string representation of this instance to <out>. | |
void | render () |
Populates an attached GeomNode structure with the particle geometry for rendering. | |
void | set_active_system_flag (bool a) |
void | set_birth_rate (PN_stdfloat new_br) |
void | set_emitter (BaseParticleEmitter *e) |
void | set_factory (BaseParticleFactory *f) |
void | set_floor_z (PN_stdfloat z) |
void | set_litter_size (int new_ls) |
void | set_litter_spread (int new_ls) |
void | set_local_velocity_flag (bool lv) |
void | set_pool_size (int size) |
void | set_render_parent (PandaNode *node) |
void | set_render_parent (const NodePath &node) |
void | set_renderer (BaseParticleRenderer *r) |
void | set_soft_birth_rate (PN_stdfloat new_br) |
void | set_spawn_on_death_flag (bool sod) |
void | set_spawn_render_node (PandaNode *node) |
void | set_spawn_render_node_path (const NodePath &node) |
void | set_system_age (PN_stdfloat age) |
void | set_system_grows_older_flag (bool sgo) |
void | set_system_lifespan (PN_stdfloat sl) |
void | set_template_system_flag (bool tsf) |
void | soft_start (PN_stdfloat br=0.0) |
Causes system to use birth rate set by set_birth_rate() | |
void | soft_stop (PN_stdfloat br=0.0) |
Causes system to use birth rate set by set_soft_birth_rate() | |
void | update (PN_stdfloat dt) |
Updates the particle system. | |
virtual void | write (ostream &out, int indent=0) const |
Write a string representation of this instance to <out>. | |
virtual void | write_free_particle_fifo (ostream &out, int indent=0) const |
Write a string representation of this instance to <out>. | |
virtual void | write_spawn_templates (ostream &out, int indent=0) const |
Write a string representation of this instance to <out>. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
Friends | |
class | ParticleSystemManager |
Contains and manages a particle system.
Definition at line 42 of file particleSystem.h.
ParticleSystem::ParticleSystem | ( | int | pool_size = 0 | ) |
Default Constructor.
Definition at line 44 of file particleSystem.cxx.
References Physical::clear_physics_objects().
ParticleSystem::ParticleSystem | ( | const ParticleSystem & | copy | ) |
Copy Constructor.
Definition at line 89 of file particleSystem.cxx.
References NodePath::reparent_to().
ParticleSystem::~ParticleSystem | ( | ) |
You get the ankles and I'll get the wrists.
Definition at line 124 of file particleSystem.cxx.
References NodePath::remove_node().
void ParticleSystem::clear_to_initial | ( | ) | [inline] |
Resets the system to its start state by resizing to 0, then resizing back to current size.
Definition at line 48 of file particleSystem.I.
void ParticleSystem::induce_labor | ( | ) | [inline] |
Forces the birth of a particle litter this frame by resetting _tics_since_birth.
Definition at line 36 of file particleSystem.I.
static void ParticleSystem::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from Physical.
Definition at line 170 of file particleSystem.h.
References Physical::init_type().
void ParticleSystem::output | ( | ostream & | out | ) | const [virtual] |
Write a string representation of this instance to <out>.
Reimplemented from Physical.
Definition at line 702 of file particleSystem.cxx.
void ParticleSystem::render | ( | ) | [inline] |
Populates an attached GeomNode structure with the particle geometry for rendering.
This is a wrapper for accessability.
Definition at line 24 of file particleSystem.I.
Referenced by ParticleSystemManager::do_particles().
void ParticleSystem::soft_start | ( | PN_stdfloat | br = 0.0 | ) | [inline] |
Causes system to use birth rate set by set_birth_rate()
Definition at line 68 of file particleSystem.I.
void ParticleSystem::soft_stop | ( | PN_stdfloat | br = 0.0 | ) | [inline] |
Causes system to use birth rate set by set_soft_birth_rate()
Definition at line 83 of file particleSystem.I.
void ParticleSystem::update | ( | PN_stdfloat | dt | ) |
Updates the particle system.
Call once per frame.
Definition at line 468 of file particleSystem.cxx.
References PhysicsObject::get_position().
Referenced by ParticleSystemManager::do_particles().
void ParticleSystem::write | ( | ostream & | out, |
int | indent = 0 |
||
) | const [virtual] |
Write a string representation of this instance to <out>.
Definition at line 753 of file particleSystem.cxx.
References write_free_particle_fifo(), and write_spawn_templates().
void ParticleSystem::write_free_particle_fifo | ( | ostream & | out, |
int | indent = 0 |
||
) | const [virtual] |
Write a string representation of this instance to <out>.
Definition at line 715 of file particleSystem.cxx.
Referenced by write().
void ParticleSystem::write_spawn_templates | ( | ostream & | out, |
int | indent = 0 |
||
) | const [virtual] |
Write a string representation of this instance to <out>.
Definition at line 734 of file particleSystem.cxx.
Referenced by write().