Panda3D
|
00001 // Filename: zSpinParticleFactory.h 00002 // Created by: charles (16Aug00) 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 ZSPINPARTICLEFACTORY_H 00016 #define ZSPINPARTICLEFACTORY_H 00017 00018 #include "baseParticleFactory.h" 00019 00020 //////////////////////////////////////////////////////////////////// 00021 // Class : ZSpinParticleFactory 00022 // Description : 00023 //////////////////////////////////////////////////////////////////// 00024 class EXPCL_PANDAPHYSICS ZSpinParticleFactory : public BaseParticleFactory { 00025 PUBLISHED: 00026 ZSpinParticleFactory(); 00027 ZSpinParticleFactory(const ZSpinParticleFactory ©); 00028 virtual ~ZSpinParticleFactory(); 00029 00030 INLINE void set_initial_angle(PN_stdfloat angle); 00031 INLINE void set_final_angle(PN_stdfloat angle); 00032 INLINE void set_initial_angle_spread(PN_stdfloat spread); 00033 INLINE void set_final_angle_spread(PN_stdfloat spread); 00034 00035 INLINE PN_stdfloat get_initial_angle() const; 00036 INLINE PN_stdfloat get_final_angle() const; 00037 INLINE PN_stdfloat get_initial_angle_spread() const; 00038 INLINE PN_stdfloat get_final_angle_spread() const; 00039 00040 INLINE void set_angular_velocity(PN_stdfloat v); 00041 INLINE PN_stdfloat get_angular_velocity() const; 00042 00043 INLINE void set_angular_velocity_spread(PN_stdfloat spread); 00044 INLINE PN_stdfloat get_angular_velocity_spread() const; 00045 00046 INLINE void enable_angular_velocity(bool bEnabled); 00047 INLINE bool get_angular_velocity_enabled() const; 00048 00049 virtual void output(ostream &out) const; 00050 virtual void write(ostream &out, int indent=0) const; 00051 00052 private: 00053 PN_stdfloat _initial_angle; 00054 PN_stdfloat _initial_angle_spread; 00055 PN_stdfloat _final_angle; 00056 PN_stdfloat _final_angle_spread; 00057 PN_stdfloat _angular_velocity; 00058 PN_stdfloat _angular_velocity_spread; 00059 bool _bUseAngularVelocity; 00060 00061 virtual void populate_child_particle(BaseParticle *bp) const; 00062 virtual BaseParticle *alloc_particle() const; 00063 }; 00064 00065 #include "zSpinParticleFactory.I" 00066 00067 #endif // ZSPINPARTICLEFACTORY_H