Skip to content

Commit f94da38

Browse files
committed
ODE: Added ODE_API from ODE 0.6
1 parent c79e4ed commit f94da38

File tree

16 files changed

+386
-365
lines changed

16 files changed

+386
-365
lines changed

Externals/ode/include/ode/collision.h

Lines changed: 63 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ extern "C" {
6262
* @param geom the geom to be destroyed.
6363
* @ingroup collide
6464
*/
65-
void dGeomDestroy (dGeomID geom);
65+
ODE_API void dGeomDestroy (dGeomID geom);
6666

6767

6868
/**
@@ -72,7 +72,7 @@ void dGeomDestroy (dGeomID geom);
7272
* @param data the data pointer to be stored
7373
* @ingroup collide
7474
*/
75-
void dGeomSetData (dGeomID geom, void* data);
75+
ODE_API void dGeomSetData (dGeomID geom, void* data);
7676

7777

7878
/**
@@ -81,7 +81,7 @@ void dGeomSetData (dGeomID geom, void* data);
8181
* @param geom the geom containing the data
8282
* @ingroup collide
8383
*/
84-
void *dGeomGetData (dGeomID geom);
84+
ODE_API void *dGeomGetData (dGeomID geom);
8585

8686

8787
/**
@@ -102,7 +102,7 @@ void *dGeomGetData (dGeomID geom);
102102
* @param body the body to attach to the geom
103103
* @ingroup collide
104104
*/
105-
void dGeomSetBody (dGeomID geom, dBodyID body);
105+
ODE_API void dGeomSetBody (dGeomID geom, dBodyID body);
106106

107107

108108
/**
@@ -111,7 +111,7 @@ void dGeomSetBody (dGeomID geom, dBodyID body);
111111
* @sa dGeomSetBody
112112
* @ingroup collide
113113
*/
114-
dBodyID dGeomGetBody (dGeomID geom);
114+
ODE_API dBodyID dGeomGetBody (dGeomID geom);
115115

116116

117117
/**
@@ -128,7 +128,7 @@ dBodyID dGeomGetBody (dGeomID geom);
128128
* @sa dBodySetPosition
129129
* @ingroup collide
130130
*/
131-
void dGeomSetPosition (dGeomID geom, dReal x, dReal y, dReal z);
131+
ODE_API void dGeomSetPosition (dGeomID geom, dReal x, dReal y, dReal z);
132132

133133

134134
/**
@@ -143,7 +143,7 @@ void dGeomSetPosition (dGeomID geom, dReal x, dReal y, dReal z);
143143
* @sa dBodySetRotation
144144
* @ingroup collide
145145
*/
146-
void dGeomSetRotation (dGeomID geom, const dMatrix3 R);
146+
ODE_API void dGeomSetRotation (dGeomID geom, const dMatrix3 R);
147147

148148

149149
/**
@@ -159,7 +159,7 @@ void dGeomSetRotation (dGeomID geom, const dMatrix3 R);
159159
* @sa dBodySetQuaternion
160160
* @ingroup collide
161161
*/
162-
void dGeomSetQuaternion (dGeomID geom, const dQuaternion Q);
162+
ODE_API void dGeomSetQuaternion (dGeomID geom, const dQuaternion Q);
163163

164164

165165
/**
@@ -178,7 +178,7 @@ void dGeomSetQuaternion (dGeomID geom, const dQuaternion Q);
178178
* @sa dBodyGetPosition
179179
* @ingroup collide
180180
*/
181-
const dReal * dGeomGetPosition (dGeomID geom);
181+
ODE_API const dReal * dGeomGetPosition (dGeomID geom);
182182

183183

184184
/**
@@ -197,7 +197,7 @@ const dReal * dGeomGetPosition (dGeomID geom);
197197
* @sa dBodyGetRotation
198198
* @ingroup collide
199199
*/
200-
const dReal * dGeomGetRotation (dGeomID geom);
200+
ODE_API const dReal * dGeomGetRotation (dGeomID geom);
201201

202202

203203
/**
@@ -213,7 +213,7 @@ const dReal * dGeomGetRotation (dGeomID geom);
213213
* @sa dBodyGetQuaternion
214214
* @ingroup collide
215215
*/
216-
void dGeomGetQuaternion (dGeomID geom, dQuaternion result);
216+
ODE_API void dGeomGetQuaternion (dGeomID geom, dQuaternion result);
217217

218218

219219
/**
@@ -232,7 +232,7 @@ void dGeomGetQuaternion (dGeomID geom, dQuaternion result);
232232
* @param aabb the returned bounding box
233233
* @ingroup collide
234234
*/
235-
void dGeomGetAABB (dGeomID geom, dReal aabb[6]);
235+
ODE_API void dGeomGetAABB (dGeomID geom, dReal aabb[6]);
236236

237237

238238
/**
@@ -241,7 +241,7 @@ void dGeomGetAABB (dGeomID geom, dReal aabb[6]);
241241
* @returns Non-zero if the geom is a space, zero otherwise.
242242
* @ingroup collide
243243
*/
244-
int dGeomIsSpace (dGeomID geom);
244+
ODE_API int dGeomIsSpace (dGeomID geom);
245245

246246

247247
/**
@@ -251,7 +251,7 @@ int dGeomIsSpace (dGeomID geom);
251251
* not contained by a space.
252252
* @ingroup collide
253253
*/
254-
dSpaceID dGeomGetSpace (dGeomID);
254+
ODE_API dSpaceID dGeomGetSpace (dGeomID);
255255

256256

257257
/**
@@ -278,7 +278,7 @@ dSpaceID dGeomGetSpace (dGeomID);
278278
* @returns The geom class ID.
279279
* @ingroup collide
280280
*/
281-
int dGeomGetClass (dGeomID geom);
281+
ODE_API int dGeomGetClass (dGeomID geom);
282282

283283

284284
/**
@@ -293,7 +293,7 @@ int dGeomGetClass (dGeomID geom);
293293
* @param bits the new bitfield value
294294
* @ingroup collide
295295
*/
296-
void dGeomSetCategoryBits (dGeomID geom, unsigned long bits);
296+
ODE_API void dGeomSetCategoryBits (dGeomID geom, unsigned long bits);
297297

298298

299299
/**
@@ -308,7 +308,7 @@ void dGeomSetCategoryBits (dGeomID geom, unsigned long bits);
308308
* @param bits the new bitfield value
309309
* @ingroup collide
310310
*/
311-
void dGeomSetCollideBits (dGeomID geom, unsigned long bits);
311+
ODE_API void dGeomSetCollideBits (dGeomID geom, unsigned long bits);
312312

313313

314314
/**
@@ -319,7 +319,7 @@ void dGeomSetCollideBits (dGeomID geom, unsigned long bits);
319319
* @sa dGeomSetCategoryBits
320320
* @ingroup collide
321321
*/
322-
unsigned long dGeomGetCategoryBits (dGeomID);
322+
ODE_API unsigned long dGeomGetCategoryBits (dGeomID);
323323

324324

325325
/**
@@ -330,7 +330,7 @@ unsigned long dGeomGetCategoryBits (dGeomID);
330330
* @sa dGeomSetCollideBits
331331
* @ingroup collide
332332
*/
333-
unsigned long dGeomGetCollideBits (dGeomID);
333+
ODE_API unsigned long dGeomGetCollideBits (dGeomID);
334334

335335

336336
/**
@@ -345,7 +345,7 @@ unsigned long dGeomGetCollideBits (dGeomID);
345345
* @sa dGeomIsEnabled
346346
* @ingroup collide
347347
*/
348-
void dGeomEnable (dGeomID geom);
348+
ODE_API void dGeomEnable (dGeomID geom);
349349

350350

351351
/**
@@ -360,7 +360,7 @@ void dGeomEnable (dGeomID geom);
360360
* @sa dGeomIsEnabled
361361
* @ingroup collide
362362
*/
363-
void dGeomDisable (dGeomID geom);
363+
ODE_API void dGeomDisable (dGeomID geom);
364364

365365

366366
/**
@@ -376,17 +376,17 @@ void dGeomDisable (dGeomID geom);
376376
* @sa dGeomIsEnabled
377377
* @ingroup collide
378378
*/
379-
int dGeomIsEnabled (dGeomID geom);
379+
ODE_API int dGeomIsEnabled (dGeomID geom);
380380

381381

382382

383383
/* ************************************************************************ */
384384
/* collision detection */
385385

386-
int dCollide (dGeomID o1, dGeomID o2, int flags, dContactGeom *contact,
386+
ODE_API int dCollide (dGeomID o1, dGeomID o2, int flags, dContactGeom *contact,
387387
int skip);
388-
void dSpaceCollide (dSpaceID space, void *data, dNearCallback *callback);
389-
void dSpaceCollide2 (dGeomID o1, dGeomID o2, void *data,
388+
ODE_API void dSpaceCollide (dSpaceID space, void *data, dNearCallback *callback);
389+
ODE_API void dSpaceCollide2 (dGeomID o1, dGeomID o2, void *data,
390390
dNearCallback *callback);
391391

392392
/* ************************************************************************ */
@@ -401,7 +401,7 @@ enum {
401401
enum {
402402
dSphereClass = 0,
403403
dBoxClass,
404-
dCCylinderClass,
404+
dCCylinderClass, // XXX: Cylinder was renamed to Capsule
405405
dCylinderClass,
406406
dPlaneClass,
407407
dRayClass,
@@ -420,66 +420,68 @@ enum {
420420
};
421421

422422

423-
dGeomID dCreateSphere (dSpaceID space, dReal radius);
424-
void dGeomSphereSetRadius (dGeomID sphere, dReal radius);
425-
dReal dGeomSphereGetRadius (dGeomID sphere);
426-
dReal dGeomSpherePointDepth (dGeomID sphere, dReal x, dReal y, dReal z);
423+
ODE_API dGeomID dCreateSphere (dSpaceID space, dReal radius);
424+
ODE_API void dGeomSphereSetRadius (dGeomID sphere, dReal radius);
425+
ODE_API dReal dGeomSphereGetRadius (dGeomID sphere);
426+
ODE_API dReal dGeomSpherePointDepth (dGeomID sphere, dReal x, dReal y, dReal z);
427427

428-
dGeomID dCreateBox (dSpaceID space, dReal lx, dReal ly, dReal lz);
429-
void dGeomBoxSetLengths (dGeomID box, dReal lx, dReal ly, dReal lz);
430-
void dGeomBoxGetLengths (dGeomID box, dVector3 result);
431-
dReal dGeomBoxPointDepth (dGeomID box, dReal x, dReal y, dReal z);
428+
ODE_API dGeomID dCreateBox (dSpaceID space, dReal lx, dReal ly, dReal lz);
429+
ODE_API void dGeomBoxSetLengths (dGeomID box, dReal lx, dReal ly, dReal lz);
430+
ODE_API void dGeomBoxGetLengths (dGeomID box, dVector3 result);
431+
ODE_API dReal dGeomBoxPointDepth (dGeomID box, dReal x, dReal y, dReal z);
432432

433-
dGeomID dCreatePlane (dSpaceID space, dReal a, dReal b, dReal c, dReal d);
434-
void dGeomPlaneSetParams (dGeomID plane, dReal a, dReal b, dReal c, dReal d);
435-
void dGeomPlaneGetParams (dGeomID plane, dVector4 result);
436-
dReal dGeomPlanePointDepth (dGeomID plane, dReal x, dReal y, dReal z);
433+
ODE_API dGeomID dCreatePlane (dSpaceID space, dReal a, dReal b, dReal c, dReal d);
434+
ODE_API void dGeomPlaneSetParams (dGeomID plane, dReal a, dReal b, dReal c, dReal d);
435+
ODE_API void dGeomPlaneGetParams (dGeomID plane, dVector4 result);
436+
ODE_API dReal dGeomPlanePointDepth (dGeomID plane, dReal x, dReal y, dReal z);
437437

438+
// XXX: Cylinder was renamed to Capsule
438439
dGeomID dCreateCCylinder (dSpaceID space, dReal radius, dReal length);
439440
void dGeomCCylinderSetParams (dGeomID ccylinder, dReal radius, dReal length);
440441
void dGeomCCylinderGetParams (dGeomID ccylinder, dReal *radius, dReal *length);
442+
441443
dReal dGeomCCylinderPointDepth (dGeomID ccylinder, dReal x, dReal y, dReal z);
442444

443-
dGeomID dCreateRay (dSpaceID space, dReal length);
444-
void dGeomRaySetLength (dGeomID ray, dReal length);
445-
dReal dGeomRayGetLength (dGeomID ray);
446-
void dGeomRaySet (dGeomID ray, dReal px, dReal py, dReal pz,
445+
ODE_API dGeomID dCreateRay (dSpaceID space, dReal length);
446+
ODE_API void dGeomRaySetLength (dGeomID ray, dReal length);
447+
ODE_API dReal dGeomRayGetLength (dGeomID ray);
448+
ODE_API void dGeomRaySet (dGeomID ray, dReal px, dReal py, dReal pz,
447449
dReal dx, dReal dy, dReal dz);
448-
void dGeomRayGet (dGeomID ray, dVector3 start, dVector3 dir);
450+
ODE_API void dGeomRayGet (dGeomID ray, dVector3 start, dVector3 dir);
449451

450452
/*
451453
* Set/get ray flags that influence ray collision detection.
452454
* These flags are currently only noticed by the trimesh collider, because
453455
* they can make a major differences there.
454456
*/
455-
void dGeomRaySetParams (dGeomID g, int FirstContact, int BackfaceCull);
456-
void dGeomRayGetParams (dGeomID g, int *FirstContact, int *BackfaceCull);
457-
void dGeomRaySetClosestHit (dGeomID g, int closestHit);
458-
int dGeomRayGetClosestHit (dGeomID g);
457+
ODE_API void dGeomRaySetParams (dGeomID g, int FirstContact, int BackfaceCull);
458+
ODE_API void dGeomRayGetParams (dGeomID g, int *FirstContact, int *BackfaceCull);
459+
ODE_API void dGeomRaySetClosestHit (dGeomID g, int closestHit);
460+
ODE_API int dGeomRayGetClosestHit (dGeomID g);
459461

460462
#include "collision_trimesh.h"
461463

462-
dGeomID dCreateGeomTransform (dSpaceID space);
463-
void dGeomTransformSetGeom (dGeomID g, dGeomID obj);
464-
dGeomID dGeomTransformGetGeom (dGeomID g);
465-
void dGeomTransformSetCleanup (dGeomID g, int mode);
466-
int dGeomTransformGetCleanup (dGeomID g);
467-
void dGeomTransformSetInfo (dGeomID g, int mode);
468-
int dGeomTransformGetInfo (dGeomID g);
464+
ODE_API dGeomID dCreateGeomTransform (dSpaceID space);
465+
ODE_API void dGeomTransformSetGeom (dGeomID g, dGeomID obj);
466+
ODE_API dGeomID dGeomTransformGetGeom (dGeomID g);
467+
ODE_API void dGeomTransformSetCleanup (dGeomID g, int mode);
468+
ODE_API int dGeomTransformGetCleanup (dGeomID g);
469+
ODE_API void dGeomTransformSetInfo (dGeomID g, int mode);
470+
ODE_API int dGeomTransformGetInfo (dGeomID g);
469471

470472
/* ************************************************************************ */
471473
/* utility functions */
472474

473-
void dClosestLineSegmentPoints (const dVector3 a1, const dVector3 a2,
475+
ODE_API void dClosestLineSegmentPoints (const dVector3 a1, const dVector3 a2,
474476
const dVector3 b1, const dVector3 b2,
475477
dVector3 cp1, dVector3 cp2);
476478

477-
int dBoxTouchesBox (const dVector3 _p1, const dMatrix3 R1,
479+
ODE_API int dBoxTouchesBox (const dVector3 _p1, const dMatrix3 R1,
478480
const dVector3 side1, const dVector3 _p2,
479481
const dMatrix3 R2, const dVector3 side2);
480482

481-
void dInfiniteAABB (dGeomID geom, dReal aabb[6]);
482-
void dCloseODE(void);
483+
ODE_API void dInfiniteAABB (dGeomID geom, dReal aabb[6]);
484+
ODE_API void dCloseODE(void);
483485

484486
/* ************************************************************************ */
485487
/* custom classes */
@@ -499,9 +501,9 @@ typedef struct dGeomClass {
499501
dGeomDtorFn *dtor;
500502
} dGeomClass;
501503

502-
int dCreateGeomClass (const dGeomClass *classptr);
503-
void * dGeomGetClassData (dGeomID);
504-
dGeomID dCreateGeom (int classnum);
504+
ODE_API int dCreateGeomClass (const dGeomClass *classptr);
505+
ODE_API void * dGeomGetClassData (dGeomID);
506+
ODE_API dGeomID dCreateGeom (int classnum);
505507

506508
/* ************************************************************************ */
507509

Externals/ode/include/ode/collision_space.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,24 @@ struct dContactGeom;
3434
typedef void dNearCallback (void *data, dGeomID o1, dGeomID o2);
3535

3636

37-
dSpaceID dSimpleSpaceCreate (dSpaceID space);
38-
dSpaceID dHashSpaceCreate (dSpaceID space);
39-
dSpaceID dQuadTreeSpaceCreate (dSpaceID space, dVector3 Center, dVector3 Extents, int Depth);
37+
ODE_API dSpaceID dSimpleSpaceCreate (dSpaceID space);
38+
ODE_API dSpaceID dHashSpaceCreate (dSpaceID space);
39+
ODE_API dSpaceID dQuadTreeSpaceCreate (dSpaceID space, dVector3 Center, dVector3 Extents, int Depth);
4040

41-
void dSpaceDestroy (dSpaceID);
41+
ODE_API void dSpaceDestroy (dSpaceID);
4242

43-
void dHashSpaceSetLevels (dSpaceID space, int minlevel, int maxlevel);
44-
void dHashSpaceGetLevels (dSpaceID space, int *minlevel, int *maxlevel);
43+
ODE_API void dHashSpaceSetLevels (dSpaceID space, int minlevel, int maxlevel);
44+
ODE_API void dHashSpaceGetLevels (dSpaceID space, int *minlevel, int *maxlevel);
4545

46-
void dSpaceSetCleanup (dSpaceID space, int mode);
47-
int dSpaceGetCleanup (dSpaceID space);
46+
ODE_API void dSpaceSetCleanup (dSpaceID space, int mode);
47+
ODE_API int dSpaceGetCleanup (dSpaceID space);
4848

49-
void dSpaceAdd (dSpaceID, dGeomID);
50-
void dSpaceRemove (dSpaceID, dGeomID);
51-
int dSpaceQuery (dSpaceID, dGeomID);
52-
void dSpaceClean (dSpaceID);
53-
int dSpaceGetNumGeoms (dSpaceID);
54-
dGeomID dSpaceGetGeom (dSpaceID, int i);
49+
ODE_API void dSpaceAdd (dSpaceID, dGeomID);
50+
ODE_API void dSpaceRemove (dSpaceID, dGeomID);
51+
ODE_API int dSpaceQuery (dSpaceID, dGeomID);
52+
ODE_API void dSpaceClean (dSpaceID);
53+
ODE_API int dSpaceGetNumGeoms (dSpaceID);
54+
ODE_API dGeomID dSpaceGetGeom (dSpaceID, int i);
5555

5656

5757
#ifdef __cplusplus

0 commit comments

Comments
 (0)