Panda3D
zSpinParticleFactory.h
1 // Filename: zSpinParticleFactory.h
2 // Created by: charles (16Aug00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef ZSPINPARTICLEFACTORY_H
16 #define ZSPINPARTICLEFACTORY_H
17 
18 #include "baseParticleFactory.h"
19 
20 ////////////////////////////////////////////////////////////////////
21 // Class : ZSpinParticleFactory
22 // Description :
23 ////////////////////////////////////////////////////////////////////
24 class EXPCL_PANDAPHYSICS ZSpinParticleFactory : public BaseParticleFactory {
25 PUBLISHED:
28  virtual ~ZSpinParticleFactory();
29 
30  INLINE void set_initial_angle(PN_stdfloat angle);
31  INLINE void set_final_angle(PN_stdfloat angle);
32  INLINE void set_initial_angle_spread(PN_stdfloat spread);
33  INLINE void set_final_angle_spread(PN_stdfloat spread);
34 
35  INLINE PN_stdfloat get_initial_angle() const;
36  INLINE PN_stdfloat get_final_angle() const;
37  INLINE PN_stdfloat get_initial_angle_spread() const;
38  INLINE PN_stdfloat get_final_angle_spread() const;
39 
40  INLINE void set_angular_velocity(PN_stdfloat v);
41  INLINE PN_stdfloat get_angular_velocity() const;
42 
43  INLINE void set_angular_velocity_spread(PN_stdfloat spread);
44  INLINE PN_stdfloat get_angular_velocity_spread() const;
45 
46  INLINE void enable_angular_velocity(bool bEnabled);
47  INLINE bool get_angular_velocity_enabled() const;
48 
49  virtual void output(ostream &out) const;
50  virtual void write(ostream &out, int indent=0) const;
51 
52 private:
53  PN_stdfloat _initial_angle;
54  PN_stdfloat _initial_angle_spread;
55  PN_stdfloat _final_angle;
56  PN_stdfloat _final_angle_spread;
57  PN_stdfloat _angular_velocity;
58  PN_stdfloat _angular_velocity_spread;
59  bool _bUseAngularVelocity;
60 
61  virtual void populate_child_particle(BaseParticle *bp) const;
62  virtual BaseParticle *alloc_particle() const;
63 };
64 
65 #include "zSpinParticleFactory.I"
66 
67 #endif // ZSPINPARTICLEFACTORY_H
virtual void write(ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
Pure Virtual base class for creating particles.
virtual void output(ostream &out) const
Write a string representation of this instance to <out>.
An individual, physically-modelable particle abstract base class.
Definition: baseParticle.h:26