Panda3D
 All Classes Functions Variables Enumerations
tangentRingEmitter.h
1 // Filename: tangentRingEmitter.h
2 // Created by: charles (25Jul00)
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 TANGENTRINGEMITTER_H
16 #define TANGENTRINGEMITTER_H
17 
18 #include "baseParticleEmitter.h"
19 
20 ////////////////////////////////////////////////////////////////////
21 // Class : TangentRingEmitter
22 // Description : Describes a planar ring region in which
23 // tangent particles are generated, and particles
24 // fly off tangential to the ring.
25 ////////////////////////////////////////////////////////////////////
26 class EXPCL_PANDAPHYSICS TangentRingEmitter : public BaseParticleEmitter {
27 PUBLISHED:
30  virtual ~TangentRingEmitter();
31 
32  virtual BaseParticleEmitter *make_copy();
33 
34  INLINE void set_radius(PN_stdfloat r);
35  INLINE void set_radius_spread(PN_stdfloat spread);
36 
37  INLINE PN_stdfloat get_radius() const;
38  INLINE PN_stdfloat get_radius_spread() const;
39 
40  virtual void output(ostream &out) const;
41  virtual void write(ostream &out, int indent=0) const;
42 
43 private:
44  PN_stdfloat _radius;
45  PN_stdfloat _radius_spread;
46 
47  // CUSTOM EMISSION PARAMETERS
48  // none
49 
50  ///////////////////////////////
51  // scratch variables that carry over from position calc to velocity calc
52  PN_stdfloat _x;
53  PN_stdfloat _y;
54  ///////////////////////////////
55 
56  virtual void assign_initial_position(LPoint3& pos);
57  virtual void assign_initial_velocity(LVector3& vel);
58 };
59 
60 #include "tangentRingEmitter.I"
61 
62 #endif // TANGENTRINGEMITTER_H
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
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.