00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef LINEARFRICTIONFORCE_H
00016 #define LINEARFRICTIONFORCE_H
00017
00018 #include "linearForce.h"
00019
00020
00021
00022
00023
00024 class EXPCL_PANDAPHYSICS LinearFrictionForce : public LinearForce {
00025 PUBLISHED:
00026 LinearFrictionForce(PN_stdfloat coef = 1.0f, PN_stdfloat a = 1.0f, bool m = false);
00027 LinearFrictionForce(const LinearFrictionForce ©);
00028 virtual ~LinearFrictionForce();
00029
00030 INLINE void set_coef(PN_stdfloat coef);
00031 INLINE PN_stdfloat get_coef() const;
00032
00033 virtual void output(ostream &out) const;
00034 virtual void write(ostream &out, unsigned int indent=0) const;
00035
00036 private:
00037 PN_stdfloat _coef;
00038
00039 virtual LinearForce *make_copy();
00040 virtual LVector3 get_child_vector(const PhysicsObject *);
00041
00042 public:
00043 static TypeHandle get_class_type() {
00044 return _type_handle;
00045 }
00046 static void init_type() {
00047 LinearForce::init_type();
00048 register_type(_type_handle, "LinearFrictionForce",
00049 LinearForce::get_class_type());
00050 }
00051 virtual TypeHandle get_type() const {
00052 return get_class_type();
00053 }
00054 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00055
00056 private:
00057 static TypeHandle _type_handle;
00058 };
00059
00060 #include "linearFrictionForce.I"
00061
00062 #endif // LINEARFRICTIONFORCE_H