20 BaseParticleFactory() :
22 _lifespan_spread(0.0),
25 _terminal_velocity_base(
PhysicsObject::_default_terminal_velocity),
26 _terminal_velocity_spread(0.0f)
35 _lifespan_base(copy._lifespan_base),
36 _lifespan_spread(copy._lifespan_spread),
37 _mass_base(copy._mass_base),
38 _mass_spread(copy._mass_spread),
39 _terminal_velocity_base(copy._terminal_velocity_base),
40 _terminal_velocity_spread(copy._terminal_velocity_spread)
56 bp->set_lifespan(_lifespan_base + SPREAD(_lifespan_spread));
57 bp->
set_mass(_mass_base + SPREAD(_mass_spread));
65 populate_child_particle(bp);
74 out<<
"BaseParticleFactory";
84 out.width(
indent); out<<
""; out<<
"BaseParticleFactory:\n";
85 out.width(
indent+2); out<<
""; out<<
"_lifespan_base "<<_lifespan_base<<
"\n";
86 out.width(
indent+2); out<<
""; out<<
"_lifespan_spread "<<_lifespan_spread<<
"\n";
87 out.width(
indent+2); out<<
""; out<<
"_mass_base "<<_mass_base<<
"\n";
88 out.width(
indent+2); out<<
""; out<<
"_mass_spread "<<_mass_spread<<
"\n";
89 out.width(
indent+2); out<<
""; out<<
"_terminal_velocity_base "<<_terminal_velocity_base<<
"\n";
90 out.width(
indent+2); out<<
""; out<<
"_terminal_velocity_spread "<<_terminal_velocity_spread<<
"\n";
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void populate_particle(BaseParticle *bp)
public
Pure Virtual base class for creating particles.
A body on which physics will be applied.
virtual ~BaseParticleFactory()
destructor
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
void set_active(bool flag)
Process Flag assignment.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
An individual, physically-modelable particle abstract base class.
void set_mass(PN_stdfloat)
Set the mass in slugs (or kilograms).
void set_terminal_velocity(PN_stdfloat tv)
tv assignment