15 #include "baseParticleEmitter.h" 25 BaseParticleEmitter() {
26 _emission_type = ET_RADIATE;
27 _explicit_launch_vector.set(1,0,0);
28 _radiate_origin.set(0,0,0);
30 _amplitude_spread = 0.0f;
31 _offset_force.set(0,0,0);
41 _emission_type = copy._emission_type;
42 _explicit_launch_vector = copy._explicit_launch_vector;
43 _radiate_origin = copy._radiate_origin;
44 _amplitude = copy._amplitude;
45 _amplitude_spread = copy._amplitude_spread;
46 _offset_force = copy._offset_force;
65 assign_initial_position(pos);
67 switch(_emission_type)
70 vel = _explicit_launch_vector;
74 vel = pos - _radiate_origin;
79 assign_initial_velocity(vel);
83 vel *= _amplitude + SPREAD(_amplitude_spread);
96 out<<
"BaseParticleEmitter";
107 write(ostream &out,
int indent)
const {
109 out.width(indent); out<<
""; out<<
"BaseParticleEmitter:\n";
110 out.width(indent+2); out<<
""; out<<
"_emission_type "<<_emission_type<<
"\n";
111 out.width(indent+2); out<<
""; out<<
"_amplitude "<<_amplitude<<
"\n";
112 out.width(indent+2); out<<
""; out<<
"_amplitude_spread "<<_amplitude_spread<<
"\n";
113 out.width(indent+2); out<<
""; out<<
"_offset_force "<<_offset_force<<
"\n";
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
virtual ~BaseParticleEmitter()
destructor
void generate(LPoint3 &pos, LVector3 &vel)
parent generation function
virtual void output(ostream &out) const
Write a string representation of this instance to <out>.
virtual void write(ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
bool normalize()
Normalizes the vector in place.
Describes a physical region in space in which particles are randomly generated.