Panda3D
|
00001 // Filename: odeSliderJoint.I 00002 // Created by: joswilso (27Dec06) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 INLINE void OdeSliderJoint:: 00016 set_axis(dReal x, dReal y, dReal z) { 00017 dJointSetSliderAxis(_id, x, y, z); 00018 } 00019 00020 INLINE void OdeSliderJoint:: 00021 set_axis(const LVecBase3f &axis) { 00022 dJointSetSliderAxis(_id, axis[0], axis[1], axis[2]); 00023 } 00024 00025 INLINE void OdeSliderJoint:: 00026 set_axis_delta(dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az) { 00027 dJointSetSliderAxisDelta(_id, x, y, z, ax, ay, az); 00028 } 00029 00030 INLINE void OdeSliderJoint:: 00031 set_axis_delta(const LVecBase3f &axis, const LVecBase3f &vec) { 00032 dJointSetSliderAxisDelta(_id, axis[0], axis[1], axis[2], vec[0], vec[1], vec[2]); 00033 } 00034 00035 INLINE void OdeSliderJoint:: 00036 add_force(dReal force) { 00037 dJointAddSliderForce(_id, force); 00038 } 00039 00040 INLINE dReal OdeSliderJoint:: 00041 get_position() const { 00042 return dJointGetSliderPosition(_id); 00043 } 00044 00045 INLINE dReal OdeSliderJoint:: 00046 get_position_rate() const { 00047 return dJointGetSliderPositionRate(_id); 00048 } 00049 00050 INLINE LVecBase3f OdeSliderJoint:: 00051 get_axis() const { 00052 dVector3 result; 00053 dJointGetSliderAxis(_id, result); 00054 return LVecBase3f(result[0], result[1], result[2]); 00055 } 00056 00057 INLINE void OdeSliderJoint:: 00058 set_param_lo_stop(dReal val) { 00059 nassertv( _id != 0 ); 00060 dJointSetSliderParam(_id, dParamLoStop, val); 00061 } 00062 00063 INLINE void OdeSliderJoint:: 00064 set_param_hi_stop(dReal val) { 00065 nassertv( _id != 0 ); 00066 dJointSetSliderParam(_id, dParamHiStop, val); 00067 } 00068 00069 INLINE void OdeSliderJoint:: 00070 set_param_vel(dReal val) { 00071 nassertv( _id != 0 ); 00072 dJointSetSliderParam(_id, dParamVel, val); 00073 } 00074 00075 INLINE void OdeSliderJoint:: 00076 set_param_f_max(dReal val) { 00077 nassertv( _id != 0 ); 00078 dJointSetSliderParam(_id, dParamFMax, val); 00079 } 00080 00081 INLINE void OdeSliderJoint:: 00082 set_param_fudge_factor(dReal val) { 00083 nassertv( _id != 0 ); 00084 dJointSetSliderParam(_id, dParamFudgeFactor, val); 00085 } 00086 00087 INLINE void OdeSliderJoint:: 00088 set_param_bounce(dReal val) { 00089 nassertv( _id != 0 ); 00090 dJointSetSliderParam(_id, dParamBounce, val); 00091 } 00092 00093 INLINE void OdeSliderJoint:: 00094 set_param_CFM(dReal val) { 00095 nassertv( _id != 0 ); 00096 dJointSetSliderParam(_id, dParamCFM, val); 00097 } 00098 00099 INLINE void OdeSliderJoint:: 00100 set_param_stop_ERP(dReal val) { 00101 nassertv( _id != 0 ); 00102 dJointSetSliderParam(_id, dParamStopERP, val); 00103 } 00104 00105 INLINE void OdeSliderJoint:: 00106 set_param_stop_CFM(dReal val) { 00107 nassertv( _id != 0 ); 00108 dJointSetSliderParam(_id, dParamStopCFM, val); 00109 } 00110 00111 INLINE dReal OdeSliderJoint:: 00112 get_param_lo_stop() const { 00113 nassertr( _id != 0, 0 ); 00114 return dJointGetSliderParam(_id, dParamLoStop); 00115 } 00116 00117 INLINE dReal OdeSliderJoint:: 00118 get_param_hi_stop() const { 00119 nassertr( _id != 0, 0 ); 00120 return dJointGetSliderParam(_id, dParamHiStop); 00121 } 00122 00123 INLINE dReal OdeSliderJoint:: 00124 get_param_vel() const { 00125 nassertr( _id != 0, 0 ); 00126 return dJointGetSliderParam(_id, dParamVel); 00127 } 00128 00129 INLINE dReal OdeSliderJoint:: 00130 get_param_f_max() const { 00131 nassertr( _id != 0, 0 ); 00132 return dJointGetSliderParam(_id, dParamFMax); 00133 } 00134 00135 INLINE dReal OdeSliderJoint:: 00136 get_param_fudge_factor() const { 00137 nassertr( _id != 0, 0 ); 00138 return dJointGetSliderParam(_id, dParamFudgeFactor); 00139 } 00140 00141 INLINE dReal OdeSliderJoint:: 00142 get_param_bounce() const { 00143 nassertr( _id != 0, 0 ); 00144 return dJointGetSliderParam(_id, dParamBounce); 00145 } 00146 00147 INLINE dReal OdeSliderJoint:: 00148 get_param_CFM() const { 00149 nassertr( _id != 0, 0 ); 00150 return dJointGetSliderParam(_id, dParamCFM); 00151 } 00152 00153 INLINE dReal OdeSliderJoint:: 00154 get_param_stop_ERP() const { 00155 nassertr( _id != 0, 0 ); 00156 return dJointGetSliderParam(_id, dParamStopERP); 00157 } 00158 00159 INLINE dReal OdeSliderJoint:: 00160 get_param_stop_CFM() const { 00161 nassertr( _id != 0, 0 ); 00162 return dJointGetSliderParam(_id, dParamStopCFM); 00163 } 00164