00001 #ifndef ODEUNIVERSALJOINT_H
00002 #define ODEUNIVERSALJOINT_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
00014
00015
00016 class EXPCL_PANDAODE OdeUniversalJoint : public OdeJoint {
00017 friend class OdeJoint;
00018
00019 private:
00020 OdeUniversalJoint(dJointID id);
00021
00022 PUBLISHED:
00023 OdeUniversalJoint(OdeWorld &world);
00024 OdeUniversalJoint(OdeWorld &world, OdeJointGroup &joint_group);
00025 virtual ~OdeUniversalJoint();
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_angle2() const;
00041 INLINE dReal get_angle1_rate() const;
00042 INLINE dReal get_angle2_rate() const;
00043
00044 INLINE void set_param_lo_stop(int axis, dReal val);
00045 INLINE void set_param_hi_stop(int axis, dReal val);
00046 INLINE void set_param_vel(int axis, dReal val);
00047 INLINE void set_param_f_max(int axis, dReal val);
00048 INLINE void set_param_fudge_factor(int axis, dReal val);
00049 INLINE void set_param_bounce(int axis, dReal val);
00050 INLINE void set_param_CFM(int axis, dReal val);
00051 INLINE void set_param_stop_ERP(int axis, dReal val);
00052 INLINE void set_param_stop_CFM(int axis, dReal val);
00053
00054 INLINE dReal get_param_lo_stop(int axis) const;
00055 INLINE dReal get_param_hi_stop(int axis) const;
00056 INLINE dReal get_param_vel(int axis) const;
00057 INLINE dReal get_param_f_max(int axis) const;
00058 INLINE dReal get_param_fudge_factor(int axis) const;
00059 INLINE dReal get_param_bounce(int axis) const;
00060 INLINE dReal get_param_CFM(int axis) const;
00061 INLINE dReal get_param_stop_ERP(int axis) const;
00062 INLINE dReal get_param_stop_CFM(int axis) const;
00063
00064 public:
00065 static TypeHandle get_class_type() {
00066 return _type_handle;
00067 }
00068 static void init_type() {
00069 OdeJoint::init_type();
00070 register_type(_type_handle, "OdeUniversalJoint",
00071 OdeJoint::get_class_type());
00072 }
00073 virtual TypeHandle get_type() const {
00074 return get_class_type();
00075 }
00076 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00077
00078 private:
00079 static TypeHandle _type_handle;
00080 };
00081
00082 #include "odeUniversalJoint.I"
00083
00084 #endif