14 INLINE
void OdeUniversalJoint::
15 set_anchor(dReal x, dReal y, dReal z) {
16 dJointSetUniversalAnchor(_id, x, y, z);
19 INLINE
void OdeUniversalJoint::
20 set_anchor(
const LVecBase3f &anchor) {
21 dJointSetUniversalAnchor(_id, anchor[0], anchor[1], anchor[2]);
24 INLINE
void OdeUniversalJoint::
25 set_axis1(dReal x, dReal y, dReal z) {
26 dJointSetUniversalAxis1(_id, x, y, z);
29 INLINE
void OdeUniversalJoint::
30 set_axis1(
const LVecBase3f &axis) {
31 dJointSetUniversalAxis1(_id, axis[0], axis[1], axis[2]);
34 INLINE
void OdeUniversalJoint::
35 set_axis2(dReal x, dReal y, dReal z) {
36 dJointSetUniversalAxis2(_id, x, y, z);
39 INLINE
void OdeUniversalJoint::
40 set_axis2(
const LVecBase3f &axis) {
41 dJointSetUniversalAxis2(_id, axis[0], axis[1], axis[2]);
44 INLINE
void OdeUniversalJoint::
45 add_torques(dReal torque1, dReal torque2) {
46 dJointAddUniversalTorques(_id, torque1, torque2);
49 INLINE LVecBase3f OdeUniversalJoint::
52 dJointGetUniversalAnchor(_id, result);
53 return LVecBase3f(result[0], result[1], result[2]);
56 INLINE LVecBase3f OdeUniversalJoint::
59 dJointGetUniversalAnchor2(_id, result);
60 return LVecBase3f(result[0], result[1], result[2]);
63 INLINE LVecBase3f OdeUniversalJoint::
66 dJointGetUniversalAxis1(_id, result);
67 return LVecBase3f(result[0], result[1], result[2]);
70 INLINE LVecBase3f OdeUniversalJoint::
73 dJointGetUniversalAxis2(_id, result);
74 return LVecBase3f(result[0], result[1], result[2]);
77 INLINE dReal OdeUniversalJoint::
79 return dJointGetUniversalAngle1(_id);
82 INLINE dReal OdeUniversalJoint::
84 return dJointGetUniversalAngle2(_id);
87 INLINE dReal OdeUniversalJoint::
88 get_angle1_rate()
const {
89 return dJointGetUniversalAngle1Rate(_id);
92 INLINE dReal OdeUniversalJoint::
93 get_angle2_rate()
const {
94 return dJointGetUniversalAngle2Rate(_id);
98 INLINE
void OdeUniversalJoint::
99 set_param_lo_stop(
int axis, dReal val) {
100 nassertv( _id != 0 );
101 nassertv( 0 <= axis && axis <= 1 );
103 dJointSetUniversalParam(_id, dParamLoStop, val);
104 }
else if ( axis == 1 ) {
105 dJointSetUniversalParam(_id, dParamLoStop2, val);
109 INLINE
void OdeUniversalJoint::
110 set_param_hi_stop(
int axis, dReal val) {
111 nassertv( _id != 0 );
112 nassertv( 0 <= axis && axis <= 1 );
114 dJointSetUniversalParam(_id, dParamHiStop, val);
115 }
else if ( axis == 1 ) {
116 dJointSetUniversalParam(_id, dParamHiStop2, val);
120 INLINE
void OdeUniversalJoint::
121 set_param_vel(
int axis, dReal val) {
122 nassertv( _id != 0 );
123 nassertv( 0 <= axis && axis <= 1 );
125 dJointSetUniversalParam(_id, dParamVel, val);
126 }
else if ( axis == 1 ) {
127 dJointSetUniversalParam(_id, dParamVel2, val);
131 INLINE
void OdeUniversalJoint::
132 set_param_f_max(
int axis, dReal val) {
133 nassertv( _id != 0 );
134 nassertv( 0 <= axis && axis <= 1 );
136 dJointSetUniversalParam(_id, dParamFMax, val);
137 }
else if ( axis == 1 ) {
138 dJointSetUniversalParam(_id, dParamFMax2, val);
142 INLINE
void OdeUniversalJoint::
143 set_param_fudge_factor(
int axis, dReal val) {
144 nassertv( _id != 0 );
145 nassertv( 0 <= axis && axis <= 1 );
147 dJointSetUniversalParam(_id, dParamFudgeFactor, val);
148 }
else if ( axis == 1 ) {
149 dJointSetUniversalParam(_id, dParamFudgeFactor2, val);
153 INLINE
void OdeUniversalJoint::
154 set_param_bounce(
int axis, dReal val) {
155 nassertv( _id != 0 );
156 nassertv( 0 <= axis && axis <= 1 );
158 dJointSetUniversalParam(_id, dParamBounce, val);
159 }
else if ( axis == 1 ) {
160 dJointSetUniversalParam(_id, dParamBounce2, val);
164 INLINE
void OdeUniversalJoint::
165 set_param_CFM(
int axis, dReal val) {
166 nassertv( _id != 0 );
167 nassertv( 0 <= axis && axis <= 1 );
169 dJointSetUniversalParam(_id, dParamCFM, val);
170 }
else if ( axis == 1 ) {
171 dJointSetUniversalParam(_id, dParamCFM2, val);
175 INLINE
void OdeUniversalJoint::
176 set_param_stop_ERP(
int axis, dReal val) {
177 nassertv( _id != 0 );
178 nassertv( 0 <= axis && axis <= 1 );
180 dJointSetUniversalParam(_id, dParamStopERP, val);
181 }
else if ( axis == 1 ) {
182 dJointSetUniversalParam(_id, dParamStopERP2, val);
186 INLINE
void OdeUniversalJoint::
187 set_param_stop_CFM(
int axis, dReal val) {
188 nassertv( _id != 0 );
189 nassertv( 0 <= axis && axis <= 1 );
191 dJointSetUniversalParam(_id, dParamStopCFM, val);
192 }
else if ( axis == 1 ) {
193 dJointSetUniversalParam(_id, dParamStopCFM2, val);
197 INLINE dReal OdeUniversalJoint::
198 get_param_lo_stop(
int axis)
const {
199 nassertr( _id != 0, 0 );
200 nassertr( 0 <= axis && axis <= 1, 0 );
202 return dJointGetUniversalParam(_id, dParamLoStop);
203 }
else if ( axis == 1 ) {
204 return dJointGetUniversalParam(_id, dParamLoStop2);
209 INLINE dReal OdeUniversalJoint::
210 get_param_hi_stop(
int axis)
const {
211 nassertr( _id != 0, 0 );
212 nassertr( 0 <= axis && axis <= 1, 0 );
214 return dJointGetUniversalParam(_id, dParamHiStop);
215 }
else if ( axis == 1 ) {
216 return dJointGetUniversalParam(_id, dParamHiStop2);
221 INLINE dReal OdeUniversalJoint::
222 get_param_vel(
int axis)
const {
223 nassertr( _id != 0, 0 );
224 nassertr( 0 <= axis && axis <= 1, 0 );
226 return dJointGetUniversalParam(_id, dParamVel);
227 }
else if ( axis == 1 ) {
228 return dJointGetUniversalParam(_id, dParamVel2);
233 INLINE dReal OdeUniversalJoint::
234 get_param_f_max(
int axis)
const {
235 nassertr( _id != 0, 0 );
236 nassertr( 0 <= axis && axis <= 1, 0 );
238 return dJointGetUniversalParam(_id, dParamFMax);
239 }
else if ( axis == 1 ) {
240 return dJointGetUniversalParam(_id, dParamFMax2);
245 INLINE dReal OdeUniversalJoint::
246 get_param_fudge_factor(
int axis)
const {
247 nassertr( _id != 0, 0 );
248 nassertr( 0 <= axis && axis <= 1, 0 );
250 return dJointGetUniversalParam(_id, dParamFudgeFactor);
251 }
else if ( axis == 1 ) {
252 return dJointGetUniversalParam(_id, dParamFudgeFactor2);
257 INLINE dReal OdeUniversalJoint::
258 get_param_bounce(
int axis)
const {
259 nassertr( _id != 0, 0 );
260 nassertr( 0 <= axis && axis <= 1, 0 );
262 return dJointGetUniversalParam(_id, dParamBounce);
263 }
else if ( axis == 1 ) {
264 return dJointGetUniversalParam(_id, dParamBounce2);
269 INLINE dReal OdeUniversalJoint::
270 get_param_CFM(
int axis)
const {
271 nassertr( _id != 0, 0 );
272 nassertr( 0 <= axis && axis <= 1, 0 );
274 return dJointGetUniversalParam(_id, dParamCFM);
275 }
else if ( axis == 1 ) {
276 return dJointGetUniversalParam(_id, dParamCFM2);
281 INLINE dReal OdeUniversalJoint::
282 get_param_stop_ERP(
int axis)
const {
283 nassertr( _id != 0, 0 );
284 nassertr( 0 <= axis && axis <= 1, 0 );
286 return dJointGetUniversalParam(_id, dParamStopERP);
287 }
else if ( axis == 1 ) {
288 return dJointGetUniversalParam(_id, dParamStopERP2);
293 INLINE dReal OdeUniversalJoint::
294 get_param_stop_CFM(
int axis)
const {
295 nassertr( _id != 0, 0 );
296 nassertr( 0 <= axis && axis <= 1, 0 );
298 return dJointGetUniversalParam(_id, dParamStopCFM);
299 }
else if ( axis == 1 ) {
300 return dJointGetUniversalParam(_id, dParamStopCFM2);