15 #include "tangentRingEmitter.h" 25 _radius_spread = 0.0f;
36 _radius = copy._radius;
37 _radius_spread = copy._radius_spread;
64 void TangentRingEmitter::
65 assign_initial_position(
LPoint3& pos) {
66 PN_stdfloat theta = NORMALIZED_RAND() * 2.0f * MathNumbers::pi_f;
71 PN_stdfloat new_radius = _radius + SPREAD(_radius_spread);
72 pos.set(new_radius * _x, new_radius * _y, 0.0f);
80 void TangentRingEmitter::
81 assign_initial_velocity(
LVector3& vel) {
82 vel.set(-_y, _x, 0.0f);
94 out<<
"TangentRingEmitter";
105 write(ostream &out,
int indent)
const {
107 out.width(indent); out<<
""; out<<
"TangentRingEmitter:\n";
108 out.width(indent+2); out<<
""; out<<
"_radius "<<_radius<<
"\n";
109 out.width(indent+2); out<<
""; out<<
"_radius_spread "<<_radius_spread<<
"\n";
110 out.width(indent+2); out<<
""; out<<
"_x "<<_x<<
"\n";
111 out.width(indent+2); out<<
""; out<<
"_y "<<_y<<
"\n";
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
virtual BaseParticleEmitter * make_copy()
child copier
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
TangentRingEmitter()
constructor
Describes a planar ring region in which tangent particles are generated, and particles fly off tangen...
virtual void write(ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual void output(ostream &out) const
Write a string representation of this instance to <out>.
Describes a physical region in space in which particles are randomly generated.
virtual void write(ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual ~TangentRingEmitter()
destructor