14#ifndef PARTICLESYSTEM_H
15#define PARTICLESYSTEM_H
43 INLINE
void set_pool_size(
int size);
44 INLINE
void set_birth_rate(PN_stdfloat new_br);
45 INLINE
void set_soft_birth_rate(PN_stdfloat new_br);
46 INLINE
void set_litter_size(
int new_ls);
47 INLINE
void set_litter_spread(
int new_ls);
48 INLINE
void set_local_velocity_flag(
bool lv);
49 INLINE
void set_system_grows_older_flag(
bool sgo);
50 INLINE
void set_system_lifespan(PN_stdfloat sl);
51 INLINE
void set_system_age(PN_stdfloat age);
52 INLINE
void set_active_system_flag(
bool a);
53 INLINE
void set_spawn_on_death_flag(
bool sod);
54 INLINE
void set_spawn_render_node(
PandaNode *node);
55 INLINE
void set_spawn_render_node_path(
const NodePath &node);
56 INLINE
void set_template_system_flag(
bool tsf);
57 INLINE
void set_render_parent(
PandaNode *node);
58 INLINE
void set_render_parent(
const NodePath &node);
62 INLINE
void set_floor_z(PN_stdfloat z);
64 INLINE
void clear_floor_z();
66 INLINE
int get_pool_size()
const;
67 INLINE PN_stdfloat get_birth_rate()
const;
68 INLINE PN_stdfloat get_soft_birth_rate()
const;
69 INLINE
int get_litter_size()
const;
70 INLINE
int get_litter_spread()
const;
71 INLINE
bool get_local_velocity_flag()
const;
72 INLINE
bool get_system_grows_older_flag()
const;
73 INLINE PN_stdfloat get_system_lifespan()
const;
74 INLINE PN_stdfloat get_system_age()
const;
75 INLINE
bool get_active_system_flag()
const;
76 INLINE
bool get_spawn_on_death_flag()
const;
77 INLINE
PandaNode *get_spawn_render_node()
const;
78 INLINE
NodePath get_spawn_render_node_path()
const;
79 INLINE
bool get_i_was_spawned_flag()
const;
80 INLINE
int get_living_particles()
const;
81 INLINE
NodePath get_render_parent()
const;
85 INLINE PN_stdfloat get_floor_z()
const;
86 INLINE PN_stdfloat get_tics_since_birth()
const;
91 INLINE
void clear_spawn_templates();
96 INLINE
void induce_labor();
97 INLINE
void clear_to_initial();
98 INLINE
void soft_stop(PN_stdfloat br = 0.0);
99 INLINE
void soft_start(PN_stdfloat br = 0.0);
100 INLINE
void soft_start(PN_stdfloat br, PN_stdfloat first_birth_delay);
101 void update(PN_stdfloat dt);
103 virtual void output(std::ostream &out)
const;
104 virtual void write_free_particle_fifo(std::ostream &out,
int indent=0)
const;
105 virtual void write_spawn_templates(std::ostream &out,
int indent=0)
const;
106 virtual void write(std::ostream &out,
int indent=0)
const;
113 bool birth_particle();
114 void kill_particle(
int pool_index);
116 void resize_pool(
int size);
120 int _particle_pool_size;
121 int _living_particles;
122 PN_stdfloat _cur_birth_rate;
123 PN_stdfloat _birth_rate;
124 PN_stdfloat _soft_birth_rate;
125 PN_stdfloat _tics_since_birth;
128 PN_stdfloat _system_age;
129 PN_stdfloat _system_lifespan;
130 PN_stdfloat _floor_z;
137 bool _template_system_flag;
145 bool _active_system_flag;
146 bool _local_velocity_flag;
147 bool _system_grows_older_flag;
151 bool _spawn_on_death_flag;
158 bool _i_was_spawned_flag;
164 static void init_type() {
165 Physical::init_type();
167 Physical::get_class_type());
170 return get_class_type();
172 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Pure Virtual base class for creating particles.
Pure virtual particle renderer base class.
An individual, physically-modelable particle abstract base class.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
A lightweight class that represents a single element that may be timed and/or counted via stats.
A basic node of the scene graph or data graph.
Manages a set of individual ParticleSystem objects, so that each individual one doesn't have to be up...
Contains and manages a particle system.
Defines a set of physically modeled attributes.
virtual void write(std::ostream &out=std::cout, int indent=0) const
Write a string representation of this instance to <out>.
virtual void output(std::ostream &out=std::cout) const
Write a string representation of this instance to <out>.
TypeHandle is the identifier used to differentiate C++ class types.
This is our own Panda specialization on the default STL vector.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...