Panda3D
|
00001 #ifndef ODEHINGEJOINT_H 00002 #define ODEHINGEJOINT_H 00003 00004 #include "pandabase.h" 00005 #include "luse.h" 00006 00007 #include "ode_includes.h" 00008 00009 #include "odeJoint.h" 00010 00011 //////////////////////////////////////////////////////////////////// 00012 // Class : OdeHingeJoint 00013 // Description : 00014 //////////////////////////////////////////////////////////////////// 00015 class EXPCL_PANDAODE OdeHingeJoint : public OdeJoint { 00016 friend class OdeJoint; 00017 00018 private: 00019 OdeHingeJoint(dJointID id); 00020 00021 PUBLISHED: 00022 OdeHingeJoint(OdeWorld &world); 00023 OdeHingeJoint(OdeWorld &world, OdeJointGroup &joint_group); 00024 virtual ~OdeHingeJoint(); 00025 00026 INLINE void set_anchor(dReal x, dReal y, dReal z); 00027 INLINE void set_anchor(const LVecBase3f &anchor); 00028 INLINE void set_anchor_delta(dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); 00029 INLINE void set_anchor_delta(const LVecBase3f &anchor, const LVecBase3f &vec); 00030 INLINE void set_axis(dReal x, dReal y, dReal z); 00031 INLINE void set_axis(const LVecBase3f &axis); 00032 INLINE void add_torque(dReal torque); 00033 00034 INLINE LVecBase3f get_anchor() const; 00035 INLINE LVecBase3f get_anchor2() const; 00036 INLINE LVecBase3f get_axis() const; 00037 INLINE dReal get_angle() const; 00038 INLINE dReal get_angle_rate() const; 00039 00040 INLINE void set_param_lo_stop(dReal val); 00041 INLINE void set_param_hi_stop(dReal val); 00042 INLINE void set_param_vel(dReal val); 00043 INLINE void set_param_f_max(dReal val); 00044 INLINE void set_param_fudge_factor(dReal val); 00045 INLINE void set_param_bounce(dReal val); 00046 INLINE void set_param_CFM(dReal val); 00047 INLINE void set_param_stop_ERP(dReal val); 00048 INLINE void set_param_stop_CFM(dReal val); 00049 00050 INLINE dReal get_param_lo_stop() const; 00051 INLINE dReal get_param_hi_stop() const; 00052 INLINE dReal get_param_vel() const; 00053 INLINE dReal get_param_f_max() const; 00054 INLINE dReal get_param_fudge_factor() const; 00055 INLINE dReal get_param_bounce() const; 00056 INLINE dReal get_param_CFM() const; 00057 INLINE dReal get_param_stop_ERP() const; 00058 INLINE dReal get_param_stop_CFM() const; 00059 00060 public: 00061 static TypeHandle get_class_type() { 00062 return _type_handle; 00063 } 00064 static void init_type() { 00065 OdeJoint::init_type(); 00066 register_type(_type_handle, "OdeHingeJoint", 00067 OdeJoint::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 "odeHingeJoint.I" 00079 00080 #endif