Panda3D
|
00001 #ifndef ODEHINGE2JOINT_H 00002 #define ODEHINGE2JOINT_H 00003 00004 #include "pandabase.h" 00005 #include "typedObject.h" 00006 #include "luse.h" 00007 00008 #include "ode_includes.h" 00009 00010 #include "odeJoint.h" 00011 00012 //////////////////////////////////////////////////////////////////// 00013 // Class : OdeHinge2Joint 00014 // Description : 00015 //////////////////////////////////////////////////////////////////// 00016 class EXPCL_PANDAODE OdeHinge2Joint : public OdeJoint { 00017 friend class OdeJoint; 00018 00019 private: 00020 OdeHinge2Joint(dJointID id); 00021 00022 PUBLISHED: 00023 OdeHinge2Joint(OdeWorld &world, OdeJointGroup &joint_group); 00024 OdeHinge2Joint(OdeWorld &world); 00025 virtual ~OdeHinge2Joint(); 00026 00027 INLINE void set_anchor(dReal x, dReal y, dReal z); 00028 INLINE void set_anchor(const LVecBase3f &anchor); 00029 INLINE void set_axis1(dReal x, dReal y, dReal z); 00030 INLINE void set_axis1(const LVecBase3f &axis); 00031 INLINE void set_axis2(dReal x, dReal y, dReal z); 00032 INLINE void set_axis2(const LVecBase3f &axis); 00033 INLINE void add_torques(dReal torque1, dReal torque2); 00034 00035 INLINE LVecBase3f get_anchor() const; 00036 INLINE LVecBase3f get_anchor2() const; 00037 INLINE LVecBase3f get_axis1() const; 00038 INLINE LVecBase3f get_axis2() const; 00039 INLINE dReal get_angle1() const; 00040 INLINE dReal get_angle1_rate() const; 00041 INLINE dReal get_angle2_rate() const; 00042 00043 INLINE void set_param_lo_stop(int axis, dReal val); 00044 INLINE void set_param_hi_stop(int axis, dReal val); 00045 INLINE void set_param_vel(int axis, dReal val); 00046 INLINE void set_param_f_max(int axis, dReal val); 00047 INLINE void set_param_fudge_factor(int axis, dReal val); 00048 INLINE void set_param_bounce(int axis, dReal val); 00049 INLINE void set_param_CFM(int axis, dReal val); 00050 INLINE void set_param_stop_ERP(int axis, dReal val); 00051 INLINE void set_param_stop_CFM(int axis, dReal val); 00052 INLINE void set_param_suspension_ERP(int axis, dReal val); 00053 INLINE void set_param_suspension_CFM(int axis, dReal val); 00054 00055 INLINE dReal get_param_lo_stop(int axis) const; 00056 INLINE dReal get_param_hi_stop(int axis) const; 00057 INLINE dReal get_param_vel(int axis) const; 00058 INLINE dReal get_param_f_max(int axis) const; 00059 INLINE dReal get_param_fudge_factor(int axis) const; 00060 INLINE dReal get_param_bounce(int axis) const; 00061 INLINE dReal get_param_CFM(int axis) const; 00062 INLINE dReal get_param_stop_ERP(int axis) const; 00063 INLINE dReal get_param_stop_CFM(int axis) const; 00064 INLINE dReal get_param_suspension_ERP(int axis) const; 00065 INLINE dReal get_param_suspension_CFM(int axis) const; 00066 00067 public: 00068 static TypeHandle get_class_type() { 00069 return _type_handle; 00070 } 00071 static void init_type() { 00072 OdeJoint::init_type(); 00073 register_type(_type_handle, "OdeHinge2Joint", 00074 OdeJoint::get_class_type()); 00075 } 00076 virtual TypeHandle get_type() const { 00077 return get_class_type(); 00078 } 00079 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00080 00081 private: 00082 static TypeHandle _type_handle; 00083 }; 00084 00085 #include "odeHinge2Joint.I" 00086 00087 #endif