14 INLINE
void OdeAMotorJoint::
15 set_num_axes(
int num) {
16 dJointSetAMotorNumAxes(_id, num);
19 INLINE
void OdeAMotorJoint::
20 set_axis(
int anum,
int rel, dReal x, dReal y, dReal z) {
21 dJointSetAMotorAxis(_id, anum, rel, x, y, z);
24 INLINE
void OdeAMotorJoint::
25 set_axis(
int anum,
int rel,
const LVecBase3f &axis) {
26 dJointSetAMotorAxis(_id, anum, rel, axis[0], axis[1], axis[2]);
29 INLINE
void OdeAMotorJoint::
30 set_angle(
int anum, dReal angle) {
31 dJointSetAMotorAngle(_id, anum, angle);
34 INLINE
void OdeAMotorJoint::
36 dJointSetAMotorMode(_id, mode);
39 INLINE
void OdeAMotorJoint::
40 add_torques(dReal torque1, dReal torque2, dReal torque3) {
41 dJointAddAMotorTorques(_id, torque1, torque2, torque3);
44 INLINE
int OdeAMotorJoint::
45 get_num_axes()
const {
46 return dJointGetAMotorNumAxes(_id);
49 INLINE LVecBase3f OdeAMotorJoint::
50 get_axis(
int anum)
const {
52 dJointGetAMotorAxis(_id, anum, result);
53 return LVecBase3f(result[0], result[1], result[2]);
56 INLINE
int OdeAMotorJoint::
57 get_axis_rel(
int anum)
const {
58 return dJointGetAMotorAxisRel(_id, anum);
61 INLINE dReal OdeAMotorJoint::
62 get_angle(
int anum)
const {
63 return dJointGetAMotorAngle(_id, anum);
66 INLINE dReal OdeAMotorJoint::
67 get_angle_rate(
int anum)
const {
68 return dJointGetAMotorAngleRate(_id, anum);
71 INLINE
int OdeAMotorJoint::
73 return dJointGetAMotorMode(_id);
76 INLINE
void OdeAMotorJoint::
77 set_param_lo_stop(
int axis, dReal val) {
79 nassertv( 0 <= axis && axis <= 2 );
81 dJointSetAMotorParam(_id, dParamLoStop, val);
82 }
else if ( axis == 1 ) {
83 dJointSetAMotorParam(_id, dParamLoStop, val);
84 }
else if ( axis == 2 ) {
85 dJointSetAMotorParam(_id, dParamLoStop, val);
89 INLINE
void OdeAMotorJoint::
90 set_param_hi_stop(
int axis, dReal val) {
92 nassertv( 0 <= axis && axis <= 2 );
94 dJointSetAMotorParam(_id, dParamHiStop, val);
95 }
else if ( axis == 1 ) {
96 dJointSetAMotorParam(_id, dParamHiStop, val);
97 }
else if ( axis == 2 ) {
98 dJointSetAMotorParam(_id, dParamHiStop, val);
102 INLINE
void OdeAMotorJoint::
103 set_param_vel(
int axis, dReal val) {
104 nassertv( _id != 0 );
105 nassertv( 0 <= axis && axis <= 2 );
107 dJointSetAMotorParam(_id, dParamVel, val);
108 }
else if ( axis == 1 ) {
109 dJointSetAMotorParam(_id, dParamVel, val);
110 }
else if ( axis == 2 ) {
111 dJointSetAMotorParam(_id, dParamVel, val);
115 INLINE
void OdeAMotorJoint::
116 set_param_f_max(
int axis, dReal val) {
117 nassertv( _id != 0 );
118 nassertv( 0 <= axis && axis <= 2 );
120 dJointSetAMotorParam(_id, dParamFMax, val);
121 }
else if ( axis == 1 ) {
122 dJointSetAMotorParam(_id, dParamFMax, val);
123 }
else if ( axis == 2 ) {
124 dJointSetAMotorParam(_id, dParamFMax, val);
128 INLINE
void OdeAMotorJoint::
129 set_param_fudge_factor(
int axis, dReal val) {
130 nassertv( _id != 0 );
131 nassertv( 0 <= axis && axis <= 2 );
133 dJointSetAMotorParam(_id, dParamFudgeFactor, val);
134 }
else if ( axis == 1 ) {
135 dJointSetAMotorParam(_id, dParamFudgeFactor, val);
136 }
else if ( axis == 2 ) {
137 dJointSetAMotorParam(_id, dParamFudgeFactor, val);
141 INLINE
void OdeAMotorJoint::
142 set_param_bounce(
int axis, dReal val) {
143 nassertv( _id != 0 );
144 nassertv( 0 <= axis && axis <= 2 );
146 dJointSetAMotorParam(_id, dParamBounce, val);
147 }
else if ( axis == 1 ) {
148 dJointSetAMotorParam(_id, dParamBounce, val);
149 }
else if ( axis == 2 ) {
150 dJointSetAMotorParam(_id, dParamBounce, val);
154 INLINE
void OdeAMotorJoint::
155 set_param_CFM(
int axis, dReal val) {
156 nassertv( _id != 0 );
157 nassertv( 0 <= axis && axis <= 2 );
159 dJointSetAMotorParam(_id, dParamCFM, val);
160 }
else if ( axis == 1 ) {
161 dJointSetAMotorParam(_id, dParamCFM, val);
162 }
else if ( axis == 2 ) {
163 dJointSetAMotorParam(_id, dParamCFM, val);
167 INLINE
void OdeAMotorJoint::
168 set_param_stop_ERP(
int axis, dReal val) {
169 nassertv( _id != 0 );
170 nassertv( 0 <= axis && axis <= 2 );
172 dJointSetAMotorParam(_id, dParamStopERP, val);
173 }
else if ( axis == 1 ) {
174 dJointSetAMotorParam(_id, dParamStopERP, val);
175 }
else if ( axis == 2 ) {
176 dJointSetAMotorParam(_id, dParamStopERP, val);
180 INLINE
void OdeAMotorJoint::
181 set_param_stop_CFM(
int axis, dReal val) {
182 nassertv( _id != 0 );
183 nassertv( 0 <= axis && axis <= 2 );
185 dJointSetAMotorParam(_id, dParamStopCFM, val);
186 }
else if ( axis == 1 ) {
187 dJointSetAMotorParam(_id, dParamStopCFM, val);
188 }
else if ( axis == 2 ) {
189 dJointSetAMotorParam(_id, dParamStopCFM, val);
193 INLINE dReal OdeAMotorJoint::
194 get_param_lo_stop(
int axis)
const {
195 nassertr( _id != 0, 0 );
196 nassertr( 0 <= axis && axis <= 2, 0 );
198 return dJointGetAMotorParam(_id, dParamLoStop);
199 }
else if ( axis == 1 ) {
200 return dJointGetAMotorParam(_id, dParamLoStop);
201 }
else if ( axis == 2 ) {
202 return dJointGetAMotorParam(_id, dParamLoStop);
207 INLINE dReal OdeAMotorJoint::
208 get_param_hi_stop(
int axis)
const {
209 nassertr( _id != 0, 0 );
210 nassertr( 0 <= axis && axis <= 2, 0 );
212 return dJointGetAMotorParam(_id, dParamHiStop);
213 }
else if ( axis == 1 ) {
214 return dJointGetAMotorParam(_id, dParamHiStop);
215 }
else if ( axis == 2 ) {
216 return dJointGetAMotorParam(_id, dParamHiStop);
221 INLINE dReal OdeAMotorJoint::
222 get_param_vel(
int axis)
const {
223 nassertr( _id != 0, 0 );
224 nassertr( 0 <= axis && axis <= 2, 0 );
226 return dJointGetAMotorParam(_id, dParamVel);
227 }
else if ( axis == 1 ) {
228 return dJointGetAMotorParam(_id, dParamVel);
229 }
else if ( axis == 2 ) {
230 return dJointGetAMotorParam(_id, dParamVel);
235 INLINE dReal OdeAMotorJoint::
236 get_param_f_max(
int axis)
const {
237 nassertr( _id != 0, 0 );
238 nassertr( 0 <= axis && axis <= 2, 0 );
240 return dJointGetAMotorParam(_id, dParamFMax);
241 }
else if ( axis == 1 ) {
242 return dJointGetAMotorParam(_id, dParamFMax);
243 }
else if ( axis == 2 ) {
244 return dJointGetAMotorParam(_id, dParamFMax);
249 INLINE dReal OdeAMotorJoint::
250 get_param_fudge_factor(
int axis)
const {
251 nassertr( _id != 0, 0 );
252 nassertr( 0 <= axis && axis <= 2, 0 );
254 return dJointGetAMotorParam(_id, dParamFudgeFactor);
255 }
else if ( axis == 1 ) {
256 return dJointGetAMotorParam(_id, dParamFudgeFactor);
257 }
else if ( axis == 2 ) {
258 return dJointGetAMotorParam(_id, dParamFudgeFactor);
263 INLINE dReal OdeAMotorJoint::
264 get_param_bounce(
int axis)
const {
265 nassertr( _id != 0, 0 );
266 nassertr( 0 <= axis && axis <= 2, 0 );
268 return dJointGetAMotorParam(_id, dParamBounce);
269 }
else if ( axis == 1 ) {
270 return dJointGetAMotorParam(_id, dParamBounce);
271 }
else if ( axis == 2 ) {
272 return dJointGetAMotorParam(_id, dParamBounce);
277 INLINE dReal OdeAMotorJoint::
278 get_param_CFM(
int axis)
const {
279 nassertr( _id != 0, 0 );
280 nassertr( 0 <= axis && axis <= 2, 0 );
282 return dJointGetAMotorParam(_id, dParamCFM);
283 }
else if ( axis == 1 ) {
284 return dJointGetAMotorParam(_id, dParamCFM);
285 }
else if ( axis == 2 ) {
286 return dJointGetAMotorParam(_id, dParamCFM);
291 INLINE dReal OdeAMotorJoint::
292 get_param_stop_ERP(
int axis)
const {
293 nassertr( _id != 0, 0 );
294 nassertr( 0 <= axis && axis <= 2, 0 );
296 return dJointGetAMotorParam(_id, dParamStopERP);
297 }
else if ( axis == 1 ) {
298 return dJointGetAMotorParam(_id, dParamStopERP);
299 }
else if ( axis == 2 ) {
300 return dJointGetAMotorParam(_id, dParamStopERP);
305 INLINE dReal OdeAMotorJoint::
306 get_param_stop_CFM(
int axis)
const {
307 nassertr( _id != 0, 0 );
308 nassertr( 0 <= axis && axis <= 2, 0 );
310 return dJointGetAMotorParam(_id, dParamStopCFM);
311 }
else if ( axis == 1 ) {
312 return dJointGetAMotorParam(_id, dParamStopCFM);
313 }
else if ( axis == 2 ) {
314 return dJointGetAMotorParam(_id, dParamStopCFM);