Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/particlesystem/discEmitter.h

Go to the documentation of this file.
00001 // Filename: discEmitter.h
00002 // Created by:  charles (22Jun00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef DISCEMITTER_H
00020 #define DISCEMITTER_H
00021 
00022 #include "baseParticleEmitter.h"
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //       Class : DiscEmitter
00026 // Description : Describes a planar disc region from which particles
00027 //               are generated
00028 ////////////////////////////////////////////////////////////////////
00029 class EXPCL_PANDAPHYSICS DiscEmitter : public BaseParticleEmitter {
00030 private:
00031   float _radius;
00032 
00033   // CUSTOM EMISSION PARAMETERS
00034   float _outer_aoe, _inner_aoe;
00035   float _outer_magnitude, _inner_magnitude;
00036   bool _cubic_lerping;
00037 
00038   ///////////////////////////////
00039   // scratch variables that carry over from position calc to velocity calc
00040   float _distance_from_center;
00041   float _sinf_theta;
00042   float _cosf_theta;
00043   ///////////////////////////////
00044 
00045   virtual void assign_initial_position(LPoint3f& pos);
00046   virtual void assign_initial_velocity(LVector3f& vel);
00047 
00048 PUBLISHED:
00049   DiscEmitter(void);
00050   DiscEmitter(const DiscEmitter &copy);
00051   virtual ~DiscEmitter(void);
00052 
00053   virtual BaseParticleEmitter *make_copy(void);
00054 
00055   INLINE void set_radius(float r);
00056   INLINE void set_outer_angle(float o_angle);
00057   INLINE void set_inner_angle(float i_angle);
00058   INLINE void set_outer_magnitude(float o_mag);
00059   INLINE void set_inner_magnitude(float i_mag);
00060   INLINE void set_cubic_lerping(bool clerp);
00061 
00062   INLINE float get_radius(void) const;
00063   INLINE float get_outer_angle(void) const;
00064   INLINE float get_inner_angle(void) const;
00065   INLINE float get_outer_magnitude(void) const;
00066   INLINE float get_inner_magnitude(void) const;
00067   INLINE bool get_cubic_lerping(void) const;
00068 };
00069 
00070 #include "discEmitter.I"
00071 
00072 #endif // DISCEMITTER_H

Generated on Fri May 2 00:40:56 2003 for Panda by doxygen1.3