00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 INLINE void OdeHingeJoint::
00016 set_anchor(dReal x, dReal y, dReal z) {
00017 dJointSetHingeAnchor(_id, x, y, z);
00018 }
00019
00020 INLINE void OdeHingeJoint::
00021 set_anchor(const LVecBase3f &anchor) {
00022 dJointSetHingeAnchor(_id, anchor[0], anchor[1], anchor[2]);
00023 }
00024
00025 INLINE void OdeHingeJoint::
00026 set_anchor_delta(dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az) {
00027 dJointSetHingeAnchorDelta(_id, x, y, z, ax, ay, az);
00028 }
00029
00030 INLINE void OdeHingeJoint::
00031 set_anchor_delta(const LVecBase3f &anchor, const LVecBase3f &vec) {
00032 dJointSetHingeAnchorDelta(_id, anchor[0], anchor[1], anchor[2], vec[0], vec[1], vec[2]);
00033 }
00034
00035 INLINE void OdeHingeJoint::
00036 set_axis(dReal x, dReal y, dReal z) {
00037 dJointSetHingeAxis(_id, x, y, z);
00038 }
00039
00040 INLINE void OdeHingeJoint::
00041 set_axis(const LVecBase3f &axis) {
00042 dJointSetHingeAxis(_id, axis[0], axis[1], axis[2]);
00043 }
00044
00045 INLINE void OdeHingeJoint::
00046 add_torque(dReal torque) {
00047 dJointAddHingeTorque(_id, torque);
00048 }
00049
00050 INLINE LVecBase3f OdeHingeJoint::
00051 get_anchor() const {
00052 dVector3 result;
00053 dJointGetHingeAnchor(_id, result);
00054 return LVecBase3f(result[0], result[1], result[2]);
00055 }
00056
00057 INLINE LVecBase3f OdeHingeJoint::
00058 get_anchor2() const {
00059 dVector3 result;
00060 dJointGetHingeAnchor2(_id, result);
00061 return LVecBase3f(result[0], result[1], result[2]);
00062 }
00063
00064 INLINE LVecBase3f OdeHingeJoint::
00065 get_axis() const {
00066 dVector3 result;
00067 dJointGetHingeAxis(_id, result);
00068 return LVecBase3f(result[0], result[1], result[2]);
00069 }
00070
00071 INLINE dReal OdeHingeJoint::
00072 get_angle() const {
00073 return dJointGetHingeAngle(_id);
00074 }
00075
00076 INLINE dReal OdeHingeJoint::
00077 get_angle_rate() const {
00078 return dJointGetHingeAngleRate(_id);
00079 }
00080
00081 INLINE void OdeHingeJoint::
00082 set_param_lo_stop(dReal val) {
00083 nassertv( _id != 0 );
00084 dJointSetHingeParam(_id, dParamLoStop, val);
00085 }
00086
00087 INLINE void OdeHingeJoint::
00088 set_param_hi_stop(dReal val) {
00089 nassertv( _id != 0 );
00090 dJointSetHingeParam(_id, dParamHiStop, val);
00091 }
00092
00093 INLINE void OdeHingeJoint::
00094 set_param_vel(dReal val) {
00095 nassertv( _id != 0 );
00096 dJointSetHingeParam(_id, dParamVel, val);
00097 }
00098
00099 INLINE void OdeHingeJoint::
00100 set_param_f_max(dReal val) {
00101 nassertv( _id != 0 );
00102 dJointSetHingeParam(_id, dParamFMax, val);
00103 }
00104
00105 INLINE void OdeHingeJoint::
00106 set_param_fudge_factor(dReal val) {
00107 nassertv( _id != 0 );
00108 dJointSetHingeParam(_id, dParamFudgeFactor, val);
00109 }
00110
00111 INLINE void OdeHingeJoint::
00112 set_param_bounce(dReal val) {
00113 nassertv( _id != 0 );
00114 dJointSetHingeParam(_id, dParamBounce, val);
00115 }
00116
00117 INLINE void OdeHingeJoint::
00118 set_param_CFM(dReal val) {
00119 nassertv( _id != 0 );
00120 dJointSetHingeParam(_id, dParamCFM, val);
00121 }
00122
00123 INLINE void OdeHingeJoint::
00124 set_param_stop_ERP(dReal val) {
00125 nassertv( _id != 0 );
00126 dJointSetHingeParam(_id, dParamStopERP, val);
00127 }
00128
00129 INLINE void OdeHingeJoint::
00130 set_param_stop_CFM(dReal val) {
00131 nassertv( _id != 0 );
00132 dJointSetHingeParam(_id, dParamStopCFM, val);
00133 }
00134
00135 INLINE dReal OdeHingeJoint::
00136 get_param_lo_stop() const {
00137 nassertr( _id != 0, 0 );
00138 return dJointGetHingeParam(_id, dParamLoStop);
00139 }
00140
00141 INLINE dReal OdeHingeJoint::
00142 get_param_hi_stop() const {
00143 nassertr( _id != 0, 0 );
00144 return dJointGetHingeParam(_id, dParamHiStop);
00145 }
00146
00147 INLINE dReal OdeHingeJoint::
00148 get_param_vel() const {
00149 nassertr( _id != 0, 0 );
00150 return dJointGetHingeParam(_id, dParamVel);
00151 }
00152
00153 INLINE dReal OdeHingeJoint::
00154 get_param_f_max() const {
00155 nassertr( _id != 0, 0 );
00156 return dJointGetHingeParam(_id, dParamFMax);
00157 }
00158
00159 INLINE dReal OdeHingeJoint::
00160 get_param_fudge_factor() const {
00161 nassertr( _id != 0, 0 );
00162 return dJointGetHingeParam(_id, dParamFudgeFactor);
00163 }
00164
00165 INLINE dReal OdeHingeJoint::
00166 get_param_bounce() const {
00167 nassertr( _id != 0, 0 );
00168 return dJointGetHingeParam(_id, dParamBounce);
00169 }
00170
00171 INLINE dReal OdeHingeJoint::
00172 get_param_CFM() const {
00173 nassertr( _id != 0, 0 );
00174 return dJointGetHingeParam(_id, dParamCFM);
00175 }
00176
00177 INLINE dReal OdeHingeJoint::
00178 get_param_stop_ERP() const {
00179 nassertr( _id != 0, 0 );
00180 return dJointGetHingeParam(_id, dParamStopERP);
00181 }
00182
00183 INLINE dReal OdeHingeJoint::
00184 get_param_stop_CFM() const {
00185 nassertr( _id != 0, 0 );
00186 return dJointGetHingeParam(_id, dParamStopCFM);
00187 }
00188