00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef LINEARVECTORFORCE_H
00020 #define LINEARVECTORFORCE_H
00021
00022 #include "linearForce.h"
00023
00024
00025
00026
00027
00028
00029 class EXPCL_PANDAPHYSICS LinearVectorForce : public LinearForce {
00030 private:
00031 LVector3f _fvec;
00032
00033 virtual LinearForce *make_copy(void);
00034 virtual LVector3f get_child_vector(const PhysicsObject *po);
00035
00036 PUBLISHED:
00037 LinearVectorForce(const LVector3f& vec, float a = 1.0f, bool mass = false);
00038 LinearVectorForce(const LinearVectorForce ©);
00039 LinearVectorForce(float x = 0.0f, float y = 0.0f, float z = 0.0f,
00040 float a = 1.0f, bool mass = false);
00041 virtual ~LinearVectorForce(void);
00042
00043 INLINE void set_vector(const LVector3f& v);
00044 INLINE void set_vector(float x, float y, float z);
00045
00046 INLINE LVector3f get_local_vector(void) const;
00047
00048 public:
00049 static TypeHandle get_class_type(void) {
00050 return _type_handle;
00051 }
00052 static void init_type(void) {
00053 LinearForce::init_type();
00054 register_type(_type_handle, "LinearVectorForce",
00055 LinearForce::get_class_type());
00056 }
00057 virtual TypeHandle get_type(void) const {
00058 return get_class_type();
00059 }
00060 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00061
00062 private:
00063 static TypeHandle _type_handle;
00064 };
00065
00066 #include "linearVectorForce.I"
00067
00068 #endif // LINEARVECTORFORCE_H