00001 #ifndef ODEAMOTORJOINT_H
00002 #define ODEAMOTORJOINT_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 OdeAMotorJoint : public OdeJoint {
00017 friend class OdeJoint;
00018
00019 private:
00020 OdeAMotorJoint(dJointID id);
00021
00022 PUBLISHED:
00023 OdeAMotorJoint(OdeWorld &world);
00024 OdeAMotorJoint(OdeWorld &world, OdeJointGroup &joint_group);
00025 virtual ~OdeAMotorJoint();
00026
00027 INLINE void set_num_axes(int num);
00028 INLINE void set_axis(int anum, int rel, dReal x, dReal y, dReal z);
00029 INLINE void set_axis(int anum, int rel, const LVecBase3f &axis);
00030 INLINE void set_angle(int anum, dReal angle);
00031 INLINE void set_mode(int mode);
00032 INLINE void add_torques(dReal torque1, dReal torque2, dReal torque3);
00033
00034 INLINE int get_num_axes() const;
00035 INLINE LVecBase3f get_axis(int anum) const;
00036 MAKE_SEQ(get_axes, get_num_axes, get_axis);
00037 INLINE int get_axis_rel(int anum) const;
00038 INLINE dReal get_angle(int anum) const;
00039 INLINE dReal get_angle_rate(int anum) const;
00040 INLINE int get_mode() const;
00041
00042 INLINE void set_param_lo_stop(int axis, dReal val);
00043 INLINE void set_param_hi_stop(int axis, dReal val);
00044 INLINE void set_param_vel(int axis, dReal val);
00045 INLINE void set_param_f_max(int axis, dReal val);
00046 INLINE void set_param_fudge_factor(int axis, dReal val);
00047 INLINE void set_param_bounce(int axis, dReal val);
00048 INLINE void set_param_CFM(int axis, dReal val);
00049 INLINE void set_param_stop_ERP(int axis, dReal val);
00050 INLINE void set_param_stop_CFM(int axis, dReal val);
00051
00052 INLINE dReal get_param_lo_stop(int axis) const;
00053 INLINE dReal get_param_hi_stop(int axis) const;
00054 INLINE dReal get_param_vel(int axis) const;
00055 INLINE dReal get_param_f_max(int axis) const;
00056 INLINE dReal get_param_fudge_factor(int axis) const;
00057 INLINE dReal get_param_bounce(int axis) const;
00058 INLINE dReal get_param_CFM(int axis) const;
00059 INLINE dReal get_param_stop_ERP(int axis) const;
00060 INLINE dReal get_param_stop_CFM(int axis) const;
00061
00062
00063 public:
00064 static TypeHandle get_class_type() {
00065 return _type_handle;
00066 }
00067 static void init_type() {
00068 OdeJoint::init_type();
00069 register_type(_type_handle, "OdeAMotorJoint",
00070 OdeJoint::get_class_type());
00071 }
00072 virtual TypeHandle get_type() const {
00073 return get_class_type();
00074 }
00075 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00076
00077 private:
00078 static TypeHandle _type_handle;
00079 };
00080
00081 #include "odeAMotorJoint.I"
00082
00083 #endif