class ParticleSystem

Bases: Physical

Contains and manages a particle system.

Inheritance diagram

Inheritance diagram of ParticleSystem

explicit ParticleSystem(int pool_size = 0)
ParticleSystem(ParticleSystem const &copy)

Default Constructor.

Copy Constructor.

void add_spawn_template(ParticleSystem *ps)
void clear_floor_z(void)
void clear_spawn_templates(void)
void clear_to_initial(void)

Resets the system to its start state by resizing to 0, then resizing back to current size.

bool get_active_system_flag(void) const
PN_stdfloat get_birth_rate(void) const
static TypeHandle get_class_type(void)
BaseParticleEmitter *get_emitter(void) const
BaseParticleFactory *get_factory(void) const
PN_stdfloat get_floor_z(void) const
bool get_i_was_spawned_flag(void) const
int get_litter_size(void) const
int get_litter_spread(void) const
int get_living_particles(void) const
bool get_local_velocity_flag(void) const
int get_pool_size(void) const
NodePath get_render_parent(void) const
BaseParticleRenderer *get_renderer(void) const
PN_stdfloat get_soft_birth_rate(void) const
bool get_spawn_on_death_flag(void) const
PandaNode *get_spawn_render_node(void) const
NodePath get_spawn_render_node_path(void) const
PN_stdfloat get_system_age(void) const
bool get_system_grows_older_flag(void) const
PN_stdfloat get_system_lifespan(void) const
PN_stdfloat get_tics_since_birth(void) const
void induce_labor(void)

Forces the birth of a particle litter this frame by resetting _tics_since_birth

void render(void)

Populates an attached GeomNode structure with the particle geometry for rendering. This is a wrapper for accessability.

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(NodePath const &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(NodePath const &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)
void soft_start(PN_stdfloat br, PN_stdfloat first_birth_delay)

Causes system to use birth rate set by set_birth_rate()

Causes system to use birth rate set by set_birth_rate(), with the system’s first birth being delayed by the value of first_birth_delay. Note that a negative delay is perfectly valid, causing the first birth to happen sooner rather than later.

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)
virtual void write_free_particle_fifo(std::ostream &out, int indent = 0) const

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

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

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