22 BaseParticleEmitter() {
23 _emission_type = ET_RADIATE;
24 _explicit_launch_vector.set(1,0,0);
25 _radiate_origin.set(0,0,0);
27 _amplitude_spread = 0.0f;
28 _offset_force.set(0,0,0);
36 _emission_type = copy._emission_type;
37 _explicit_launch_vector = copy._explicit_launch_vector;
38 _radiate_origin = copy._radiate_origin;
39 _amplitude = copy._amplitude;
40 _amplitude_spread = copy._amplitude_spread;
41 _offset_force = copy._offset_force;
56 assign_initial_position(pos);
58 switch(_emission_type)
61 vel = _explicit_launch_vector;
65 vel = pos - _radiate_origin;
70 assign_initial_velocity(vel);
74 vel *= _amplitude + SPREAD(_amplitude_spread);
84 out<<
"BaseParticleEmitter";
94 out.width(
indent); out<<
""; out<<
"BaseParticleEmitter:\n";
95 out.width(
indent+2); out<<
""; out<<
"_emission_type "<<_emission_type<<
"\n";
96 out.width(
indent+2); out<<
""; out<<
"_amplitude "<<_amplitude<<
"\n";
97 out.width(
indent+2); out<<
""; out<<
"_amplitude_spread "<<_amplitude_spread<<
"\n";
98 out.width(
indent+2); out<<
""; out<<
"_offset_force "<<_offset_force<<
"\n";
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual ~BaseParticleEmitter()
destructor
void generate(LPoint3 &pos, LVector3 &vel)
parent generation function
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.