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

panda/src/particlesystem/zSpinParticle.h

Go to the documentation of this file.
00001 // Filename: zSpinParticle.h
00002 // Created by:  charles (16Aug00)
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 ZSPINPARTICLE_H
00020 #define ZSPINPARTICLE_H
00021 
00022 #include "baseParticle.h"
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //       Class : ZSpinParticle
00026 // Description : describes a particle that spins along its z axis.
00027 //               this is kind of an intermediary class- if you're
00028 //               using a SpriteParticleRenderer and you want your
00029 //               sprites to spin without having them be full-blown
00030 //               oriented (i.e. angry quat math), use this.
00031 ////////////////////////////////////////////////////////////////////
00032 class EXPCL_PANDAPHYSICS ZSpinParticle : public BaseParticle {
00033 private:
00034   float _initial_angle;
00035   float _final_angle;
00036   float _cur_angle;
00037   float _angular_velocity;
00038   bool  _bUseAngularVelocity;
00039 
00040 public:
00041   ZSpinParticle(void);
00042   ZSpinParticle(const ZSpinParticle &copy);
00043   virtual ~ZSpinParticle(void);
00044 
00045   virtual PhysicsObject *make_copy(void) const;
00046 
00047   virtual void init(void);
00048   virtual void update(void);
00049   virtual void die(void);
00050 
00051   virtual float get_theta(void) const;
00052 
00053   INLINE void set_initial_angle(float t);
00054   INLINE float get_initial_angle(void) const;
00055 
00056   INLINE void set_final_angle(float t);
00057   INLINE float get_final_angle(void) const;
00058 
00059   // 'set_final_angle' and 'angular_velocity' are mutually exclusive apis
00060   // if angular-velocity is specified, final_angle is ignored
00061   INLINE void  set_angular_velocity(float v);
00062   INLINE float get_angular_velocity(void) const;
00063 
00064   INLINE void enable_angular_velocity(bool bEnabled);
00065   INLINE bool get_angular_velocity_enabled(void) const;
00066 };
00067 
00068 #include "zSpinParticle.I"
00069 
00070 #endif // ZSPINPARTICLE_H

Generated on Fri May 2 00:41:02 2003 for Panda by doxygen1.3