00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef ZSPINPARTICLE_H
00016 #define ZSPINPARTICLE_H
00017
00018 #include "baseParticle.h"
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 class EXPCL_PANDAPHYSICS ZSpinParticle : public BaseParticle {
00029 public:
00030 ZSpinParticle();
00031 ZSpinParticle(const ZSpinParticle ©);
00032 virtual ~ZSpinParticle();
00033
00034 virtual PhysicsObject *make_copy() const;
00035
00036 virtual void init();
00037 virtual void update();
00038 virtual void die();
00039
00040 virtual PN_stdfloat get_theta() const;
00041
00042 INLINE void set_initial_angle(PN_stdfloat t);
00043 INLINE PN_stdfloat get_initial_angle() const;
00044
00045 INLINE void set_final_angle(PN_stdfloat t);
00046 INLINE PN_stdfloat get_final_angle() const;
00047
00048
00049
00050 INLINE void set_angular_velocity(PN_stdfloat v);
00051 INLINE PN_stdfloat get_angular_velocity() const;
00052
00053 INLINE void enable_angular_velocity(bool bEnabled);
00054 INLINE bool get_angular_velocity_enabled() const;
00055
00056 virtual void output(ostream &out) const;
00057 virtual void write(ostream &out, int indent=0) const;
00058
00059 private:
00060 PN_stdfloat _initial_angle;
00061 PN_stdfloat _final_angle;
00062 PN_stdfloat _cur_angle;
00063 PN_stdfloat _angular_velocity;
00064 bool _bUseAngularVelocity;
00065 };
00066
00067 #include "zSpinParticle.I"
00068
00069 #endif // ZSPINPARTICLE_H