Panda3D
 All Classes Functions Variables Enumerations
tangentRingEmitter.h
00001 // Filename: tangentRingEmitter.h
00002 // Created by:  charles (25Jul00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef TANGENTRINGEMITTER_H
00016 #define TANGENTRINGEMITTER_H
00017 
00018 #include "baseParticleEmitter.h"
00019 
00020 ////////////////////////////////////////////////////////////////////
00021 //       Class : TangentRingEmitter
00022 // Description : Describes a planar ring region in which
00023 //               tangent particles are generated, and particles
00024 //               fly off tangential to the ring.
00025 ////////////////////////////////////////////////////////////////////
00026 class EXPCL_PANDAPHYSICS TangentRingEmitter : public BaseParticleEmitter {
00027 PUBLISHED:
00028   TangentRingEmitter();
00029   TangentRingEmitter(const TangentRingEmitter &copy);
00030   virtual ~TangentRingEmitter();
00031 
00032   virtual BaseParticleEmitter *make_copy();
00033 
00034   INLINE void set_radius(PN_stdfloat r);
00035   INLINE void set_radius_spread(PN_stdfloat spread);
00036 
00037   INLINE PN_stdfloat get_radius() const;
00038   INLINE PN_stdfloat get_radius_spread() const;
00039 
00040   virtual void output(ostream &out) const;
00041   virtual void write(ostream &out, int indent=0) const;
00042 
00043 private:
00044   PN_stdfloat _radius;
00045   PN_stdfloat _radius_spread;
00046 
00047   // CUSTOM EMISSION PARAMETERS
00048   // none
00049 
00050   ///////////////////////////////
00051   // scratch variables that carry over from position calc to velocity calc
00052   PN_stdfloat _x;
00053   PN_stdfloat _y;
00054   ///////////////////////////////
00055 
00056   virtual void assign_initial_position(LPoint3& pos);
00057   virtual void assign_initial_velocity(LVector3& vel);
00058 };
00059 
00060 #include "tangentRingEmitter.I"
00061 
00062 #endif // TANGENTRINGEMITTER_H
 All Classes Functions Variables Enumerations