1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
|
#ifndef HONEY_ODE_H
#define HONEY_ODE_H
#include <lua.h>
#define ODE_METATABLES \
X("ode.WordID", ode_world_tname) \
X("ode.SpaceID", ode_space_tname) \
X("ode.BodyID", ode_body_tname) \
X("ode.GeomID", ode_geom_tname) \
X("ode.Mass", ode_mass_tname) \
X("ode.JointGroupID", ode_jointgroup_tname) \
X("ode.JointID", ode_joint_tname) \
X("ode.Contact", ode_contact_tname) \
X("ode.TriMeshDataID", ode_trimeshdata_tname) \
X("ode.HeightfieldDataID", ode_heightfielddata_tname) \
#define X(name, mt) extern const char *mt;
ODE_METATABLES
#undef X
void ode_push_world(lua_State *L, dWorldID w);
void ode_push_body(lua_State *L, dBodyID b);
void ode_push_joint(lua_State *L, dJointID j);
void ode_push_jointgroup(lua_State *L, dJointGroupID jg);
void ode_push_geom(lua_State *L, dGeomID g);
void ode_push_space(lua_State *L, dSpaceID s);
#define ODE_FUNCTIONS \
/* world */ \
X("WorldCreate", dWorldCreate_bind) \
X("WorldDestroy", dWorldDestroy_bind) \
X("WorldSetGravity", dWorldSetGravity_bind) \
X("WorldGetGravity", dWorldGetGravity_bind) \
X("WorldSetERP", dWorldSetERP_bind) \
X("WorldGetERP", dWorldGetERP_bind) \
X("WorldSetCFM", dWorldSetCFM_bind) \
X("WorldGetCFM", dWorldGetCFM_bind) \
X("WorldSetAutoDisableFlag", dWorldSetAutoDisableFlag_bind) \
X("WorldGetAutoDisableFlag", dWorldGetAutoDisableFlag_bind) \
X("WorldSetAutoDisableLinearThreshold", dWorldSetAutoDisableLinearThreshold_bind) \
X("WorldGetAutoDisableLinearThreshold", dWorldGetAutoDisableLinearThreshold_bind) \
X("WorldSetAutoDisableAngularThreshold", dWorldSetAutoDisableAngularThreshold_bind) \
X("WorldGetAutoDisableAngularThreshold", dWorldGetAutoDisableAngularThreshold_bind) \
X("WorldSetAutoDisableSteps", dWorldSetAutoDisableSteps_bind) \
X("WorldGetAutoDisableSteps", dWorldGetAutoDisableSteps_bind) \
X("WorldSetAutoDisableTime", dWorldSetAutoDisableTime_bind) \
X("WorldGetAutoDisableTime", dWorldGetAutoDisableTime_bind) \
X("WorldImpulseToForce", dWorldImpulseToForce_bind) \
X("WorldStep", dWorldStep_bind) \
X("WorldQuickStep", dWorldQuickStep_bind) \
X("WorldSetQuickStepNumIterations", dWorldSetQuickStepNumIterations_bind) \
X("WorldGetQuickStepNumIterations", dWorldGetQuickStepNumIterations_bind) \
X("WorldSetQuickStepW", dWorldSetQuickStepW_bind) \
X("WorldGetQuickStepW", dWorldGetQuickStepW_bind) \
\
/* body */ \
X("BodyCreate", dBodyCreate_bind) \
X("BodyDestroy", dBodyDestroy_bind) \
X("BodySetPosition", dBodySetPosition_bind) \
X("BodySetRotation", dBodySetRotation_bind) \
X("BodySetQuaternion", dBodySetQuaternion_bind) \
X("BodySetLinearVel", dBodySetLinearVel_bind) \
X("BodySetAngularVel", dBodySetAngularVel_bind) \
X("BodyGetPosition", dBodyGetPosition_bind) \
X("BodyGetRotation", dBodyGetRotation_bind) \
X("BodyGetQuaternion", dBodyGetQuaternion_bind) \
X("BodyGetLinearVel", dBodyGetLinearVel_bind) \
X("BodyGetAngularVel", dBodyGetAngularVel_bind) \
X("BodySetMass", dBodySetMass_bind) \
X("BodyGetMass", dBodyGetMass_bind) \
X("BodyAddForce", dBodyAddForce_bind) \
X("BodyAddTorque", dBodyAddTorque_bind) \
X("BodyAddRelForce", dBodyAddRelForce_bind) \
X("BodyAddRelTorque", dBodyAddRelTorque_bind) \
X("BodyAddForceAtPos", dBodyAddForceAtPos_bind) \
X("BodyAddForceAtRelPos", dBodyAddForceAtRelPos_bind) \
X("BodyAddRelForceAtPos", dBodyAddRelForceAtPos_bind) \
X("BodyAddRelForceAtRelPos", dBodyAddRelForceAtRelPos_bind) \
X("BodyGetForce", dBodyGetForce_bind) \
X("BodyGetTorque", dBodyGetTorque_bind) \
X("BodySetForce", dBodySetForce_bind) \
X("BodySetTorque", dBodySetTorque_bind) \
X("BodySetDynamic", dBodySetDynamic_bind) \
X("BodySetKinematic", dBodySetKinematic_bind) \
X("BodyIsKinematic", dBodyIsKinematic_bind) \
X("BodyGetRelPointPos", dBodyGetRelPointPos_bind) \
X("BodyGetRelPointVel", dBodyGetRelPointVel_bind) \
X("BodyGetPointVel", dBodyGetPointVel_bind) \
X("BodyGetPosRelPoint", dBodyGetPosRelPoint_bind) \
X("BodyVectorToWorld", dBodyVectorToWorld_bind) \
X("BodyVectorFromWorld", dBodyVectorFromWorld_bind) \
X("BodyEnable", dBodyEnable_bind) \
X("BodyDisable", dBodyDisable_bind) \
X("BodyIsEnabled", dBodyIsEnabled_bind) \
X("BodySetAutoDisableFlag", dBodySetAutoDisableFlag_bind) \
X("BodyGetAutoDisableFlag", dBodyGetAutoDisableFlag_bind) \
X("BodySetAutoDisableLinearThreshold", dBodySetAutoDisableLinearThreshold_bind) \
X("BodyGetAutoDisableLinearThreshold", dBodyGetAutoDisableLinearThreshold_bind) \
X("BodySetAutoDisableAngularThreshold", dBodySetAutoDisableAngularThreshold_bind) \
X("BodyGetAutoDisableAngularThreshold", dBodyGetAutoDisableAngularThreshold_bind) \
X("BodySetAutoDisableSteps", dBodySetAutoDisableSteps_bind) \
X("BodyGetAutoDisableSteps", dBodyGetAutoDisableSteps_bind) \
X("BodySetAutoDisableTime", dBodySetAutoDisableTime_bind) \
X("BodyGetAutoDisableTime", dBodyGetAutoDisableTime_bind) \
X("BodySetAutoDisableAverageSamplesCount", dBodySetAutoDisableAverageSamplesCount_bind) \
X("BodyGetAutoDisableAverageSamplesCount", dBodyGetAutoDisableAverageSamplesCount_bind) \
X("BodySetAutoDisableDefaults", dBodySetAutoDisableDefaults_bind) \
X("BodySetMovedCallback", dBodySetMovedCallback_bind) \
X("BodyGetLinearDamping", dBodyGetLinearDamping_bind) \
X("BodyGetAngularDamping", dBodyGetAngularDamping_bind) \
X("BodySetLinearDamping", dBodySetLinearDamping_bind) \
X("BodySetAngularDamping", dBodySetAngularDamping_bind) \
X("BodySetDamping", dBodySetDamping_bind) \
X("BodyGetLinearDampingThreshold", dBodyGetLinearDampingThreshold_bind) \
X("BodyGetAngularDampingThreshold", dBodyGetAngularDampingThreshold_bind) \
X("BodySetLinearDampingThreshold", dBodySetLinearDampingThreshold_bind) \
X("BodySetAngularDampingThreshold", dBodySetAngularDampingThreshold_bind) \
X("BodySetDampingDefaults", dBodySetDampingDefaults_bind) \
X("BodyGetMaxAngularSpeed", dBodyGetMaxAngularSpeed_bind) \
X("BodySetMaxAngularSpeed", dBodySetMaxAngularSpeed_bind) \
X("BodySetFiniteRotationMode", dBodySetFiniteRotationMode_bind) \
X("BodyGetFiniteRotationMode", dBodyGetFiniteRotationMode_bind) \
X("BodySetFiniteRotationAxis", dBodySetFiniteRotationAxis_bind) \
X("BodyGetFiniteRotationAxis", dBodyGetFiniteRotationAxis_bind) \
X("BodyGetNumJoints", dBodyGetNumJoints_bind) \
X("BodyGetJoint", dBodyGetJoint_bind) \
X("BodyGetWorld", dBodyGetWorld_bind) \
X("BodySetGravityMode", dBodySetGravityMode_bind) \
X("BodyGetGravityMode", dBodyGetGravityMode_bind) \
X("BodyGetFirstGeom", dBodyGetFirstGeom_bind) \
X("BodyGetNextGeom", dBodyGetNextGeom_bind) \
\
/* joints */ \
X("JointCreateBall", dJointCreateBall_bind) \
X("JointCreateHinge", dJointCreateHinge_bind) \
X("JointCreateSlider", dJointCreateSlider_bind) \
X("JointCreateContact", dJointCreateContact_bind) \
X("JointCreateUniversal", dJointCreateUniversal_bind) \
X("JointCreateHinge2", dJointCreateHinge2_bind) \
X("JointCreatePR", dJointCreatePR_bind) \
X("JointCreatePU", dJointCreatePU_bind) \
X("JointCreatePiston", dJointCreatePiston_bind) \
X("JointCreateFixed", dJointCreateFixed_bind) \
X("JointCreateAMotor", dJointCreateAMotor_bind) \
X("JointCreateLMotor", dJointCreateLMotor_bind) \
X("JointCreatePlane2D", dJointCreatePlane2D_bind) \
X("JointCreateDBall", dJointCreateDBall_bind) \
X("JointCreateDHinge", dJointCreateDHinge_bind) \
X("JointCreateTransmission", dJointCreateTransmission_bind) \
X("JointDestroy", dJointDestroy_bind) \
X("JointGroupCreate", dJointGroupCreate_bind) \
X("JointGroupDestroy", dJointGroupDestroy_bind) \
X("JointGroupEmpty", dJointGroupEmpty_bind) \
X("JointAttach", dJointAttach_bind) \
X("JointEnable", dJointEnable_bind) \
X("JointDisable", dJointDisable_bind) \
X("JointIsEnabled", dJointIsEnabled_bind) \
X("JointGetType", dJointGetType_bind) \
X("JointGetBody", dJointGetBody_bind) \
X("AreConnected", dAreConnected_bind) \
X("AreConnectedExcluding", dAreConnectedExcluding_bind) \
X("JointSetBallAnchor", dJointSetBallAnchor_bind) \
X("JointGetBallAnchor", dJointGetBallAnchor_bind) \
X("JointGetBallAnchor2", dJointGetBallAnchor2_bind) \
X("JointSetHingeAnchor", dJointSetHingeAnchor_bind) \
X("JointSetHingeAxis", dJointSetHingeAxis_bind) \
X("JointGetHingeAnchor", dJointGetHingeAnchor_bind) \
X("JointGetHingeAnchor2", dJointGetHingeAnchor2_bind) \
X("JointGetHingeAxis", dJointGetHingeAxis_bind) \
X("JointGetHingeAngle", dJointGetHingeAngle_bind) \
X("JointGetHingeAngleRate", dJointGetHingeAngleRate_bind) \
X("JointSetSliderAxis", dJointSetSliderAxis_bind) \
X("JointGetSliderAxis", dJointGetSliderAxis_bind) \
X("JointGetSliderPosition", dJointGetSliderPosition_bind) \
X("JointGetSliderPositionRate", dJointGetSliderPositionRate_bind) \
X("JointSetUniversalAnchor", dJointSetUniversalAnchor_bind) \
X("JointSetUniversalAxis1", dJointSetUniversalAxis1_bind) \
X("JointSetUniversalAxis2", dJointSetUniversalAxis2_bind) \
X("JointGetUniversalAnchor", dJointGetUniversalAnchor_bind) \
X("JointGetUniversalAnchor2", dJointGetUniversalAnchor2_bind) \
X("JointGetUniversalAxis1", dJointGetUniversalAxis1_bind) \
X("JointGetUniversalAxis2", dJointGetUniversalAxis2_bind) \
X("JointGetUniversalAngle1", dJointGetUniversalAngle1_bind) \
X("JointGetUniversalAngle2", dJointGetUniversalAngle2_bind) \
X("JointGetUniversalAngles", dJointGetUniversalAngles_bind) \
X("JointGetUniversalAngle1Rate", dJointGetUniversalAngle1Rate_bind) \
X("JointGetUniversalAngle2Rate", dJointGetUniversalAngle2Rate_bind) \
X("JointSetHinge2Anchor", dJointSetHinge2Anchor_bind) \
X("JointSetHinge2Axis1", dJointSetHinge2Axis1_bind) \
X("JointSetHinge2Axis2", dJointSetHinge2Axis2_bind) \
X("JointGetHinge2Anchor", dJointGetHinge2Anchor_bind) \
X("JointGetHinge2Anchor2", dJointGetHinge2Anchor2_bind) \
X("JointGetHinge2Axis1", dJointGetHinge2Axis1_bind) \
X("JointGetHinge2Axis2", dJointGetHinge2Axis2_bind) \
X("JointGetHinge2Angle1", dJointGetHinge2Angle1_bind) \
X("JointGetHinge2Angle1Rate", dJointGetHinge2Angle1Rate_bind) \
X("JointGetHinge2Angle2Rate", dJointGetHinge2Angle2Rate_bind) \
X("JointSetPRAxis1", dJointSetPRAxis1_bind) \
X("JointGetPRAxis1", dJointGetPRAxis1_bind) \
X("JointSetPRAxis2", dJointSetPRAxis2_bind) \
X("JointGetPRAxis2", dJointGetPRAxis2_bind) \
X("JointSetPRAnchor", dJointSetPRAnchor_bind) \
X("JointGetPRAnchor", dJointGetPRAnchor_bind) \
X("JointGetPRPosition", dJointGetPRPosition_bind) \
X("JointGetPUPosition", dJointGetPUPosition_bind) \
X("JointGetPUPositionRate", dJointGetPUPositionRate_bind) \
X("JointSetPUAnchor", dJointSetPUAnchor_bind) \
X("JointGetPUAnchor", dJointGetPUAnchor_bind) \
X("JointSetPUAnchorDelta", dJointSetPUAnchorDelta_bind) \
X("JointSetPUAxis1", dJointSetPUAxis1_bind) \
X("JointGetPUAxis1", dJointGetPUAxis1_bind) \
X("JointSetPUAxis2", dJointSetPUAxis2_bind) \
X("JointGetPUAxis2", dJointGetPUAxis2_bind) \
X("JointSetPUAxis3", dJointSetPUAxis3_bind) \
X("JointGetPUAxis3", dJointGetPUAxis3_bind) \
X("JointSetPUAxisP", dJointSetPUAxisP_bind) \
X("JointGetPUAxisP", dJointGetPUAxisP_bind) \
X("JointGetPUAngles", dJointGetPUAngles_bind) \
X("JointGetPUAngle1", dJointGetPUAngle1_bind) \
X("JointGetPUAngle2", dJointGetPUAngle2_bind) \
X("JointGetPUAngle1Rate", dJointGetPUAngle1Rate_bind) \
X("JointGetPUAngle2Rate", dJointGetPUAngle2Rate_bind) \
X("JointSetPistonAnchor", dJointSetPistonAnchor_bind) \
X("JointGetPistonAnchor", dJointGetPistonAnchor_bind) \
X("JointGetPistonAnchor2", dJointGetPistonAnchor2_bind) \
X("JointSetPistonAxis", dJointSetPistonAxis_bind) \
X("JointGetPistonAxis", dJointGetPistonAxis_bind) \
X("JointSetPistonAxisDelta", dJointSetPistonAxisDelta_bind) \
X("JointGetPistonPosition", dJointGetPistonPosition_bind) \
X("JointGetPistonPositionRate", dJointGetPistonPositionRate_bind) \
X("JointGetPistonAngle", dJointGetPistonAngle_bind) \
X("JointGetPistonAngleRate", dJointGetPistonAngleRate_bind) \
X("JointAddPistonForce", dJointAddPistonForce_bind) \
X("JointSetFixed", dJointSetFixed_bind) \
X("JointSetAMotorMode", dJointSetAMotorMode_bind) \
X("JointGetAMotorMode", dJointGetAMotorMode_bind) \
X("JointSetAMotorNumAxes", dJointSetAMotorNumAxes_bind) \
X("JointGetAMotorNumAxes", dJointGetAMotorNumAxes_bind) \
X("JointSetAMotorAxis", dJointSetAMotorAxis_bind) \
X("JointGetAMotorAxis", dJointGetAMotorAxis_bind) \
X("JointGetAMotorAxisRel", dJointGetAMotorAxisRel_bind) \
X("JointSetAMotorAngle", dJointSetAMotorAngle_bind) \
X("JointGetAMotorAngle", dJointGetAMotorAngle_bind) \
X("JointGetAMotorAngleRate", dJointGetAMotorAngleRate_bind) \
X("JointSetLMotorNumAxes", dJointSetLMotorNumAxes_bind) \
X("JointGetLMotorNumAxes", dJointGetLMotorNumAxes_bind) \
X("JointSetLMotorAxis", dJointSetLMotorAxis_bind) \
X("JointGetLMotorAxis", dJointGetLMotorAxis_bind) \
X("JointSetDBallAnchor1", dJointSetDBallAnchor1_bind) \
X("JointSetDBallAnchor2", dJointSetDBallAnchor2_bind) \
X("JointGetDBallAnchor1", dJointGetDBallAnchor1_bind) \
X("JointGetDBallAnchor2", dJointGetDBallAnchor2_bind) \
X("JointGetDBallDistance", dJointGetDBallDistance_bind) \
X("JointSetDBallDistance", dJointSetDBallDistance_bind) \
X("JointSetDHingeAxis", dJointSetDHingeAxis_bind) \
X("JointGetDHingeAxis", dJointGetDHingeAxis_bind) \
X("JointSetDHingeAnchor1", dJointSetDHingeAnchor1_bind) \
X("JointSetDHingeAnchor2", dJointSetDHingeAnchor2_bind) \
X("JointGetDHingeAnchor1", dJointGetDHingeAnchor1_bind) \
X("JointGetDHingeAnchor2", dJointGetDHingeAnchor2_bind) \
X("JointGetDHingeDistance", dJointGetDHingeDistance_bind) \
X("JointSetTransmissionMode", dJointSetTransmissionMode_bind) \
X("JointGetTransmissionMode", dJointGetTransmissionMode_bind) \
X("JointGetTransmissionContactPoint1", dJointGetTransmissionContactPoint1_bind) \
X("JointGetTransmissionContactPoint2", dJointGetTransmissionContactPoint2_bind) \
X("JointSetTransmissionAxis1", dJointSetTransmissionAxis1_bind) \
X("JointSetTransmissionAxis2", dJointSetTransmissionAxis2_bind) \
X("JointGetTransmissionAxis1", dJointGetTransmissionAxis1_bind) \
X("JointGetTransmissionAxis2", dJointGetTransmissionAxis2_bind) \
X("JointSetTransmissionAnchor1", dJointSetTransmissionAnchor1_bind) \
X("JointSetTransmissionAnchor2", dJointSetTransmissionAnchor2_bind) \
X("JointGetTransmissionAnchor1", dJointGetTransmissionAnchor1_bind) \
X("JointGetTransmissionAnchor2", dJointGetTransmissionAnchor2_bind) \
X("JointSetTransmissionRatio", dJointSetTransmissionRatio_bind) \
X("JointGetTransmissionRatio", dJointGetTransmissionRatio_bind) \
X("JointSetTransmissionAxis", dJointSetTransmissionAxis_bind) \
X("JointGetTransmissionAxis", dJointGetTransmissionAxis_bind) \
X("JointGetTransmissionAngle1", dJointGetTransmissionAngle1_bind) \
X("JointGetTransmissionAngle2", dJointGetTransmissionAngle2_bind) \
X("JointGetTransmissionRadius1", dJointGetTransmissionRadius1_bind) \
X("JointGetTransmissionRadius2", dJointGetTransmissionRadius2_bind) \
X("JointSetTransmissionRadius1", dJointSetTransmissionRadius1_bind) \
X("JointSetTransmissionRadius2", dJointSetTransmissionRadius2_bind) \
X("JointSetTransmissionBacklash", dJointSetTransmissionBacklash_bind) \
X("JointGetTransmissionBacklash", dJointGetTransmissionBacklash_bind) \
X("JointSetHingeParam", dJointSetHingeParam_bind) \
X("JointSetSliderParam", dJointSetSliderParam_bind) \
X("JointSetHinge2Param", dJointSetHinge2Param_bind) \
X("JointSetUniversalParam", dJointSetUniversalParam_bind) \
X("JointSetAMotorParam", dJointSetAMotorParam_bind) \
X("JointSetLMotorParam", dJointSetLMotorParam_bind) \
X("JointSetPRParam", dJointSetPRParam_bind) \
X("JointSetPUParam", dJointSetPUParam_bind) \
X("JointSetPistonParam", dJointSetPistonParam_bind) \
X("JointSetDBallParam", dJointSetDBallParam_bind) \
X("JointSetDHingeParam", dJointSetDHingeParam_bind) \
X("JointSetTransmissionParam", dJointSetTransmissionParam_bind) \
X("JointGetHingeParam", dJointGetHingeParam_bind) \
X("JointGetSliderParam", dJointGetSliderParam_bind) \
X("JointGetHinge2Param", dJointGetHinge2Param_bind) \
X("JointGetUniversalParam", dJointGetUniversalParam_bind) \
X("JointGetAMotorParam", dJointGetAMotorParam_bind) \
X("JointGetLMotorParam", dJointGetLMotorParam_bind) \
X("JointGetPRParam", dJointGetPRParam_bind) \
X("JointGetPUParam", dJointGetPUParam_bind) \
X("JointGetPistonParam", dJointGetPistonParam_bind) \
X("JointGetDBallParam", dJointGetDBallParam_bind) \
X("JointGetDHingeParam", dJointGetDHingeParam_bind) \
X("JointGetTransmissionParam", dJointGetTransmissionParam_bind) \
X("JointAddHingeTorque", dJointAddHingeTorque_bind) \
X("JointAddUniversalTorques", dJointAddUniversalTorques_bind) \
X("JointAddSliderForce", dJointAddSliderForce_bind) \
X("JointAddHinge2Torques", dJointAddHinge2Torques_bind) \
X("JointAddAMotorTorques", dJointAddAMotorTorques_bind) \
\
/* geom */ \
X("GeomDestroy", dGeomDestroy_bind) \
X("GeomSetBody", dGeomSetBody_bind) \
X("GeomGetBody", dGeomGetBody_bind) \
X("GeomSetPosition", dGeomSetPosition_bind) \
X("GeomSetRotation", dGeomSetRotation_bind) \
X("GeomSetQuaternion", dGeomSetQuaternion_bind) \
X("GeomGetPosition", dGeomGetPosition_bind) \
X("GeomGetRotation", dGeomGetRotation_bind) \
X("GeomGetQuaternion", dGeomGetQuaternion_bind) \
X("GeomSetOffsetPosition", dGeomSetOffsetPosition_bind) \
X("GeomSetOffsetRotation", dGeomSetOffsetRotation_bind) \
X("GeomSetOffsetQuaternion", dGeomSetOffsetQuaternion_bind) \
X("GeomSetOffsetWorldPosition", dGeomSetOffsetWorldPosition_bind) \
X("GeomSetOffsetWorldRotation", dGeomSetOffsetWorldRotation_bind) \
X("GeomSetOffsetWorldQuaternion", dGeomSetOffsetWorldQuaternion_bind) \
X("GeomGetOffsetPosition", dGeomGetOffsetPosition_bind) \
X("GeomGetOffsetRotation", dGeomGetOffsetRotation_bind) \
X("GeomGetOffsetQuaternion", dGeomGetOffsetQuaternion_bind) \
X("GeomClearOffset", dGeomClearOffset_bind) \
X("GeomGetAABB", dGeomGetAABB_bind) \
X("GeomIsSpace", dGeomIsSpace_bind) \
X("GeomGetSpace", dGeomGetSpace_bind) \
X("GeomGetClass", dGeomGetClass_bind) \
X("GeomSetCategoryBits", dGeomSetCategoryBits_bind) \
X("GeomSetCollideBits", dGeomSetCollideBits_bind) \
X("GeomGetCategoryBits", dGeomGetCategoryBits_bind) \
X("GeomGetCollideBits", dGeomGetCollideBits_bind) \
X("GeomEnable", dGeomEnable_bind) \
X("GeomDisable", dGeomDisable_bind) \
X("GeomIsEnabled", dGeomIsEnabled_bind) \
X("Collide", dCollide_bind) \
X("SpaceCollide", dSpaceCollide_bind) \
X("SpaceCollide2", dSpaceCollide2_bind) \
X("SimpleSpaceCreate", dSimpleSpaceCreate_bind) \
X("HashSpaceCreate", dHashSpaceCreate_bind) \
X("QuadTreeSpaceCreate", dQuadTreeSpaceCreate_bind) \
X("SpaceDestroy", dSpaceDestroy_bind) \
X("HashSpaceSetLevels", dHashSpaceSetLevels_bind) \
X("HashSpaceGetLevels", dHashSpaceGetLevels_bind) \
X("SpaceSetCleanup", dSpaceSetCleanup_bind) \
X("SpaceGetCleanup", dSpaceGetCleanup_bind) \
X("SpaceSetSublevel", dSpaceSetSublevel_bind) \
X("SpaceGetSublevel", dSpaceGetSublevel_bind) \
X("SpaceAdd", dSpaceAdd_bind) \
X("SpaceRemove", dSpaceRemove_bind) \
X("SpaceQuery", dSpaceQuery_bind) \
X("SpaceGetNumGeoms", dSpaceGetNumGeoms_bind) \
X("SpaceGetGeom", dSpaceGetGeom_bind) \
X("CreateSphere", dCreateSphere_bind) \
X("GeomSphereSetRadius", dGeomSphereSetRadius_bind) \
X("GeomSphereGetRadius", dGeomSphereGetRadius_bind) \
X("GeomSpherePointDepth", dGeomSpherePointDepth_bind) \
X("CreateBox", dCreateBox_bind) \
X("GeomBoxSetLengths", dGeomBoxSetLengths_bind) \
X("GeomBoxGetLengths", dGeomBoxGetLengths_bind) \
X("GeomBoxPointDepth", dGeomBoxPointDepth_bind) \
X("CreatePlane", dCreatePlane_bind) \
X("GeomPlaneSetParams", dGeomPlaneSetParams_bind) \
X("GeomPlaneGetParams", dGeomPlaneGetParams_bind) \
X("GeomPlanePointDepth", dGeomPlanePointDepth_bind) \
X("CreateCapsule", dCreateCapsule_bind) \
X("GeomCapsuleSetParams", dGeomCapsuleSetParams_bind) \
X("GeomCapsuleGetParams", dGeomCapsuleGetParams_bind) \
X("GeomCapsulePointDepth", dGeomCapsulePointDepth_bind) \
X("CreateCylinder", dCreateCylinder_bind) \
X("GeomCylinderSetParams", dGeomCylinderSetParams_bind) \
X("GeomCylinderGetParams", dGeomCylinderGetParams_bind) \
X("CreateRay", dCreateRay_bind) \
X("GeomRaySetLength", dGeomRaySetLength_bind) \
X("GeomRayGetLength", dGeomRayGetLength_bind) \
X("GeomRaySet", dGeomRaySet_bind) \
X("GeomRayGet", dGeomRayGet_bind) \
X("GeomRaySetClosestHit", dGeomRaySetClosestHit_bind) \
X("GeomRayGetClosestHit", dGeomRayGetClosestHit_bind) \
X("dGeomRaySetFirstContact", dGeomRaySetFirstContact_bind) \
X("dGeomRayGetFirstContact", dGeomRayGetFirstContact_bind) \
X("dGeomRaySetBackfaceCull", dGeomRaySetBackfaceCull_bind) \
X("dGeomRayGetBackfaceCull", dGeomRayGetBackfaceCull_bind) \
X("GeomTriMeshDataCreate", dGeomTriMeshDataCreate_bind) \
X("GeomTriMeshDataDestroy", dGeomTriMeshDataDestroy_bind) \
X("GeomTriMeshDataBuild", dGeomTriMeshDataBuild_bind) \
X("CreateTriMesh", dCreateTriMesh_bind) \
X("GeomTriMeshSetData", dGeomTriMeshSetData_bind) \
X("GeomTriMeshClearTCCache", dGeomTriMeshClearTCCache_bind) \
X("GeomTriMeshEnableTC", dGeomTriMeshEnableTC_bind) \
X("GeomTriMeshIsTCEnabled", dGeomTriMeshIsTCEnabled_bind) \
X("GeomHeightfieldDataCreate", dGeomHeightfieldDataCreate_bind) \
X("GeomHeightfieldDataDestroy", dGeomHeightfieldDataDestroy_bind) \
X("GeomHeightfieldDataBuildDouble", dGeomHeightfieldDataBuildDouble_bind) \
X("GeomHeightfieldDataBuildCallback", dGeomHeightfieldDataBuildCallback_bind) \
X("GeomHeightfieldDataSetBounds", dGeomHeightfieldDataSetBounds_bind) \
X("CreateHeightfield", dCreateHeightfield_bind) \
X("GeomHeightfieldSetHeightfieldData", dGeomHeightfieldSetHeightfieldData_bind) \
X("GeomHeightfieldGetHeightfieldData", dGeomHeightfieldGetHeightfieldData_bind) \
X("CreateContact", CreateContact_bind) \
X("ContactSetGeom", ContactSetGeom_bind) \
/* mass */ \
X("MassCreate", MassCreate_bind) \
X("MassSetZero", dMassSetZero_bind) \
X("MassSetParameters", dMassSetParameters_bind) \
X("MassSetSphere", dMassSetSphere_bind) \
X("MassSetSphereTotal", dMassSetSphereTotal_bind) \
X("MassSetCapsule", dMassSetCapsule_bind) \
X("MassSetCapsuleTotal", dMassSetCapsuleTotal_bind) \
X("MassSetCylinder", dMassSetCylinder_bind) \
X("MassSetCylinderTotal", dMassSetCylinderTotal_bind) \
X("MassSetBox", dMassSetBox_bind) \
X("MassSetBoxTotal", dMassSetBoxTotal_bind) \
X("MassSetTrimesh", dMassSetTrimesh_bind) \
X("MassAdjust", dMassAdjust_bind) \
X("MassTranslate", dMassTranslate_bind) \
X("MassRotate", dMassRotate_bind) \
X("MassAdd", dMassAdd_bind) \
#define X(name, func) int func(lua_State *L);
ODE_FUNCTIONS
#undef X
#define ODE_ENUMS \
/* contact modes */ \
X("ContactMu2", dContactMu2) \
X("ContactFDir1", dContactFDir1) \
X("ContactBounce", dContactBounce) \
X("ContactSoftERP", dContactSoftERP) \
X("ContactSoftCFM", dContactSoftCFM) \
X("ContactMotion1", dContactMotion1) \
X("ContactMotion2", dContactMotion2) \
X("ContactMotionN", dContactMotionN) \
X("ContactSlip1", dContactSlip1) \
X("ContactSlip2", dContactSlip2) \
X("ContactRolling", dContactRolling) \
X("ContactApprox1_1", dContactApprox1_1) \
X("ContactApprox1_2", dContactApprox1_2) \
X("ContactApprox1_N", dContactApprox1_N) \
X("ContactApprox1", dContactApprox1) \
#endif
|