15 #include "arcEmitter.h"
36 _start_theta = copy._start_theta;
37 _end_theta = copy._end_theta;
65 assign_initial_position(
LPoint3& pos) {
67 if ( _start_theta < _end_theta ) {
68 theta = LERP(NORMALIZED_RAND(), _start_theta, _end_theta);
70 theta = LERP(NORMALIZED_RAND(), _start_theta, _end_theta + 2.0f * MathNumbers::pi_f);
73 theta += (MathNumbers::pi_f / 2.0);
74 this->_cos_theta = cosf(theta);
75 this->_sin_theta = sinf(theta);
77 PN_stdfloat new_radius_spread = SPREAD(_radius_spread);
78 PN_stdfloat new_x = _cos_theta * (_radius + new_radius_spread);
79 PN_stdfloat new_y = _sin_theta * (_radius + new_radius_spread);
81 pos.set(new_x, new_y, 0.0f);
104 write(ostream &out,
int indent)
const {
106 out.width(indent); out<<
""; out<<
"ArcEmitter:\n";
107 out.width(indent+2); out<<
""; out<<
"_start_angle "<<rad_2_deg(_start_theta)<<
"\n";
108 out.width(indent+2); out<<
""; out<<
"_end_angle "<<rad_2_deg(_end_theta)<<
"\n";
Describes a planar ring region in which particles are generated.
virtual void write(ostream &out, int indent=0) const
Write a starc representation of this instance to <out>.
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
virtual BaseParticleEmitter * make_copy()
copier
Describes a planar ring region in which particles are generated.
virtual void output(ostream &out) const
Write a starc representation of this instance to <out>.
virtual void write(ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual ~ArcEmitter()
destructor
Describes a physical region in space in which particles are randomly generated.