00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef LINEARCYLINDERVORTEXFORCE_H
00016 #define LINEARCYLINDERVORTEXFORCE_H
00017
00018 #include "linearForce.h"
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 class EXPCL_PANDAPHYSICS LinearCylinderVortexForce : public LinearForce {
00031 PUBLISHED:
00032 LinearCylinderVortexForce(PN_stdfloat radius = 1.0f,
00033 PN_stdfloat length = 0.0f,
00034 PN_stdfloat coef = 1.0f,
00035 PN_stdfloat a = 1.0f,
00036 bool md = false);
00037 LinearCylinderVortexForce(const LinearCylinderVortexForce ©);
00038 virtual ~LinearCylinderVortexForce();
00039
00040 INLINE void set_coef(PN_stdfloat coef);
00041 INLINE PN_stdfloat get_coef() const;
00042
00043 INLINE void set_radius(PN_stdfloat radius);
00044 INLINE PN_stdfloat get_radius() const;
00045
00046 INLINE void set_length(PN_stdfloat length);
00047 INLINE PN_stdfloat get_length() const;
00048
00049 virtual void output(ostream &out) const;
00050 virtual void write(ostream &out, unsigned int indent=0) const;
00051
00052 private:
00053 PN_stdfloat _radius;
00054 PN_stdfloat _length;
00055 PN_stdfloat _coef;
00056
00057 virtual LinearForce *make_copy();
00058 virtual LVector3 get_child_vector(const PhysicsObject *po);
00059
00060 public:
00061 static TypeHandle get_class_type() {
00062 return _type_handle;
00063 }
00064 static void init_type() {
00065 LinearForce::init_type();
00066 register_type(_type_handle, "LinearCylinderVortexForce",
00067 LinearForce::get_class_type());
00068 }
00069 virtual TypeHandle get_type() const {
00070 return get_class_type();
00071 }
00072 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00073
00074 private:
00075 static TypeHandle _type_handle;
00076 };
00077
00078 #include "linearCylinderVortexForce.I"
00079
00080 #endif // LINEARCYLINDERVORTEXFORCE_H