15 INLINE
void OdeAMotorJoint::
16 set_num_axes(
int num) {
17 dJointSetAMotorNumAxes(_id, num);
20 INLINE
void OdeAMotorJoint::
21 set_axis(
int anum,
int rel, dReal x, dReal y, dReal z) {
22 dJointSetAMotorAxis(_id, anum, rel, x, y, z);
25 INLINE
void OdeAMotorJoint::
26 set_axis(
int anum,
int rel,
const LVecBase3f &axis) {
27 dJointSetAMotorAxis(_id, anum, rel, axis[0], axis[1], axis[2]);
30 INLINE
void OdeAMotorJoint::
31 set_angle(
int anum, dReal angle) {
32 dJointSetAMotorAngle(_id, anum, angle);
35 INLINE
void OdeAMotorJoint::
37 dJointSetAMotorMode(_id, mode);
40 INLINE
void OdeAMotorJoint::
41 add_torques(dReal torque1, dReal torque2, dReal torque3) {
42 dJointAddAMotorTorques(_id, torque1, torque2, torque3);
45 INLINE
int OdeAMotorJoint::
46 get_num_axes()
const {
47 return dJointGetAMotorNumAxes(_id);
51 get_axis(
int anum)
const {
53 dJointGetAMotorAxis(_id, anum, result);
54 return LVecBase3f(result[0], result[1], result[2]);
57 INLINE
int OdeAMotorJoint::
58 get_axis_rel(
int anum)
const {
59 return dJointGetAMotorAxisRel(_id, anum);
62 INLINE dReal OdeAMotorJoint::
63 get_angle(
int anum)
const {
64 return dJointGetAMotorAngle(_id, anum);
67 INLINE dReal OdeAMotorJoint::
68 get_angle_rate(
int anum)
const {
69 return dJointGetAMotorAngleRate(_id, anum);
72 INLINE
int OdeAMotorJoint::
74 return dJointGetAMotorMode(_id);
77 INLINE
void OdeAMotorJoint::
78 set_param_lo_stop(
int axis, dReal val) {
80 nassertv( 0 <= axis && axis <= 2 );
82 dJointSetAMotorParam(_id, dParamLoStop, val);
83 }
else if ( axis == 1 ) {
84 dJointSetAMotorParam(_id, dParamLoStop, val);
85 }
else if ( axis == 2 ) {
86 dJointSetAMotorParam(_id, dParamLoStop, val);
90 INLINE
void OdeAMotorJoint::
91 set_param_hi_stop(
int axis, dReal val) {
93 nassertv( 0 <= axis && axis <= 2 );
95 dJointSetAMotorParam(_id, dParamHiStop, val);
96 }
else if ( axis == 1 ) {
97 dJointSetAMotorParam(_id, dParamHiStop, val);
98 }
else if ( axis == 2 ) {
99 dJointSetAMotorParam(_id, dParamHiStop, val);
103 INLINE
void OdeAMotorJoint::
104 set_param_vel(
int axis, dReal val) {
105 nassertv( _id != 0 );
106 nassertv( 0 <= axis && axis <= 2 );
108 dJointSetAMotorParam(_id, dParamVel, val);
109 }
else if ( axis == 1 ) {
110 dJointSetAMotorParam(_id, dParamVel, val);
111 }
else if ( axis == 2 ) {
112 dJointSetAMotorParam(_id, dParamVel, val);
116 INLINE
void OdeAMotorJoint::
117 set_param_f_max(
int axis, dReal val) {
118 nassertv( _id != 0 );
119 nassertv( 0 <= axis && axis <= 2 );
121 dJointSetAMotorParam(_id, dParamFMax, val);
122 }
else if ( axis == 1 ) {
123 dJointSetAMotorParam(_id, dParamFMax, val);
124 }
else if ( axis == 2 ) {
125 dJointSetAMotorParam(_id, dParamFMax, val);
129 INLINE
void OdeAMotorJoint::
130 set_param_fudge_factor(
int axis, dReal val) {
131 nassertv( _id != 0 );
132 nassertv( 0 <= axis && axis <= 2 );
134 dJointSetAMotorParam(_id, dParamFudgeFactor, val);
135 }
else if ( axis == 1 ) {
136 dJointSetAMotorParam(_id, dParamFudgeFactor, val);
137 }
else if ( axis == 2 ) {
138 dJointSetAMotorParam(_id, dParamFudgeFactor, val);
142 INLINE
void OdeAMotorJoint::
143 set_param_bounce(
int axis, dReal val) {
144 nassertv( _id != 0 );
145 nassertv( 0 <= axis && axis <= 2 );
147 dJointSetAMotorParam(_id, dParamBounce, val);
148 }
else if ( axis == 1 ) {
149 dJointSetAMotorParam(_id, dParamBounce, val);
150 }
else if ( axis == 2 ) {
151 dJointSetAMotorParam(_id, dParamBounce, val);
155 INLINE
void OdeAMotorJoint::
156 set_param_CFM(
int axis, dReal val) {
157 nassertv( _id != 0 );
158 nassertv( 0 <= axis && axis <= 2 );
160 dJointSetAMotorParam(_id, dParamCFM, val);
161 }
else if ( axis == 1 ) {
162 dJointSetAMotorParam(_id, dParamCFM, val);
163 }
else if ( axis == 2 ) {
164 dJointSetAMotorParam(_id, dParamCFM, val);
168 INLINE
void OdeAMotorJoint::
169 set_param_stop_ERP(
int axis, dReal val) {
170 nassertv( _id != 0 );
171 nassertv( 0 <= axis && axis <= 2 );
173 dJointSetAMotorParam(_id, dParamStopERP, val);
174 }
else if ( axis == 1 ) {
175 dJointSetAMotorParam(_id, dParamStopERP, val);
176 }
else if ( axis == 2 ) {
177 dJointSetAMotorParam(_id, dParamStopERP, val);
181 INLINE
void OdeAMotorJoint::
182 set_param_stop_CFM(
int axis, dReal val) {
183 nassertv( _id != 0 );
184 nassertv( 0 <= axis && axis <= 2 );
186 dJointSetAMotorParam(_id, dParamStopCFM, val);
187 }
else if ( axis == 1 ) {
188 dJointSetAMotorParam(_id, dParamStopCFM, val);
189 }
else if ( axis == 2 ) {
190 dJointSetAMotorParam(_id, dParamStopCFM, val);
194 INLINE dReal OdeAMotorJoint::
195 get_param_lo_stop(
int axis)
const {
196 nassertr( _id != 0, 0 );
197 nassertr( 0 <= axis && axis <= 2, 0 );
199 return dJointGetAMotorParam(_id, dParamLoStop);
200 }
else if ( axis == 1 ) {
201 return dJointGetAMotorParam(_id, dParamLoStop);
202 }
else if ( axis == 2 ) {
203 return dJointGetAMotorParam(_id, dParamLoStop);
208 INLINE dReal OdeAMotorJoint::
209 get_param_hi_stop(
int axis)
const {
210 nassertr( _id != 0, 0 );
211 nassertr( 0 <= axis && axis <= 2, 0 );
213 return dJointGetAMotorParam(_id, dParamHiStop);
214 }
else if ( axis == 1 ) {
215 return dJointGetAMotorParam(_id, dParamHiStop);
216 }
else if ( axis == 2 ) {
217 return dJointGetAMotorParam(_id, dParamHiStop);
222 INLINE dReal OdeAMotorJoint::
223 get_param_vel(
int axis)
const {
224 nassertr( _id != 0, 0 );
225 nassertr( 0 <= axis && axis <= 2, 0 );
227 return dJointGetAMotorParam(_id, dParamVel);
228 }
else if ( axis == 1 ) {
229 return dJointGetAMotorParam(_id, dParamVel);
230 }
else if ( axis == 2 ) {
231 return dJointGetAMotorParam(_id, dParamVel);
236 INLINE dReal OdeAMotorJoint::
237 get_param_f_max(
int axis)
const {
238 nassertr( _id != 0, 0 );
239 nassertr( 0 <= axis && axis <= 2, 0 );
241 return dJointGetAMotorParam(_id, dParamFMax);
242 }
else if ( axis == 1 ) {
243 return dJointGetAMotorParam(_id, dParamFMax);
244 }
else if ( axis == 2 ) {
245 return dJointGetAMotorParam(_id, dParamFMax);
250 INLINE dReal OdeAMotorJoint::
251 get_param_fudge_factor(
int axis)
const {
252 nassertr( _id != 0, 0 );
253 nassertr( 0 <= axis && axis <= 2, 0 );
255 return dJointGetAMotorParam(_id, dParamFudgeFactor);
256 }
else if ( axis == 1 ) {
257 return dJointGetAMotorParam(_id, dParamFudgeFactor);
258 }
else if ( axis == 2 ) {
259 return dJointGetAMotorParam(_id, dParamFudgeFactor);
264 INLINE dReal OdeAMotorJoint::
265 get_param_bounce(
int axis)
const {
266 nassertr( _id != 0, 0 );
267 nassertr( 0 <= axis && axis <= 2, 0 );
269 return dJointGetAMotorParam(_id, dParamBounce);
270 }
else if ( axis == 1 ) {
271 return dJointGetAMotorParam(_id, dParamBounce);
272 }
else if ( axis == 2 ) {
273 return dJointGetAMotorParam(_id, dParamBounce);
278 INLINE dReal OdeAMotorJoint::
279 get_param_CFM(
int axis)
const {
280 nassertr( _id != 0, 0 );
281 nassertr( 0 <= axis && axis <= 2, 0 );
283 return dJointGetAMotorParam(_id, dParamCFM);
284 }
else if ( axis == 1 ) {
285 return dJointGetAMotorParam(_id, dParamCFM);
286 }
else if ( axis == 2 ) {
287 return dJointGetAMotorParam(_id, dParamCFM);
292 INLINE dReal OdeAMotorJoint::
293 get_param_stop_ERP(
int axis)
const {
294 nassertr( _id != 0, 0 );
295 nassertr( 0 <= axis && axis <= 2, 0 );
297 return dJointGetAMotorParam(_id, dParamStopERP);
298 }
else if ( axis == 1 ) {
299 return dJointGetAMotorParam(_id, dParamStopERP);
300 }
else if ( axis == 2 ) {
301 return dJointGetAMotorParam(_id, dParamStopERP);
306 INLINE dReal OdeAMotorJoint::
307 get_param_stop_CFM(
int axis)
const {
308 nassertr( _id != 0, 0 );
309 nassertr( 0 <= axis && axis <= 2, 0 );
311 return dJointGetAMotorParam(_id, dParamStopCFM);
312 }
else if ( axis == 1 ) {
313 return dJointGetAMotorParam(_id, dParamStopCFM);
314 }
else if ( axis == 2 ) {
315 return dJointGetAMotorParam(_id, dParamStopCFM);
This is the base class for all three-component vectors and points.