15 #include "zSpinParticle.h" 26 _initial_angle = 0.0f;
29 _angular_velocity = 0.0f;
30 _bUseAngularVelocity =
false;
41 _initial_angle = copy._initial_angle;
42 _final_angle = copy._final_angle;
43 _cur_angle = copy._cur_angle;
44 _angular_velocity = copy._angular_velocity;
45 _bUseAngularVelocity = copy._bUseAngularVelocity;
86 if(_bUseAngularVelocity) {
88 _cur_angle = _initial_angle + (get_age() * _angular_velocity);
90 _cur_angle = _initial_angle + (get_parameterized_age() * (_final_angle - _initial_angle));
94 _cur_angle = cmod(_cur_angle, (PN_stdfloat)360.0);
100 if(_cur_angle < 0.0f)
101 _cur_angle += 360.0f;
132 out<<
"ZSpinParticle";
143 write(ostream &out,
int indent)
const {
145 out.width(indent); out<<
""; out<<
"ZSpinParticle:\n";
146 out.width(indent+2); out<<
""; out<<
"_initial_angle "<<_initial_angle<<
"\n";
147 out.width(indent+2); out<<
""; out<<
"_final_angle "<<_final_angle<<
"\n";
148 out.width(indent+2); out<<
""; out<<
"_cur_angle "<<_cur_angle<<
"\n";
149 out.width(indent+2); out<<
""; out<<
"_angular_velocity "<<_angular_velocity<<
"\n";
150 out.width(indent+2); out<<
""; out<<
"_bUseAngularVelocity "<<_bUseAngularVelocity<<
"\n";
virtual PhysicsObject * make_copy() const
dynamic copier
A body on which physics will be applied.
ZSpinParticle()
constructor
describes a particle that spins along its z axis.
virtual void write(ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual PN_stdfloat get_theta() const
for spriteParticleRenderer
virtual void output(ostream &out) const
Write a string representation of this instance to <out>.
An individual, physically-modelable particle abstract base class.
virtual ~ZSpinParticle()
destructor
virtual void write(ostream &out, int indent=0) const
Write a string representation of this instance to <out>.