+
+
+//============================================================================
+// physics engine support
+//============================================================================
+
+#ifndef ODE_STATIC
+# define ODE_DYNAMIC 1
+#endif
+
+#if defined(ODE_STATIC) || defined(ODE_DYNAMIC)
+#define USEODE 1
+#endif
+
+// recent ODE trunk has dWorldStepFast1 removed
+//#define ODE_USE_STEPFAST
+
+#ifdef USEODE
+cvar_t physics_ode_quadtree_depth = {0, "physics_ode_quadtree_depth","5", "desired subdivision level of quadtree culling space"};
+cvar_t physics_ode_contactsurfacelayer = {0, "physics_ode_contactsurfacelayer","1", "allows objects to overlap this many units to reduce jitter"};
+cvar_t physics_ode_worldstep = {0, "physics_ode_worldstep","2", "step function to use, 0 - dWorldStep, 1 - dWorldStepFast1, 2 - dWorldQuickStep"};
+cvar_t physics_ode_worldstep_iterations = {0, "physics_ode_worldstep_iterations", "20", "parameter to dWorldQuickStep and dWorldStepFast1"};
+cvar_t physics_ode_contact_mu = {0, "physics_ode_contact_mu", "1", "contact solver mu parameter - friction pyramid approximation 1 (see ODE User Guide)"};
+cvar_t physics_ode_contact_erp = {0, "physics_ode_contact_erp", "0.96", "contact solver erp parameter - Error Restitution Percent (see ODE User Guide)"};
+cvar_t physics_ode_contact_cfm = {0, "physics_ode_contact_cfm", "0", "contact solver cfm parameter - Constraint Force Mixing (see ODE User Guide)"};
+cvar_t physics_ode_world_erp = {0, "physics_ode_world_erp", "-1", "world solver erp parameter - Error Restitution Percent (see ODE User Guide); use defaults when set to -1"};
+cvar_t physics_ode_world_cfm = {0, "physics_ode_world_cfm", "-1", "world solver cfm parameter - Constraint Force Mixing (see ODE User Guide); not touched when -1"};
+cvar_t physics_ode_world_damping = {0, "physics_ode_world_damping", "1", "enabled damping scale (see ODE User Guide), this scales all damping values, be aware that behavior depends of step type"};
+cvar_t physics_ode_world_damping_linear = {0, "physics_ode_world_damping_linear", "0.005", "world linear damping scale (see ODE User Guide); use defaults when set to -1"};
+cvar_t physics_ode_world_damping_linear_threshold = {0, "physics_ode_world_damping_linear_threshold", "0.01", "world linear damping threshold (see ODE User Guide); use defaults when set to -1"};
+cvar_t physics_ode_world_damping_angular = {0, "physics_ode_world_damping_angular", "0.005", "world angular damping scale (see ODE User Guide); use defaults when set to -1"};
+cvar_t physics_ode_world_damping_angular_threshold = {0, "physics_ode_world_damping_angular_threshold", "0.01", "world angular damping threshold (see ODE User Guide); use defaults when set to -1"};
+cvar_t physics_ode_iterationsperframe = {0, "physics_ode_iterationsperframe", "1", "divisor for time step, runs multiple physics steps per frame"};
+cvar_t physics_ode_constantstep = {0, "physics_ode_constantstep", "1", "use constant step (sys_ticrate value) instead of variable step which tends to increase stability"};
+cvar_t physics_ode_autodisable = {0, "physics_ode_autodisable", "1", "automatic disabling of objects which dont move for long period of time, makes object stacking a lot faster"};
+cvar_t physics_ode_autodisable_steps = {0, "physics_ode_autodisable_steps", "10", "how many steps object should be dormant to be autodisabled"};
+cvar_t physics_ode_autodisable_time = {0, "physics_ode_autodisable_time", "0", "how many seconds object should be dormant to be autodisabled"};
+cvar_t physics_ode_autodisable_threshold_linear = {0, "physics_ode_autodisable_threshold_linear", "0.2", "body will be disabled if it's linear move below this value"};
+cvar_t physics_ode_autodisable_threshold_angular = {0, "physics_ode_autodisable_threshold_angular", "0.3", "body will be disabled if it's angular move below this value"};
+cvar_t physics_ode_autodisable_threshold_samples = {0, "physics_ode_autodisable_threshold_samples", "5", "average threshold with this number of samples"};
+cvar_t physics_ode_movelimit = {0, "physics_ode_movelimit", "0.5", "clamp velocity if a single move would exceed this percentage of object thickness, to prevent flying through walls, be aware that behavior depends of step type"};
+cvar_t physics_ode_spinlimit = {0, "physics_ode_spinlimit", "10000", "reset spin velocity if it gets too large"};
+cvar_t physics_ode_trick_fixnan = {0, "physics_ode_trick_fixnan", "1", "engine trick that checks and fixes NaN velocity/origin/angles on objects, a value of 2 makes console prints on each fix"};
+cvar_t physics_ode_printstats = {0, "physics_ode_printstats", "0", "print ODE stats each frame"};
+cvar_t physics_ode = {0, "physics_ode", "0", "run ODE physics (VERY experimental and potentially buggy)"};
+
+// LordHavoc: this large chunk of definitions comes from the ODE library
+// include files.
+
+#ifdef ODE_STATIC
+#include "ode/ode.h"
+#else
+#ifdef WINAPI
+// ODE does not use WINAPI
+#define ODE_API
+#else
+#define ODE_API
+#endif
+
+// note: dynamic builds of ODE tend to be double precision, this is not used
+// for static builds
+typedef double dReal;
+
+typedef dReal dVector3[4];
+typedef dReal dVector4[4];
+typedef dReal dMatrix3[4*3];
+typedef dReal dMatrix4[4*4];
+typedef dReal dMatrix6[8*6];
+typedef dReal dQuaternion[4];
+
+struct dxWorld; /* dynamics world */
+struct dxSpace; /* collision space */
+struct dxBody; /* rigid body (dynamics object) */
+struct dxGeom; /* geometry (collision object) */
+struct dxJoint;
+struct dxJointNode;
+struct dxJointGroup;
+struct dxTriMeshData;
+
+#define dInfinity 3.402823466e+38f
+
+typedef struct dxWorld *dWorldID;
+typedef struct dxSpace *dSpaceID;
+typedef struct dxBody *dBodyID;
+typedef struct dxGeom *dGeomID;
+typedef struct dxJoint *dJointID;
+typedef struct dxJointGroup *dJointGroupID;
+typedef struct dxTriMeshData *dTriMeshDataID;
+
+typedef struct dJointFeedback
+{
+ dVector3 f1; /* force applied to body 1 */
+ dVector3 t1; /* torque applied to body 1 */
+ dVector3 f2; /* force applied to body 2 */
+ dVector3 t2; /* torque applied to body 2 */
+}
+dJointFeedback;
+
+typedef enum dJointType
+{
+ dJointTypeNone = 0,
+ dJointTypeBall,
+ dJointTypeHinge,
+ dJointTypeSlider,
+ dJointTypeContact,
+ dJointTypeUniversal,
+ dJointTypeHinge2,
+ dJointTypeFixed,
+ dJointTypeNull,
+ dJointTypeAMotor,
+ dJointTypeLMotor,
+ dJointTypePlane2D,
+ dJointTypePR,
+ dJointTypePU,
+ dJointTypePiston
+}
+dJointType;
+
+#define D_ALL_PARAM_NAMES(start) \
+ /* parameters for limits and motors */ \
+ dParamLoStop = start, \
+ dParamHiStop, \
+ dParamVel, \
+ dParamFMax, \
+ dParamFudgeFactor, \
+ dParamBounce, \
+ dParamCFM, \
+ dParamStopERP, \
+ dParamStopCFM, \
+ /* parameters for suspension */ \
+ dParamSuspensionERP, \
+ dParamSuspensionCFM, \
+ dParamERP, \
+
+#define D_ALL_PARAM_NAMES_X(start,x) \
+ /* parameters for limits and motors */ \
+ dParamLoStop ## x = start, \
+ dParamHiStop ## x, \
+ dParamVel ## x, \
+ dParamFMax ## x, \
+ dParamFudgeFactor ## x, \
+ dParamBounce ## x, \
+ dParamCFM ## x, \
+ dParamStopERP ## x, \
+ dParamStopCFM ## x, \
+ /* parameters for suspension */ \
+ dParamSuspensionERP ## x, \
+ dParamSuspensionCFM ## x, \
+ dParamERP ## x,
+
+enum {
+ D_ALL_PARAM_NAMES(0)
+ D_ALL_PARAM_NAMES_X(0x100,2)
+ D_ALL_PARAM_NAMES_X(0x200,3)
+
+ /* add a multiple of this constant to the basic parameter numbers to get
+ * the parameters for the second, third etc axes.
+ */
+ dParamGroup=0x100
+};
+
+typedef struct dMass
+{
+ dReal mass;
+ dVector3 c;
+ dMatrix3 I;
+}
+dMass;
+
+enum
+{
+ dContactMu2 = 0x001,
+ dContactFDir1 = 0x002,
+ dContactBounce = 0x004,
+ dContactSoftERP = 0x008,
+ dContactSoftCFM = 0x010,
+ dContactMotion1 = 0x020,
+ dContactMotion2 = 0x040,
+ dContactMotionN = 0x080,
+ dContactSlip1 = 0x100,
+ dContactSlip2 = 0x200,
+
+ dContactApprox0 = 0x0000,
+ dContactApprox1_1 = 0x1000,
+ dContactApprox1_2 = 0x2000,
+ dContactApprox1 = 0x3000
+};
+
+typedef struct dSurfaceParameters
+{
+ /* must always be defined */
+ int mode;
+ dReal mu;
+
+ /* only defined if the corresponding flag is set in mode */
+ dReal mu2;
+ dReal bounce;
+ dReal bounce_vel;
+ dReal soft_erp;
+ dReal soft_cfm;
+ dReal motion1,motion2,motionN;
+ dReal slip1,slip2;
+} dSurfaceParameters;
+
+typedef struct dContactGeom
+{
+ dVector3 pos; ///< contact position
+ dVector3 normal; ///< normal vector
+ dReal depth; ///< penetration depth
+ dGeomID g1,g2; ///< the colliding geoms
+ int side1,side2; ///< (to be documented)
+}
+dContactGeom;
+
+typedef struct dContact
+{
+ dSurfaceParameters surface;
+ dContactGeom geom;
+ dVector3 fdir1;
+}
+dContact;
+
+typedef void dNearCallback (void *data, dGeomID o1, dGeomID o2);
+
+// SAP
+// Order XZY or ZXY usually works best, if your Y is up.
+#define dSAP_AXES_XYZ ((0)|(1<<2)|(2<<4))
+#define dSAP_AXES_XZY ((0)|(2<<2)|(1<<4))
+#define dSAP_AXES_YXZ ((1)|(0<<2)|(2<<4))
+#define dSAP_AXES_YZX ((1)|(2<<2)|(0<<4))
+#define dSAP_AXES_ZXY ((2)|(0<<2)|(1<<4))
+#define dSAP_AXES_ZYX ((2)|(1<<2)|(0<<4))
+
+//const char* (ODE_API *dGetConfiguration)(void);
+int (ODE_API *dCheckConfiguration)( const char* token );
+int (ODE_API *dInitODE)(void);
+//int (ODE_API *dInitODE2)(unsigned int uiInitFlags);
+//int (ODE_API *dAllocateODEDataForThread)(unsigned int uiAllocateFlags);
+//void (ODE_API *dCleanupODEAllDataForThread)(void);
+void (ODE_API *dCloseODE)(void);
+
+//int (ODE_API *dMassCheck)(const dMass *m);
+//void (ODE_API *dMassSetZero)(dMass *);
+//void (ODE_API *dMassSetParameters)(dMass *, dReal themass, dReal cgx, dReal cgy, dReal cgz, dReal I11, dReal I22, dReal I33, dReal I12, dReal I13, dReal I23);
+//void (ODE_API *dMassSetSphere)(dMass *, dReal density, dReal radius);
+void (ODE_API *dMassSetSphereTotal)(dMass *, dReal total_mass, dReal radius);
+//void (ODE_API *dMassSetCapsule)(dMass *, dReal density, int direction, dReal radius, dReal length);
+void (ODE_API *dMassSetCapsuleTotal)(dMass *, dReal total_mass, int direction, dReal radius, dReal length);
+//void (ODE_API *dMassSetCylinder)(dMass *, dReal density, int direction, dReal radius, dReal length);
+//void (ODE_API *dMassSetCylinderTotal)(dMass *, dReal total_mass, int direction, dReal radius, dReal length);
+//void (ODE_API *dMassSetBox)(dMass *, dReal density, dReal lx, dReal ly, dReal lz);
+void (ODE_API *dMassSetBoxTotal)(dMass *, dReal total_mass, dReal lx, dReal ly, dReal lz);
+//void (ODE_API *dMassSetTrimesh)(dMass *, dReal density, dGeomID g);
+//void (ODE_API *dMassSetTrimeshTotal)(dMass *m, dReal total_mass, dGeomID g);
+//void (ODE_API *dMassAdjust)(dMass *, dReal newmass);
+//void (ODE_API *dMassTranslate)(dMass *, dReal x, dReal y, dReal z);
+//void (ODE_API *dMassRotate)(dMass *, const dMatrix3 R);
+//void (ODE_API *dMassAdd)(dMass *a, const dMass *b);
+//
+dWorldID (ODE_API *dWorldCreate)(void);
+void (ODE_API *dWorldDestroy)(dWorldID world);
+void (ODE_API *dWorldSetGravity)(dWorldID, dReal x, dReal y, dReal z);
+void (ODE_API *dWorldGetGravity)(dWorldID, dVector3 gravity);
+void (ODE_API *dWorldSetERP)(dWorldID, dReal erp);
+//dReal (ODE_API *dWorldGetERP)(dWorldID);
+void (ODE_API *dWorldSetCFM)(dWorldID, dReal cfm);
+//dReal (ODE_API *dWorldGetCFM)(dWorldID);
+void (ODE_API *dWorldStep)(dWorldID, dReal stepsize);
+//void (ODE_API *dWorldImpulseToForce)(dWorldID, dReal stepsize, dReal ix, dReal iy, dReal iz, dVector3 force);
+void (ODE_API *dWorldQuickStep)(dWorldID w, dReal stepsize);
+void (ODE_API *dWorldSetQuickStepNumIterations)(dWorldID, int num);
+//int (ODE_API *dWorldGetQuickStepNumIterations)(dWorldID);
+//void (ODE_API *dWorldSetQuickStepW)(dWorldID, dReal over_relaxation);
+//dReal (ODE_API *dWorldGetQuickStepW)(dWorldID);
+//void (ODE_API *dWorldSetContactMaxCorrectingVel)(dWorldID, dReal vel);
+//dReal (ODE_API *dWorldGetContactMaxCorrectingVel)(dWorldID);
+void (ODE_API *dWorldSetContactSurfaceLayer)(dWorldID, dReal depth);
+//dReal (ODE_API *dWorldGetContactSurfaceLayer)(dWorldID);
+#ifdef ODE_USE_STEPFAST
+void (ODE_API *dWorldStepFast1)(dWorldID, dReal stepsize, int maxiterations);
+#endif
+//void (ODE_API *dWorldSetAutoEnableDepthSF1)(dWorldID, int autoEnableDepth);
+//int (ODE_API *dWorldGetAutoEnableDepthSF1)(dWorldID);
+//dReal (ODE_API *dWorldGetAutoDisableLinearThreshold)(dWorldID);
+void (ODE_API *dWorldSetAutoDisableLinearThreshold)(dWorldID, dReal linear_threshold);
+//dReal (ODE_API *dWorldGetAutoDisableAngularThreshold)(dWorldID);
+void (ODE_API *dWorldSetAutoDisableAngularThreshold)(dWorldID, dReal angular_threshold);
+//dReal (ODE_API *dWorldGetAutoDisableLinearAverageThreshold)(dWorldID);
+//void (ODE_API *dWorldSetAutoDisableLinearAverageThreshold)(dWorldID, dReal linear_average_threshold);
+//dReal (ODE_API *dWorldGetAutoDisableAngularAverageThreshold)(dWorldID);
+//void (ODE_API *dWorldSetAutoDisableAngularAverageThreshold)(dWorldID, dReal angular_average_threshold);
+//int (ODE_API *dWorldGetAutoDisableAverageSamplesCount)(dWorldID);
+void (ODE_API *dWorldSetAutoDisableAverageSamplesCount)(dWorldID, unsigned int average_samples_count );
+//int (ODE_API *dWorldGetAutoDisableSteps)(dWorldID);
+void (ODE_API *dWorldSetAutoDisableSteps)(dWorldID, int steps);
+//dReal (ODE_API *dWorldGetAutoDisableTime)(dWorldID);
+void (ODE_API *dWorldSetAutoDisableTime)(dWorldID, dReal time);
+//int (ODE_API *dWorldGetAutoDisableFlag)(dWorldID);
+void (ODE_API *dWorldSetAutoDisableFlag)(dWorldID, int do_auto_disable);
+//dReal (ODE_API *dWorldGetLinearDampingThreshold)(dWorldID w);
+void (ODE_API *dWorldSetLinearDampingThreshold)(dWorldID w, dReal threshold);
+//dReal (ODE_API *dWorldGetAngularDampingThreshold)(dWorldID w);
+void (ODE_API *dWorldSetAngularDampingThreshold)(dWorldID w, dReal threshold);
+//dReal (ODE_API *dWorldGetLinearDamping)(dWorldID w);
+void (ODE_API *dWorldSetLinearDamping)(dWorldID w, dReal scale);
+//dReal (ODE_API *dWorldGetAngularDamping)(dWorldID w);
+void (ODE_API *dWorldSetAngularDamping)(dWorldID w, dReal scale);
+//void (ODE_API *dWorldSetDamping)(dWorldID w, dReal linear_scale, dReal angular_scale);
+//dReal (ODE_API *dWorldGetMaxAngularSpeed)(dWorldID w);
+//void (ODE_API *dWorldSetMaxAngularSpeed)(dWorldID w, dReal max_speed);
+//dReal (ODE_API *dBodyGetAutoDisableLinearThreshold)(dBodyID);
+//void (ODE_API *dBodySetAutoDisableLinearThreshold)(dBodyID, dReal linear_average_threshold);
+//dReal (ODE_API *dBodyGetAutoDisableAngularThreshold)(dBodyID);
+//void (ODE_API *dBodySetAutoDisableAngularThreshold)(dBodyID, dReal angular_average_threshold);
+//int (ODE_API *dBodyGetAutoDisableAverageSamplesCount)(dBodyID);
+//void (ODE_API *dBodySetAutoDisableAverageSamplesCount)(dBodyID, unsigned int average_samples_count);
+//int (ODE_API *dBodyGetAutoDisableSteps)(dBodyID);
+//void (ODE_API *dBodySetAutoDisableSteps)(dBodyID, int steps);
+//dReal (ODE_API *dBodyGetAutoDisableTime)(dBodyID);
+//void (ODE_API *dBodySetAutoDisableTime)(dBodyID, dReal time);
+//int (ODE_API *dBodyGetAutoDisableFlag)(dBodyID);
+//void (ODE_API *dBodySetAutoDisableFlag)(dBodyID, int do_auto_disable);
+//void (ODE_API *dBodySetAutoDisableDefaults)(dBodyID);
+//dWorldID (ODE_API *dBodyGetWorld)(dBodyID);
+dBodyID (ODE_API *dBodyCreate)(dWorldID);
+void (ODE_API *dBodyDestroy)(dBodyID);
+void (ODE_API *dBodySetData)(dBodyID, void *data);
+void * (ODE_API *dBodyGetData)(dBodyID);
+void (ODE_API *dBodySetPosition)(dBodyID, dReal x, dReal y, dReal z);
+void (ODE_API *dBodySetRotation)(dBodyID, const dMatrix3 R);
+//void (ODE_API *dBodySetQuaternion)(dBodyID, const dQuaternion q);
+void (ODE_API *dBodySetLinearVel)(dBodyID, dReal x, dReal y, dReal z);
+void (ODE_API *dBodySetAngularVel)(dBodyID, dReal x, dReal y, dReal z);
+const dReal * (ODE_API *dBodyGetPosition)(dBodyID);
+//void (ODE_API *dBodyCopyPosition)(dBodyID body, dVector3 pos);
+const dReal * (ODE_API *dBodyGetRotation)(dBodyID);
+//void (ODE_API *dBodyCopyRotation)(dBodyID, dMatrix3 R);
+//const dReal * (ODE_API *dBodyGetQuaternion)(dBodyID);
+//void (ODE_API *dBodyCopyQuaternion)(dBodyID body, dQuaternion quat);
+const dReal * (ODE_API *dBodyGetLinearVel)(dBodyID);
+const dReal * (ODE_API *dBodyGetAngularVel)(dBodyID);
+void (ODE_API *dBodySetMass)(dBodyID, const dMass *mass);
+//void (ODE_API *dBodyGetMass)(dBodyID, dMass *mass);
+//void (ODE_API *dBodyAddForce)(dBodyID, dReal fx, dReal fy, dReal fz);
+//void (ODE_API *dBodyAddTorque)(dBodyID, dReal fx, dReal fy, dReal fz);
+//void (ODE_API *dBodyAddRelForce)(dBodyID, dReal fx, dReal fy, dReal fz);
+void (ODE_API *dBodyAddRelTorque)(dBodyID, dReal fx, dReal fy, dReal fz);
+//void (ODE_API *dBodyAddForceAtPos)(dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
+void (ODE_API *dBodyAddForceAtRelPos)(dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
+//void (ODE_API *dBodyAddRelForceAtPos)(dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
+//void (ODE_API *dBodyAddRelForceAtRelPos)(dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
+//const dReal * (ODE_API *dBodyGetForce)(dBodyID);
+//const dReal * (ODE_API *dBodyGetTorque)(dBodyID);
+//void (ODE_API *dBodySetForce)(dBodyID b, dReal x, dReal y, dReal z);
+//void (ODE_API *dBodySetTorque)(dBodyID b, dReal x, dReal y, dReal z);
+//void (ODE_API *dBodyGetRelPointPos)(dBodyID, dReal px, dReal py, dReal pz, dVector3 result);
+//void (ODE_API *dBodyGetRelPointVel)(dBodyID, dReal px, dReal py, dReal pz, dVector3 result);
+//void (ODE_API *dBodyGetPointVel)(dBodyID, dReal px, dReal py, dReal pz, dVector3 result);
+//void (ODE_API *dBodyGetPosRelPoint)(dBodyID, dReal px, dReal py, dReal pz, dVector3 result);
+//void (ODE_API *dBodyVectorToWorld)(dBodyID, dReal px, dReal py, dReal pz, dVector3 result);
+//void (ODE_API *dBodyVectorFromWorld)(dBodyID, dReal px, dReal py, dReal pz, dVector3 result);
+//void (ODE_API *dBodySetFiniteRotationMode)(dBodyID, int mode);
+//void (ODE_API *dBodySetFiniteRotationAxis)(dBodyID, dReal x, dReal y, dReal z);
+//int (ODE_API *dBodyGetFiniteRotationMode)(dBodyID);
+//void (ODE_API *dBodyGetFiniteRotationAxis)(dBodyID, dVector3 result);
+int (ODE_API *dBodyGetNumJoints)(dBodyID b);
+dJointID (ODE_API *dBodyGetJoint)(dBodyID, int index);
+//void (ODE_API *dBodySetDynamic)(dBodyID);
+//void (ODE_API *dBodySetKinematic)(dBodyID);
+//int (ODE_API *dBodyIsKinematic)(dBodyID);
+void (ODE_API *dBodyEnable)(dBodyID);
+void (ODE_API *dBodyDisable)(dBodyID);
+int (ODE_API *dBodyIsEnabled)(dBodyID);
+void (ODE_API *dBodySetGravityMode)(dBodyID b, int mode);
+int (ODE_API *dBodyGetGravityMode)(dBodyID b);
+//void (*dBodySetMovedCallback)(dBodyID b, void(ODE_API *callback)(dBodyID));
+//dGeomID (ODE_API *dBodyGetFirstGeom)(dBodyID b);
+//dGeomID (ODE_API *dBodyGetNextGeom)(dGeomID g);
+//void (ODE_API *dBodySetDampingDefaults)(dBodyID b);
+//dReal (ODE_API *dBodyGetLinearDamping)(dBodyID b);
+//void (ODE_API *dBodySetLinearDamping)(dBodyID b, dReal scale);
+//dReal (ODE_API *dBodyGetAngularDamping)(dBodyID b);
+//void (ODE_API *dBodySetAngularDamping)(dBodyID b, dReal scale);
+//void (ODE_API *dBodySetDamping)(dBodyID b, dReal linear_scale, dReal angular_scale);
+//dReal (ODE_API *dBodyGetLinearDampingThreshold)(dBodyID b);
+//void (ODE_API *dBodySetLinearDampingThreshold)(dBodyID b, dReal threshold);
+//dReal (ODE_API *dBodyGetAngularDampingThreshold)(dBodyID b);
+//void (ODE_API *dBodySetAngularDampingThreshold)(dBodyID b, dReal threshold);
+//dReal (ODE_API *dBodyGetMaxAngularSpeed)(dBodyID b);
+//void (ODE_API *dBodySetMaxAngularSpeed)(dBodyID b, dReal max_speed);
+//int (ODE_API *dBodyGetGyroscopicMode)(dBodyID b);
+//void (ODE_API *dBodySetGyroscopicMode)(dBodyID b, int enabled);
+dJointID (ODE_API *dJointCreateBall)(dWorldID, dJointGroupID);
+dJointID (ODE_API *dJointCreateHinge)(dWorldID, dJointGroupID);
+dJointID (ODE_API *dJointCreateSlider)(dWorldID, dJointGroupID);
+dJointID (ODE_API *dJointCreateContact)(dWorldID, dJointGroupID, const dContact *);
+dJointID (ODE_API *dJointCreateHinge2)(dWorldID, dJointGroupID);
+dJointID (ODE_API *dJointCreateUniversal)(dWorldID, dJointGroupID);
+//dJointID (ODE_API *dJointCreatePR)(dWorldID, dJointGroupID);
+//dJointID (ODE_API *dJointCreatePU)(dWorldID, dJointGroupID);
+//dJointID (ODE_API *dJointCreatePiston)(dWorldID, dJointGroupID);
+dJointID (ODE_API *dJointCreateFixed)(dWorldID, dJointGroupID);
+//dJointID (ODE_API *dJointCreateNull)(dWorldID, dJointGroupID);
+//dJointID (ODE_API *dJointCreateAMotor)(dWorldID, dJointGroupID);
+//dJointID (ODE_API *dJointCreateLMotor)(dWorldID, dJointGroupID);
+//dJointID (ODE_API *dJointCreatePlane2D)(dWorldID, dJointGroupID);
+void (ODE_API *dJointDestroy)(dJointID);
+dJointGroupID (ODE_API *dJointGroupCreate)(int max_size);
+void (ODE_API *dJointGroupDestroy)(dJointGroupID);
+void (ODE_API *dJointGroupEmpty)(dJointGroupID);
+//int (ODE_API *dJointGetNumBodies)(dJointID);
+void (ODE_API *dJointAttach)(dJointID, dBodyID body1, dBodyID body2);
+//void (ODE_API *dJointEnable)(dJointID);
+//void (ODE_API *dJointDisable)(dJointID);
+//int (ODE_API *dJointIsEnabled)(dJointID);
+void (ODE_API *dJointSetData)(dJointID, void *data);
+void * (ODE_API *dJointGetData)(dJointID);
+//dJointType (ODE_API *dJointGetType)(dJointID);
+dBodyID (ODE_API *dJointGetBody)(dJointID, int index);
+//void (ODE_API *dJointSetFeedback)(dJointID, dJointFeedback *);
+//dJointFeedback *(ODE_API *dJointGetFeedback)(dJointID);
+void (ODE_API *dJointSetBallAnchor)(dJointID, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetBallAnchor2)(dJointID, dReal x, dReal y, dReal z);
+void (ODE_API *dJointSetBallParam)(dJointID, int parameter, dReal value);
+void (ODE_API *dJointSetHingeAnchor)(dJointID, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetHingeAnchorDelta)(dJointID, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
+void (ODE_API *dJointSetHingeAxis)(dJointID, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetHingeAxisOffset)(dJointID j, dReal x, dReal y, dReal z, dReal angle);
+void (ODE_API *dJointSetHingeParam)(dJointID, int parameter, dReal value);
+//void (ODE_API *dJointAddHingeTorque)(dJointID joint, dReal torque);
+void (ODE_API *dJointSetSliderAxis)(dJointID, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetSliderAxisDelta)(dJointID, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
+void (ODE_API *dJointSetSliderParam)(dJointID, int parameter, dReal value);
+//void (ODE_API *dJointAddSliderForce)(dJointID joint, dReal force);
+void (ODE_API *dJointSetHinge2Anchor)(dJointID, dReal x, dReal y, dReal z);
+void (ODE_API *dJointSetHinge2Axis1)(dJointID, dReal x, dReal y, dReal z);
+void (ODE_API *dJointSetHinge2Axis2)(dJointID, dReal x, dReal y, dReal z);
+void (ODE_API *dJointSetHinge2Param)(dJointID, int parameter, dReal value);
+//void (ODE_API *dJointAddHinge2Torques)(dJointID joint, dReal torque1, dReal torque2);
+void (ODE_API *dJointSetUniversalAnchor)(dJointID, dReal x, dReal y, dReal z);
+void (ODE_API *dJointSetUniversalAxis1)(dJointID, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetUniversalAxis1Offset)(dJointID, dReal x, dReal y, dReal z, dReal offset1, dReal offset2);
+void (ODE_API *dJointSetUniversalAxis2)(dJointID, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetUniversalAxis2Offset)(dJointID, dReal x, dReal y, dReal z, dReal offset1, dReal offset2);
+void (ODE_API *dJointSetUniversalParam)(dJointID, int parameter, dReal value);
+//void (ODE_API *dJointAddUniversalTorques)(dJointID joint, dReal torque1, dReal torque2);
+//void (ODE_API *dJointSetPRAnchor)(dJointID, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetPRAxis1)(dJointID, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetPRAxis2)(dJointID, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetPRParam)(dJointID, int parameter, dReal value);
+//void (ODE_API *dJointAddPRTorque)(dJointID j, dReal torque);
+//void (ODE_API *dJointSetPUAnchor)(dJointID, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetPUAnchorOffset)(dJointID, dReal x, dReal y, dReal z, dReal dx, dReal dy, dReal dz);
+//void (ODE_API *dJointSetPUAxis1)(dJointID, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetPUAxis2)(dJointID, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetPUAxis3)(dJointID, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetPUAxisP)(dJointID id, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetPUParam)(dJointID, int parameter, dReal value);
+//void (ODE_API *dJointAddPUTorque)(dJointID j, dReal torque);
+//void (ODE_API *dJointSetPistonAnchor)(dJointID, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetPistonAnchorOffset)(dJointID j, dReal x, dReal y, dReal z, dReal dx, dReal dy, dReal dz);
+//void (ODE_API *dJointSetPistonParam)(dJointID, int parameter, dReal value);
+//void (ODE_API *dJointAddPistonForce)(dJointID joint, dReal force);
+//void (ODE_API *dJointSetFixed)(dJointID);
+//void (ODE_API *dJointSetFixedParam)(dJointID, int parameter, dReal value);
+//void (ODE_API *dJointSetAMotorNumAxes)(dJointID, int num);
+//void (ODE_API *dJointSetAMotorAxis)(dJointID, int anum, int rel, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetAMotorAngle)(dJointID, int anum, dReal angle);
+//void (ODE_API *dJointSetAMotorParam)(dJointID, int parameter, dReal value);
+//void (ODE_API *dJointSetAMotorMode)(dJointID, int mode);
+//void (ODE_API *dJointAddAMotorTorques)(dJointID, dReal torque1, dReal torque2, dReal torque3);
+//void (ODE_API *dJointSetLMotorNumAxes)(dJointID, int num);
+//void (ODE_API *dJointSetLMotorAxis)(dJointID, int anum, int rel, dReal x, dReal y, dReal z);
+//void (ODE_API *dJointSetLMotorParam)(dJointID, int parameter, dReal value);
+//void (ODE_API *dJointSetPlane2DXParam)(dJointID, int parameter, dReal value);
+//void (ODE_API *dJointSetPlane2DYParam)(dJointID, int parameter, dReal value);
+//void (ODE_API *dJointSetPlane2DAngleParam)(dJointID, int parameter, dReal value);
+//void (ODE_API *dJointGetBallAnchor)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetBallAnchor2)(dJointID, dVector3 result);
+//dReal (ODE_API *dJointGetBallParam)(dJointID, int parameter);
+//void (ODE_API *dJointGetHingeAnchor)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetHingeAnchor2)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetHingeAxis)(dJointID, dVector3 result);
+//dReal (ODE_API *dJointGetHingeParam)(dJointID, int parameter);
+//dReal (ODE_API *dJointGetHingeAngle)(dJointID);
+//dReal (ODE_API *dJointGetHingeAngleRate)(dJointID);
+//dReal (ODE_API *dJointGetSliderPosition)(dJointID);
+//dReal (ODE_API *dJointGetSliderPositionRate)(dJointID);
+//void (ODE_API *dJointGetSliderAxis)(dJointID, dVector3 result);
+//dReal (ODE_API *dJointGetSliderParam)(dJointID, int parameter);
+//void (ODE_API *dJointGetHinge2Anchor)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetHinge2Anchor2)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetHinge2Axis1)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetHinge2Axis2)(dJointID, dVector3 result);
+//dReal (ODE_API *dJointGetHinge2Param)(dJointID, int parameter);
+//dReal (ODE_API *dJointGetHinge2Angle1)(dJointID);
+//dReal (ODE_API *dJointGetHinge2Angle1Rate)(dJointID);
+//dReal (ODE_API *dJointGetHinge2Angle2Rate)(dJointID);
+//void (ODE_API *dJointGetUniversalAnchor)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetUniversalAnchor2)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetUniversalAxis1)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetUniversalAxis2)(dJointID, dVector3 result);
+//dReal (ODE_API *dJointGetUniversalParam)(dJointID, int parameter);
+//void (ODE_API *dJointGetUniversalAngles)(dJointID, dReal *angle1, dReal *angle2);
+//dReal (ODE_API *dJointGetUniversalAngle1)(dJointID);
+//dReal (ODE_API *dJointGetUniversalAngle2)(dJointID);
+//dReal (ODE_API *dJointGetUniversalAngle1Rate)(dJointID);
+//dReal (ODE_API *dJointGetUniversalAngle2Rate)(dJointID);
+//void (ODE_API *dJointGetPRAnchor)(dJointID, dVector3 result);
+//dReal (ODE_API *dJointGetPRPosition)(dJointID);
+//dReal (ODE_API *dJointGetPRPositionRate)(dJointID);
+//dReal (ODE_API *dJointGetPRAngle)(dJointID);
+//dReal (ODE_API *dJointGetPRAngleRate)(dJointID);
+//void (ODE_API *dJointGetPRAxis1)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetPRAxis2)(dJointID, dVector3 result);
+//dReal (ODE_API *dJointGetPRParam)(dJointID, int parameter);
+//void (ODE_API *dJointGetPUAnchor)(dJointID, dVector3 result);
+//dReal (ODE_API *dJointGetPUPosition)(dJointID);
+//dReal (ODE_API *dJointGetPUPositionRate)(dJointID);
+//void (ODE_API *dJointGetPUAxis1)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetPUAxis2)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetPUAxis3)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetPUAxisP)(dJointID id, dVector3 result);
+//void (ODE_API *dJointGetPUAngles)(dJointID, dReal *angle1, dReal *angle2);
+//dReal (ODE_API *dJointGetPUAngle1)(dJointID);
+//dReal (ODE_API *dJointGetPUAngle1Rate)(dJointID);
+//dReal (ODE_API *dJointGetPUAngle2)(dJointID);
+//dReal (ODE_API *dJointGetPUAngle2Rate)(dJointID);
+//dReal (ODE_API *dJointGetPUParam)(dJointID, int parameter);
+//dReal (ODE_API *dJointGetPistonPosition)(dJointID);
+//dReal (ODE_API *dJointGetPistonPositionRate)(dJointID);
+//dReal (ODE_API *dJointGetPistonAngle)(dJointID);
+//dReal (ODE_API *dJointGetPistonAngleRate)(dJointID);
+//void (ODE_API *dJointGetPistonAnchor)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetPistonAnchor2)(dJointID, dVector3 result);
+//void (ODE_API *dJointGetPistonAxis)(dJointID, dVector3 result);
+//dReal (ODE_API *dJointGetPistonParam)(dJointID, int parameter);
+//int (ODE_API *dJointGetAMotorNumAxes)(dJointID);
+//void (ODE_API *dJointGetAMotorAxis)(dJointID, int anum, dVector3 result);
+//int (ODE_API *dJointGetAMotorAxisRel)(dJointID, int anum);
+//dReal (ODE_API *dJointGetAMotorAngle)(dJointID, int anum);
+//dReal (ODE_API *dJointGetAMotorAngleRate)(dJointID, int anum);
+//dReal (ODE_API *dJointGetAMotorParam)(dJointID, int parameter);
+//int (ODE_API *dJointGetAMotorMode)(dJointID);
+//int (ODE_API *dJointGetLMotorNumAxes)(dJointID);
+//void (ODE_API *dJointGetLMotorAxis)(dJointID, int anum, dVector3 result);
+//dReal (ODE_API *dJointGetLMotorParam)(dJointID, int parameter);
+//dReal (ODE_API *dJointGetFixedParam)(dJointID, int parameter);
+//dJointID (ODE_API *dConnectingJoint)(dBodyID, dBodyID);
+//int (ODE_API *dConnectingJointList)(dBodyID, dBodyID, dJointID*);
+int (ODE_API *dAreConnected)(dBodyID, dBodyID);
+int (ODE_API *dAreConnectedExcluding)(dBodyID body1, dBodyID body2, int joint_type);
+//
+dSpaceID (ODE_API *dSimpleSpaceCreate)(dSpaceID space);
+dSpaceID (ODE_API *dHashSpaceCreate)(dSpaceID space);
+dSpaceID (ODE_API *dQuadTreeSpaceCreate)(dSpaceID space, const dVector3 Center, const dVector3 Extents, int Depth);
+//dSpaceID (ODE_API *dSweepAndPruneSpaceCreate)( dSpaceID space, int axisorder );
+void (ODE_API *dSpaceDestroy)(dSpaceID);
+//void (ODE_API *dHashSpaceSetLevels)(dSpaceID space, int minlevel, int maxlevel);
+//void (ODE_API *dHashSpaceGetLevels)(dSpaceID space, int *minlevel, int *maxlevel);
+//void (ODE_API *dSpaceSetCleanup)(dSpaceID space, int mode);
+//int (ODE_API *dSpaceGetCleanup)(dSpaceID space);
+//void (ODE_API *dSpaceSetSublevel)(dSpaceID space, int sublevel);
+//int (ODE_API *dSpaceGetSublevel)(dSpaceID space);
+//void (ODE_API *dSpaceSetManualCleanup)(dSpaceID space, int mode);
+//int (ODE_API *dSpaceGetManualCleanup)(dSpaceID space);
+//void (ODE_API *dSpaceAdd)(dSpaceID, dGeomID);
+//void (ODE_API *dSpaceRemove)(dSpaceID, dGeomID);
+//int (ODE_API *dSpaceQuery)(dSpaceID, dGeomID);
+//void (ODE_API *dSpaceClean)(dSpaceID);
+//int (ODE_API *dSpaceGetNumGeoms)(dSpaceID);
+//dGeomID (ODE_API *dSpaceGetGeom)(dSpaceID, int i);
+//int (ODE_API *dSpaceGetClass)(dSpaceID space);
+//
+void (ODE_API *dGeomDestroy)(dGeomID geom);
+void (ODE_API *dGeomSetData)(dGeomID geom, void* data);
+void * (ODE_API *dGeomGetData)(dGeomID geom);
+void (ODE_API *dGeomSetBody)(dGeomID geom, dBodyID body);
+dBodyID (ODE_API *dGeomGetBody)(dGeomID geom);
+void (ODE_API *dGeomSetPosition)(dGeomID geom, dReal x, dReal y, dReal z);
+void (ODE_API *dGeomSetRotation)(dGeomID geom, const dMatrix3 R);
+//void (ODE_API *dGeomSetQuaternion)(dGeomID geom, const dQuaternion Q);
+//const dReal * (ODE_API *dGeomGetPosition)(dGeomID geom);
+//void (ODE_API *dGeomCopyPosition)(dGeomID geom, dVector3 pos);
+//const dReal * (ODE_API *dGeomGetRotation)(dGeomID geom);
+//void (ODE_API *dGeomCopyRotation)(dGeomID geom, dMatrix3 R);
+//void (ODE_API *dGeomGetQuaternion)(dGeomID geom, dQuaternion result);
+//void (ODE_API *dGeomGetAABB)(dGeomID geom, dReal aabb[6]);
+int (ODE_API *dGeomIsSpace)(dGeomID geom);
+//dSpaceID (ODE_API *dGeomGetSpace)(dGeomID);
+//int (ODE_API *dGeomGetClass)(dGeomID geom);
+//void (ODE_API *dGeomSetCategoryBits)(dGeomID geom, unsigned long bits);
+//void (ODE_API *dGeomSetCollideBits)(dGeomID geom, unsigned long bits);
+//unsigned long (ODE_API *dGeomGetCategoryBits)(dGeomID);
+//unsigned long (ODE_API *dGeomGetCollideBits)(dGeomID);
+//void (ODE_API *dGeomEnable)(dGeomID geom);
+//void (ODE_API *dGeomDisable)(dGeomID geom);
+//int (ODE_API *dGeomIsEnabled)(dGeomID geom);
+//void (ODE_API *dGeomSetOffsetPosition)(dGeomID geom, dReal x, dReal y, dReal z);
+//void (ODE_API *dGeomSetOffsetRotation)(dGeomID geom, const dMatrix3 R);
+//void (ODE_API *dGeomSetOffsetQuaternion)(dGeomID geom, const dQuaternion Q);
+//void (ODE_API *dGeomSetOffsetWorldPosition)(dGeomID geom, dReal x, dReal y, dReal z);
+//void (ODE_API *dGeomSetOffsetWorldRotation)(dGeomID geom, const dMatrix3 R);
+//void (ODE_API *dGeomSetOffsetWorldQuaternion)(dGeomID geom, const dQuaternion);
+//void (ODE_API *dGeomClearOffset)(dGeomID geom);
+//int (ODE_API *dGeomIsOffset)(dGeomID geom);
+//const dReal * (ODE_API *dGeomGetOffsetPosition)(dGeomID geom);
+//void (ODE_API *dGeomCopyOffsetPosition)(dGeomID geom, dVector3 pos);
+//const dReal * (ODE_API *dGeomGetOffsetRotation)(dGeomID geom);
+//void (ODE_API *dGeomCopyOffsetRotation)(dGeomID geom, dMatrix3 R);
+//void (ODE_API *dGeomGetOffsetQuaternion)(dGeomID geom, dQuaternion result);
+int (ODE_API *dCollide)(dGeomID o1, dGeomID o2, int flags, dContactGeom *contact, int skip);
+//
+void (ODE_API *dSpaceCollide)(dSpaceID space, void *data, dNearCallback *callback);
+void (ODE_API *dSpaceCollide2)(dGeomID space1, dGeomID space2, void *data, dNearCallback *callback);
+//
+dGeomID (ODE_API *dCreateSphere)(dSpaceID space, dReal radius);
+//void (ODE_API *dGeomSphereSetRadius)(dGeomID sphere, dReal radius);
+//dReal (ODE_API *dGeomSphereGetRadius)(dGeomID sphere);
+//dReal (ODE_API *dGeomSpherePointDepth)(dGeomID sphere, dReal x, dReal y, dReal z);
+//
+//dGeomID (ODE_API *dCreateConvex)(dSpaceID space, dReal *_planes, unsigned int _planecount, dReal *_points, unsigned int _pointcount,unsigned int *_polygons);
+//void (ODE_API *dGeomSetConvex)(dGeomID g, dReal *_planes, unsigned int _count, dReal *_points, unsigned int _pointcount,unsigned int *_polygons);
+//
+dGeomID (ODE_API *dCreateBox)(dSpaceID space, dReal lx, dReal ly, dReal lz);
+//void (ODE_API *dGeomBoxSetLengths)(dGeomID box, dReal lx, dReal ly, dReal lz);
+//void (ODE_API *dGeomBoxGetLengths)(dGeomID box, dVector3 result);
+//dReal (ODE_API *dGeomBoxPointDepth)(dGeomID box, dReal x, dReal y, dReal z);
+//dReal (ODE_API *dGeomBoxPointDepth)(dGeomID box, dReal x, dReal y, dReal z);
+//
+//dGeomID (ODE_API *dCreatePlane)(dSpaceID space, dReal a, dReal b, dReal c, dReal d);
+//void (ODE_API *dGeomPlaneSetParams)(dGeomID plane, dReal a, dReal b, dReal c, dReal d);
+//void (ODE_API *dGeomPlaneGetParams)(dGeomID plane, dVector4 result);
+//dReal (ODE_API *dGeomPlanePointDepth)(dGeomID plane, dReal x, dReal y, dReal z);
+//
+dGeomID (ODE_API *dCreateCapsule)(dSpaceID space, dReal radius, dReal length);
+//void (ODE_API *dGeomCapsuleSetParams)(dGeomID ccylinder, dReal radius, dReal length);
+//void (ODE_API *dGeomCapsuleGetParams)(dGeomID ccylinder, dReal *radius, dReal *length);
+//dReal (ODE_API *dGeomCapsulePointDepth)(dGeomID ccylinder, dReal x, dReal y, dReal z);
+//
+//dGeomID (ODE_API *dCreateCylinder)(dSpaceID space, dReal radius, dReal length);
+//void (ODE_API *dGeomCylinderSetParams)(dGeomID cylinder, dReal radius, dReal length);
+//void (ODE_API *dGeomCylinderGetParams)(dGeomID cylinder, dReal *radius, dReal *length);
+//
+//dGeomID (ODE_API *dCreateRay)(dSpaceID space, dReal length);
+//void (ODE_API *dGeomRaySetLength)(dGeomID ray, dReal length);
+//dReal (ODE_API *dGeomRayGetLength)(dGeomID ray);
+//void (ODE_API *dGeomRaySet)(dGeomID ray, dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz);
+//void (ODE_API *dGeomRayGet)(dGeomID ray, dVector3 start, dVector3 dir);
+//
+dGeomID (ODE_API *dCreateGeomTransform)(dSpaceID space);
+void (ODE_API *dGeomTransformSetGeom)(dGeomID g, dGeomID obj);
+//dGeomID (ODE_API *dGeomTransformGetGeom)(dGeomID g);
+void (ODE_API *dGeomTransformSetCleanup)(dGeomID g, int mode);
+//int (ODE_API *dGeomTransformGetCleanup)(dGeomID g);
+//void (ODE_API *dGeomTransformSetInfo)(dGeomID g, int mode);
+//int (ODE_API *dGeomTransformGetInfo)(dGeomID g);
+
+enum { TRIMESH_FACE_NORMALS };
+typedef int dTriCallback(dGeomID TriMesh, dGeomID RefObject, int TriangleIndex);
+typedef void dTriArrayCallback(dGeomID TriMesh, dGeomID RefObject, const int* TriIndices, int TriCount);
+typedef int dTriRayCallback(dGeomID TriMesh, dGeomID Ray, int TriangleIndex, dReal u, dReal v);
+typedef int dTriTriMergeCallback(dGeomID TriMesh, int FirstTriangleIndex, int SecondTriangleIndex);
+
+dTriMeshDataID (ODE_API *dGeomTriMeshDataCreate)(void);
+void (ODE_API *dGeomTriMeshDataDestroy)(dTriMeshDataID g);
+//void (ODE_API *dGeomTriMeshDataSet)(dTriMeshDataID g, int data_id, void* in_data);
+//void* (ODE_API *dGeomTriMeshDataGet)(dTriMeshDataID g, int data_id);
+//void (*dGeomTriMeshSetLastTransform)( (ODE_API *dGeomID g, dMatrix4 last_trans );
+//dReal* (*dGeomTriMeshGetLastTransform)( (ODE_API *dGeomID g );
+void (ODE_API *dGeomTriMeshDataBuildSingle)(dTriMeshDataID g, const void* Vertices, int VertexStride, int VertexCount, const void* Indices, int IndexCount, int TriStride);
+//void (ODE_API *dGeomTriMeshDataBuildSingle1)(dTriMeshDataID g, const void* Vertices, int VertexStride, int VertexCount, const void* Indices, int IndexCount, int TriStride, const void* Normals);
+//void (ODE_API *dGeomTriMeshDataBuildDouble)(dTriMeshDataID g, const void* Vertices, int VertexStride, int VertexCount, const void* Indices, int IndexCount, int TriStride);
+//void (ODE_API *dGeomTriMeshDataBuildDouble1)(dTriMeshDataID g, const void* Vertices, int VertexStride, int VertexCount, const void* Indices, int IndexCount, int TriStride, const void* Normals);
+//void (ODE_API *dGeomTriMeshDataBuildSimple)(dTriMeshDataID g, const dReal* Vertices, int VertexCount, const dTriIndex* Indices, int IndexCount);
+//void (ODE_API *dGeomTriMeshDataBuildSimple1)(dTriMeshDataID g, const dReal* Vertices, int VertexCount, const dTriIndex* Indices, int IndexCount, const int* Normals);
+//void (ODE_API *dGeomTriMeshDataPreprocess)(dTriMeshDataID g);
+//void (ODE_API *dGeomTriMeshDataGetBuffer)(dTriMeshDataID g, unsigned char** buf, int* bufLen);
+//void (ODE_API *dGeomTriMeshDataSetBuffer)(dTriMeshDataID g, unsigned char* buf);
+//void (ODE_API *dGeomTriMeshSetCallback)(dGeomID g, dTriCallback* Callback);
+//dTriCallback* (ODE_API *dGeomTriMeshGetCallback)(dGeomID g);
+//void (ODE_API *dGeomTriMeshSetArrayCallback)(dGeomID g, dTriArrayCallback* ArrayCallback);
+//dTriArrayCallback* (ODE_API *dGeomTriMeshGetArrayCallback)(dGeomID g);
+//void (ODE_API *dGeomTriMeshSetRayCallback)(dGeomID g, dTriRayCallback* Callback);
+//dTriRayCallback* (ODE_API *dGeomTriMeshGetRayCallback)(dGeomID g);
+//void (ODE_API *dGeomTriMeshSetTriMergeCallback)(dGeomID g, dTriTriMergeCallback* Callback);
+//dTriTriMergeCallback* (ODE_API *dGeomTriMeshGetTriMergeCallback)(dGeomID g);
+dGeomID (ODE_API *dCreateTriMesh)(dSpaceID space, dTriMeshDataID Data, dTriCallback* Callback, dTriArrayCallback* ArrayCallback, dTriRayCallback* RayCallback);
+//void (ODE_API *dGeomTriMeshSetData)(dGeomID g, dTriMeshDataID Data);
+//dTriMeshDataID (ODE_API *dGeomTriMeshGetData)(dGeomID g);
+//void (ODE_API *dGeomTriMeshEnableTC)(dGeomID g, int geomClass, int enable);
+//int (ODE_API *dGeomTriMeshIsTCEnabled)(dGeomID g, int geomClass);
+//void (ODE_API *dGeomTriMeshClearTCCache)(dGeomID g);
+//dTriMeshDataID (ODE_API *dGeomTriMeshGetTriMeshDataID)(dGeomID g);
+//void (ODE_API *dGeomTriMeshGetTriangle)(dGeomID g, int Index, dVector3* v0, dVector3* v1, dVector3* v2);
+//void (ODE_API *dGeomTriMeshGetPoint)(dGeomID g, int Index, dReal u, dReal v, dVector3 Out);
+//int (ODE_API *dGeomTriMeshGetTriangleCount )(dGeomID g);
+//void (ODE_API *dGeomTriMeshDataUpdate)(dTriMeshDataID g);
+
+static dllfunction_t odefuncs[] =
+{
+// {"dGetConfiguration", (void **) &dGetConfiguration},
+ {"dCheckConfiguration", (void **) &dCheckConfiguration},
+ {"dInitODE", (void **) &dInitODE},
+// {"dInitODE2", (void **) &dInitODE2},
+// {"dAllocateODEDataForThread", (void **) &dAllocateODEDataForThread},
+// {"dCleanupODEAllDataForThread", (void **) &dCleanupODEAllDataForThread},
+ {"dCloseODE", (void **) &dCloseODE},
+// {"dMassCheck", (void **) &dMassCheck},
+// {"dMassSetZero", (void **) &dMassSetZero},
+// {"dMassSetParameters", (void **) &dMassSetParameters},
+// {"dMassSetSphere", (void **) &dMassSetSphere},
+ {"dMassSetSphereTotal", (void **) &dMassSetSphereTotal},
+// {"dMassSetCapsule", (void **) &dMassSetCapsule},
+ {"dMassSetCapsuleTotal", (void **) &dMassSetCapsuleTotal},
+// {"dMassSetCylinder", (void **) &dMassSetCylinder},
+// {"dMassSetCylinderTotal", (void **) &dMassSetCylinderTotal},
+// {"dMassSetBox", (void **) &dMassSetBox},
+ {"dMassSetBoxTotal", (void **) &dMassSetBoxTotal},
+// {"dMassSetTrimesh", (void **) &dMassSetTrimesh},
+// {"dMassSetTrimeshTotal", (void **) &dMassSetTrimeshTotal},
+// {"dMassAdjust", (void **) &dMassAdjust},
+// {"dMassTranslate", (void **) &dMassTranslate},
+// {"dMassRotate", (void **) &dMassRotate},
+// {"dMassAdd", (void **) &dMassAdd},
+
+ {"dWorldCreate", (void **) &dWorldCreate},
+ {"dWorldDestroy", (void **) &dWorldDestroy},
+ {"dWorldSetGravity", (void **) &dWorldSetGravity},
+ {"dWorldGetGravity", (void **) &dWorldGetGravity},
+ {"dWorldSetERP", (void **) &dWorldSetERP},
+// {"dWorldGetERP", (void **) &dWorldGetERP},
+ {"dWorldSetCFM", (void **) &dWorldSetCFM},
+// {"dWorldGetCFM", (void **) &dWorldGetCFM},
+ {"dWorldStep", (void **) &dWorldStep},
+// {"dWorldImpulseToForce", (void **) &dWorldImpulseToForce},
+ {"dWorldQuickStep", (void **) &dWorldQuickStep},
+ {"dWorldSetQuickStepNumIterations", (void **) &dWorldSetQuickStepNumIterations},
+// {"dWorldGetQuickStepNumIterations", (void **) &dWorldGetQuickStepNumIterations},
+// {"dWorldSetQuickStepW", (void **) &dWorldSetQuickStepW},
+// {"dWorldGetQuickStepW", (void **) &dWorldGetQuickStepW},
+// {"dWorldSetContactMaxCorrectingVel", (void **) &dWorldSetContactMaxCorrectingVel},
+// {"dWorldGetContactMaxCorrectingVel", (void **) &dWorldGetContactMaxCorrectingVel},
+ {"dWorldSetContactSurfaceLayer", (void **) &dWorldSetContactSurfaceLayer},
+// {"dWorldGetContactSurfaceLayer", (void **) &dWorldGetContactSurfaceLayer},
+#ifdef ODE_USE_STEPFAST
+ {"dWorldStepFast1", (void **) &dWorldStepFast1},
+#endif
+// {"dWorldSetAutoEnableDepthSF1", (void **) &dWorldSetAutoEnableDepthSF1},
+// {"dWorldGetAutoEnableDepthSF1", (void **) &dWorldGetAutoEnableDepthSF1},
+// {"dWorldGetAutoDisableLinearThreshold", (void **) &dWorldGetAutoDisableLinearThreshold},
+ {"dWorldSetAutoDisableLinearThreshold", (void **) &dWorldSetAutoDisableLinearThreshold},
+// {"dWorldGetAutoDisableAngularThreshold", (void **) &dWorldGetAutoDisableAngularThreshold},
+ {"dWorldSetAutoDisableAngularThreshold", (void **) &dWorldSetAutoDisableAngularThreshold},
+// {"dWorldGetAutoDisableLinearAverageThreshold", (void **) &dWorldGetAutoDisableLinearAverageThreshold},
+// {"dWorldSetAutoDisableLinearAverageThreshold", (void **) &dWorldSetAutoDisableLinearAverageThreshold},
+// {"dWorldGetAutoDisableAngularAverageThreshold", (void **) &dWorldGetAutoDisableAngularAverageThreshold},
+// {"dWorldSetAutoDisableAngularAverageThreshold", (void **) &dWorldSetAutoDisableAngularAverageThreshold},
+// {"dWorldGetAutoDisableAverageSamplesCount", (void **) &dWorldGetAutoDisableAverageSamplesCount},
+ {"dWorldSetAutoDisableAverageSamplesCount", (void **) &dWorldSetAutoDisableAverageSamplesCount},
+// {"dWorldGetAutoDisableSteps", (void **) &dWorldGetAutoDisableSteps},
+ {"dWorldSetAutoDisableSteps", (void **) &dWorldSetAutoDisableSteps},
+// {"dWorldGetAutoDisableTime", (void **) &dWorldGetAutoDisableTime},
+ {"dWorldSetAutoDisableTime", (void **) &dWorldSetAutoDisableTime},
+// {"dWorldGetAutoDisableFlag", (void **) &dWorldGetAutoDisableFlag},
+ {"dWorldSetAutoDisableFlag", (void **) &dWorldSetAutoDisableFlag},
+// {"dWorldGetLinearDampingThreshold", (void **) &dWorldGetLinearDampingThreshold},
+ {"dWorldSetLinearDampingThreshold", (void **) &dWorldSetLinearDampingThreshold},
+// {"dWorldGetAngularDampingThreshold", (void **) &dWorldGetAngularDampingThreshold},
+ {"dWorldSetAngularDampingThreshold", (void **) &dWorldSetAngularDampingThreshold},
+// {"dWorldGetLinearDamping", (void **) &dWorldGetLinearDamping},
+ {"dWorldSetLinearDamping", (void **) &dWorldSetLinearDamping},
+// {"dWorldGetAngularDamping", (void **) &dWorldGetAngularDamping},
+ {"dWorldSetAngularDamping", (void **) &dWorldSetAngularDamping},
+// {"dWorldSetDamping", (void **) &dWorldSetDamping},
+// {"dWorldGetMaxAngularSpeed", (void **) &dWorldGetMaxAngularSpeed},
+// {"dWorldSetMaxAngularSpeed", (void **) &dWorldSetMaxAngularSpeed},
+// {"dBodyGetAutoDisableLinearThreshold", (void **) &dBodyGetAutoDisableLinearThreshold},
+// {"dBodySetAutoDisableLinearThreshold", (void **) &dBodySetAutoDisableLinearThreshold},
+// {"dBodyGetAutoDisableAngularThreshold", (void **) &dBodyGetAutoDisableAngularThreshold},
+// {"dBodySetAutoDisableAngularThreshold", (void **) &dBodySetAutoDisableAngularThreshold},
+// {"dBodyGetAutoDisableAverageSamplesCount", (void **) &dBodyGetAutoDisableAverageSamplesCount},
+// {"dBodySetAutoDisableAverageSamplesCount", (void **) &dBodySetAutoDisableAverageSamplesCount},
+// {"dBodyGetAutoDisableSteps", (void **) &dBodyGetAutoDisableSteps},
+// {"dBodySetAutoDisableSteps", (void **) &dBodySetAutoDisableSteps},
+// {"dBodyGetAutoDisableTime", (void **) &dBodyGetAutoDisableTime},
+// {"dBodySetAutoDisableTime", (void **) &dBodySetAutoDisableTime},
+// {"dBodyGetAutoDisableFlag", (void **) &dBodyGetAutoDisableFlag},
+// {"dBodySetAutoDisableFlag", (void **) &dBodySetAutoDisableFlag},
+// {"dBodySetAutoDisableDefaults", (void **) &dBodySetAutoDisableDefaults},
+// {"dBodyGetWorld", (void **) &dBodyGetWorld},
+ {"dBodyCreate", (void **) &dBodyCreate},
+ {"dBodyDestroy", (void **) &dBodyDestroy},
+ {"dBodySetData", (void **) &dBodySetData},
+ {"dBodyGetData", (void **) &dBodyGetData},
+ {"dBodySetPosition", (void **) &dBodySetPosition},
+ {"dBodySetRotation", (void **) &dBodySetRotation},
+// {"dBodySetQuaternion", (void **) &dBodySetQuaternion},
+ {"dBodySetLinearVel", (void **) &dBodySetLinearVel},
+ {"dBodySetAngularVel", (void **) &dBodySetAngularVel},
+ {"dBodyGetPosition", (void **) &dBodyGetPosition},
+// {"dBodyCopyPosition", (void **) &dBodyCopyPosition},
+ {"dBodyGetRotation", (void **) &dBodyGetRotation},
+// {"dBodyCopyRotation", (void **) &dBodyCopyRotation},
+// {"dBodyGetQuaternion", (void **) &dBodyGetQuaternion},
+// {"dBodyCopyQuaternion", (void **) &dBodyCopyQuaternion},
+ {"dBodyGetLinearVel", (void **) &dBodyGetLinearVel},
+ {"dBodyGetAngularVel", (void **) &dBodyGetAngularVel},
+ {"dBodySetMass", (void **) &dBodySetMass},
+// {"dBodyGetMass", (void **) &dBodyGetMass},
+// {"dBodyAddForce", (void **) &dBodyAddForce},
+// {"dBodyAddTorque", (void **) &dBodyAddTorque},
+// {"dBodyAddRelForce", (void **) &dBodyAddRelForce},
+ {"dBodyAddRelTorque", (void **) &dBodyAddRelTorque},
+// {"dBodyAddForceAtPos", (void **) &dBodyAddForceAtPos},
+ {"dBodyAddForceAtRelPos", (void **) &dBodyAddForceAtRelPos},
+// {"dBodyAddRelForceAtPos", (void **) &dBodyAddRelForceAtPos},
+// {"dBodyAddRelForceAtRelPos", (void **) &dBodyAddRelForceAtRelPos},
+// {"dBodyGetForce", (void **) &dBodyGetForce},
+// {"dBodyGetTorque", (void **) &dBodyGetTorque},
+// {"dBodySetForce", (void **) &dBodySetForce},
+// {"dBodySetTorque", (void **) &dBodySetTorque},
+// {"dBodyGetRelPointPos", (void **) &dBodyGetRelPointPos},
+// {"dBodyGetRelPointVel", (void **) &dBodyGetRelPointVel},
+// {"dBodyGetPointVel", (void **) &dBodyGetPointVel},
+// {"dBodyGetPosRelPoint", (void **) &dBodyGetPosRelPoint},
+// {"dBodyVectorToWorld", (void **) &dBodyVectorToWorld},
+// {"dBodyVectorFromWorld", (void **) &dBodyVectorFromWorld},
+// {"dBodySetFiniteRotationMode", (void **) &dBodySetFiniteRotationMode},
+// {"dBodySetFiniteRotationAxis", (void **) &dBodySetFiniteRotationAxis},
+// {"dBodyGetFiniteRotationMode", (void **) &dBodyGetFiniteRotationMode},
+// {"dBodyGetFiniteRotationAxis", (void **) &dBodyGetFiniteRotationAxis},
+ {"dBodyGetNumJoints", (void **) &dBodyGetNumJoints},
+ {"dBodyGetJoint", (void **) &dBodyGetJoint},
+// {"dBodySetDynamic", (void **) &dBodySetDynamic},
+// {"dBodySetKinematic", (void **) &dBodySetKinematic},
+// {"dBodyIsKinematic", (void **) &dBodyIsKinematic},
+ {"dBodyEnable", (void **) &dBodyEnable},
+ {"dBodyDisable", (void **) &dBodyDisable},
+ {"dBodyIsEnabled", (void **) &dBodyIsEnabled},
+ {"dBodySetGravityMode", (void **) &dBodySetGravityMode},
+ {"dBodyGetGravityMode", (void **) &dBodyGetGravityMode},
+// {"dBodySetMovedCallback", (void **) &dBodySetMovedCallback},
+// {"dBodyGetFirstGeom", (void **) &dBodyGetFirstGeom},
+// {"dBodyGetNextGeom", (void **) &dBodyGetNextGeom},
+// {"dBodySetDampingDefaults", (void **) &dBodySetDampingDefaults},
+// {"dBodyGetLinearDamping", (void **) &dBodyGetLinearDamping},
+// {"dBodySetLinearDamping", (void **) &dBodySetLinearDamping},
+// {"dBodyGetAngularDamping", (void **) &dBodyGetAngularDamping},
+// {"dBodySetAngularDamping", (void **) &dBodySetAngularDamping},
+// {"dBodySetDamping", (void **) &dBodySetDamping},
+// {"dBodyGetLinearDampingThreshold", (void **) &dBodyGetLinearDampingThreshold},
+// {"dBodySetLinearDampingThreshold", (void **) &dBodySetLinearDampingThreshold},
+// {"dBodyGetAngularDampingThreshold", (void **) &dBodyGetAngularDampingThreshold},
+// {"dBodySetAngularDampingThreshold", (void **) &dBodySetAngularDampingThreshold},
+// {"dBodyGetMaxAngularSpeed", (void **) &dBodyGetMaxAngularSpeed},
+// {"dBodySetMaxAngularSpeed", (void **) &dBodySetMaxAngularSpeed},
+// {"dBodyGetGyroscopicMode", (void **) &dBodyGetGyroscopicMode},
+// {"dBodySetGyroscopicMode", (void **) &dBodySetGyroscopicMode},
+ {"dJointCreateBall", (void **) &dJointCreateBall},
+ {"dJointCreateHinge", (void **) &dJointCreateHinge},
+ {"dJointCreateSlider", (void **) &dJointCreateSlider},
+ {"dJointCreateContact", (void **) &dJointCreateContact},
+ {"dJointCreateHinge2", (void **) &dJointCreateHinge2},
+ {"dJointCreateUniversal", (void **) &dJointCreateUniversal},
+// {"dJointCreatePR", (void **) &dJointCreatePR},
+// {"dJointCreatePU", (void **) &dJointCreatePU},
+// {"dJointCreatePiston", (void **) &dJointCreatePiston},
+ {"dJointCreateFixed", (void **) &dJointCreateFixed},
+// {"dJointCreateNull", (void **) &dJointCreateNull},
+// {"dJointCreateAMotor", (void **) &dJointCreateAMotor},
+// {"dJointCreateLMotor", (void **) &dJointCreateLMotor},
+// {"dJointCreatePlane2D", (void **) &dJointCreatePlane2D},
+ {"dJointDestroy", (void **) &dJointDestroy},
+ {"dJointGroupCreate", (void **) &dJointGroupCreate},
+ {"dJointGroupDestroy", (void **) &dJointGroupDestroy},
+ {"dJointGroupEmpty", (void **) &dJointGroupEmpty},
+// {"dJointGetNumBodies", (void **) &dJointGetNumBodies},
+ {"dJointAttach", (void **) &dJointAttach},
+// {"dJointEnable", (void **) &dJointEnable},
+// {"dJointDisable", (void **) &dJointDisable},
+// {"dJointIsEnabled", (void **) &dJointIsEnabled},
+ {"dJointSetData", (void **) &dJointSetData},
+ {"dJointGetData", (void **) &dJointGetData},
+// {"dJointGetType", (void **) &dJointGetType},
+ {"dJointGetBody", (void **) &dJointGetBody},
+// {"dJointSetFeedback", (void **) &dJointSetFeedback},
+// {"dJointGetFeedback", (void **) &dJointGetFeedback},
+ {"dJointSetBallAnchor", (void **) &dJointSetBallAnchor},
+// {"dJointSetBallAnchor2", (void **) &dJointSetBallAnchor2},
+ {"dJointSetBallParam", (void **) &dJointSetBallParam},
+ {"dJointSetHingeAnchor", (void **) &dJointSetHingeAnchor},
+// {"dJointSetHingeAnchorDelta", (void **) &dJointSetHingeAnchorDelta},
+ {"dJointSetHingeAxis", (void **) &dJointSetHingeAxis},
+// {"dJointSetHingeAxisOffset", (void **) &dJointSetHingeAxisOffset},
+ {"dJointSetHingeParam", (void **) &dJointSetHingeParam},
+// {"dJointAddHingeTorque", (void **) &dJointAddHingeTorque},
+ {"dJointSetSliderAxis", (void **) &dJointSetSliderAxis},
+// {"dJointSetSliderAxisDelta", (void **) &dJointSetSliderAxisDelta},
+ {"dJointSetSliderParam", (void **) &dJointSetSliderParam},
+// {"dJointAddSliderForce", (void **) &dJointAddSliderForce},
+ {"dJointSetHinge2Anchor", (void **) &dJointSetHinge2Anchor},
+ {"dJointSetHinge2Axis1", (void **) &dJointSetHinge2Axis1},
+ {"dJointSetHinge2Axis2", (void **) &dJointSetHinge2Axis2},
+ {"dJointSetHinge2Param", (void **) &dJointSetHinge2Param},
+// {"dJointAddHinge2Torques", (void **) &dJointAddHinge2Torques},
+ {"dJointSetUniversalAnchor", (void **) &dJointSetUniversalAnchor},
+ {"dJointSetUniversalAxis1", (void **) &dJointSetUniversalAxis1},
+// {"dJointSetUniversalAxis1Offset", (void **) &dJointSetUniversalAxis1Offset},
+ {"dJointSetUniversalAxis2", (void **) &dJointSetUniversalAxis2},
+// {"dJointSetUniversalAxis2Offset", (void **) &dJointSetUniversalAxis2Offset},
+ {"dJointSetUniversalParam", (void **) &dJointSetUniversalParam},
+// {"dJointAddUniversalTorques", (void **) &dJointAddUniversalTorques},
+// {"dJointSetPRAnchor", (void **) &dJointSetPRAnchor},
+// {"dJointSetPRAxis1", (void **) &dJointSetPRAxis1},
+// {"dJointSetPRAxis2", (void **) &dJointSetPRAxis2},
+// {"dJointSetPRParam", (void **) &dJointSetPRParam},
+// {"dJointAddPRTorque", (void **) &dJointAddPRTorque},
+// {"dJointSetPUAnchor", (void **) &dJointSetPUAnchor},
+// {"dJointSetPUAnchorOffset", (void **) &dJointSetPUAnchorOffset},
+// {"dJointSetPUAxis1", (void **) &dJointSetPUAxis1},
+// {"dJointSetPUAxis2", (void **) &dJointSetPUAxis2},
+// {"dJointSetPUAxis3", (void **) &dJointSetPUAxis3},
+// {"dJointSetPUAxisP", (void **) &dJointSetPUAxisP},
+// {"dJointSetPUParam", (void **) &dJointSetPUParam},
+// {"dJointAddPUTorque", (void **) &dJointAddPUTorque},
+// {"dJointSetPistonAnchor", (void **) &dJointSetPistonAnchor},
+// {"dJointSetPistonAnchorOffset", (void **) &dJointSetPistonAnchorOffset},
+// {"dJointSetPistonParam", (void **) &dJointSetPistonParam},
+// {"dJointAddPistonForce", (void **) &dJointAddPistonForce},
+// {"dJointSetFixed", (void **) &dJointSetFixed},
+// {"dJointSetFixedParam", (void **) &dJointSetFixedParam},
+// {"dJointSetAMotorNumAxes", (void **) &dJointSetAMotorNumAxes},
+// {"dJointSetAMotorAxis", (void **) &dJointSetAMotorAxis},
+// {"dJointSetAMotorAngle", (void **) &dJointSetAMotorAngle},
+// {"dJointSetAMotorParam", (void **) &dJointSetAMotorParam},
+// {"dJointSetAMotorMode", (void **) &dJointSetAMotorMode},
+// {"dJointAddAMotorTorques", (void **) &dJointAddAMotorTorques},
+// {"dJointSetLMotorNumAxes", (void **) &dJointSetLMotorNumAxes},
+// {"dJointSetLMotorAxis", (void **) &dJointSetLMotorAxis},
+// {"dJointSetLMotorParam", (void **) &dJointSetLMotorParam},
+// {"dJointSetPlane2DXParam", (void **) &dJointSetPlane2DXParam},
+// {"dJointSetPlane2DYParam", (void **) &dJointSetPlane2DYParam},
+// {"dJointSetPlane2DAngleParam", (void **) &dJointSetPlane2DAngleParam},
+// {"dJointGetBallAnchor", (void **) &dJointGetBallAnchor},
+// {"dJointGetBallAnchor2", (void **) &dJointGetBallAnchor2},
+// {"dJointGetBallParam", (void **) &dJointGetBallParam},
+// {"dJointGetHingeAnchor", (void **) &dJointGetHingeAnchor},
+// {"dJointGetHingeAnchor2", (void **) &dJointGetHingeAnchor2},
+// {"dJointGetHingeAxis", (void **) &dJointGetHingeAxis},
+// {"dJointGetHingeParam", (void **) &dJointGetHingeParam},
+// {"dJointGetHingeAngle", (void **) &dJointGetHingeAngle},
+// {"dJointGetHingeAngleRate", (void **) &dJointGetHingeAngleRate},
+// {"dJointGetSliderPosition", (void **) &dJointGetSliderPosition},
+// {"dJointGetSliderPositionRate", (void **) &dJointGetSliderPositionRate},
+// {"dJointGetSliderAxis", (void **) &dJointGetSliderAxis},
+// {"dJointGetSliderParam", (void **) &dJointGetSliderParam},
+// {"dJointGetHinge2Anchor", (void **) &dJointGetHinge2Anchor},
+// {"dJointGetHinge2Anchor2", (void **) &dJointGetHinge2Anchor2},
+// {"dJointGetHinge2Axis1", (void **) &dJointGetHinge2Axis1},
+// {"dJointGetHinge2Axis2", (void **) &dJointGetHinge2Axis2},
+// {"dJointGetHinge2Param", (void **) &dJointGetHinge2Param},
+// {"dJointGetHinge2Angle1", (void **) &dJointGetHinge2Angle1},
+// {"dJointGetHinge2Angle1Rate", (void **) &dJointGetHinge2Angle1Rate},
+// {"dJointGetHinge2Angle2Rate", (void **) &dJointGetHinge2Angle2Rate},
+// {"dJointGetUniversalAnchor", (void **) &dJointGetUniversalAnchor},
+// {"dJointGetUniversalAnchor2", (void **) &dJointGetUniversalAnchor2},
+// {"dJointGetUniversalAxis1", (void **) &dJointGetUniversalAxis1},
+// {"dJointGetUniversalAxis2", (void **) &dJointGetUniversalAxis2},
+// {"dJointGetUniversalParam", (void **) &dJointGetUniversalParam},
+// {"dJointGetUniversalAngles", (void **) &dJointGetUniversalAngles},
+// {"dJointGetUniversalAngle1", (void **) &dJointGetUniversalAngle1},
+// {"dJointGetUniversalAngle2", (void **) &dJointGetUniversalAngle2},
+// {"dJointGetUniversalAngle1Rate", (void **) &dJointGetUniversalAngle1Rate},
+// {"dJointGetUniversalAngle2Rate", (void **) &dJointGetUniversalAngle2Rate},
+// {"dJointGetPRAnchor", (void **) &dJointGetPRAnchor},
+// {"dJointGetPRPosition", (void **) &dJointGetPRPosition},
+// {"dJointGetPRPositionRate", (void **) &dJointGetPRPositionRate},
+// {"dJointGetPRAngle", (void **) &dJointGetPRAngle},
+// {"dJointGetPRAngleRate", (void **) &dJointGetPRAngleRate},
+// {"dJointGetPRAxis1", (void **) &dJointGetPRAxis1},
+// {"dJointGetPRAxis2", (void **) &dJointGetPRAxis2},
+// {"dJointGetPRParam", (void **) &dJointGetPRParam},
+// {"dJointGetPUAnchor", (void **) &dJointGetPUAnchor},
+// {"dJointGetPUPosition", (void **) &dJointGetPUPosition},
+// {"dJointGetPUPositionRate", (void **) &dJointGetPUPositionRate},
+// {"dJointGetPUAxis1", (void **) &dJointGetPUAxis1},
+// {"dJointGetPUAxis2", (void **) &dJointGetPUAxis2},
+// {"dJointGetPUAxis3", (void **) &dJointGetPUAxis3},
+// {"dJointGetPUAxisP", (void **) &dJointGetPUAxisP},
+// {"dJointGetPUAngles", (void **) &dJointGetPUAngles},
+// {"dJointGetPUAngle1", (void **) &dJointGetPUAngle1},
+// {"dJointGetPUAngle1Rate", (void **) &dJointGetPUAngle1Rate},
+// {"dJointGetPUAngle2", (void **) &dJointGetPUAngle2},
+// {"dJointGetPUAngle2Rate", (void **) &dJointGetPUAngle2Rate},
+// {"dJointGetPUParam", (void **) &dJointGetPUParam},
+// {"dJointGetPistonPosition", (void **) &dJointGetPistonPosition},
+// {"dJointGetPistonPositionRate", (void **) &dJointGetPistonPositionRate},
+// {"dJointGetPistonAngle", (void **) &dJointGetPistonAngle},
+// {"dJointGetPistonAngleRate", (void **) &dJointGetPistonAngleRate},
+// {"dJointGetPistonAnchor", (void **) &dJointGetPistonAnchor},
+// {"dJointGetPistonAnchor2", (void **) &dJointGetPistonAnchor2},
+// {"dJointGetPistonAxis", (void **) &dJointGetPistonAxis},
+// {"dJointGetPistonParam", (void **) &dJointGetPistonParam},
+// {"dJointGetAMotorNumAxes", (void **) &dJointGetAMotorNumAxes},
+// {"dJointGetAMotorAxis", (void **) &dJointGetAMotorAxis},
+// {"dJointGetAMotorAxisRel", (void **) &dJointGetAMotorAxisRel},
+// {"dJointGetAMotorAngle", (void **) &dJointGetAMotorAngle},
+// {"dJointGetAMotorAngleRate", (void **) &dJointGetAMotorAngleRate},
+// {"dJointGetAMotorParam", (void **) &dJointGetAMotorParam},
+// {"dJointGetAMotorMode", (void **) &dJointGetAMotorMode},
+// {"dJointGetLMotorNumAxes", (void **) &dJointGetLMotorNumAxes},
+// {"dJointGetLMotorAxis", (void **) &dJointGetLMotorAxis},
+// {"dJointGetLMotorParam", (void **) &dJointGetLMotorParam},
+// {"dJointGetFixedParam", (void **) &dJointGetFixedParam},
+// {"dConnectingJoint", (void **) &dConnectingJoint},
+// {"dConnectingJointList", (void **) &dConnectingJointList},
+ {"dAreConnected", (void **) &dAreConnected},
+ {"dAreConnectedExcluding", (void **) &dAreConnectedExcluding},
+ {"dSimpleSpaceCreate", (void **) &dSimpleSpaceCreate},
+ {"dHashSpaceCreate", (void **) &dHashSpaceCreate},
+ {"dQuadTreeSpaceCreate", (void **) &dQuadTreeSpaceCreate},
+// {"dSweepAndPruneSpaceCreate", (void **) &dSweepAndPruneSpaceCreate},
+ {"dSpaceDestroy", (void **) &dSpaceDestroy},
+// {"dHashSpaceSetLevels", (void **) &dHashSpaceSetLevels},
+// {"dHashSpaceGetLevels", (void **) &dHashSpaceGetLevels},
+// {"dSpaceSetCleanup", (void **) &dSpaceSetCleanup},
+// {"dSpaceGetCleanup", (void **) &dSpaceGetCleanup},
+// {"dSpaceSetSublevel", (void **) &dSpaceSetSublevel},
+// {"dSpaceGetSublevel", (void **) &dSpaceGetSublevel},
+// {"dSpaceSetManualCleanup", (void **) &dSpaceSetManualCleanup},
+// {"dSpaceGetManualCleanup", (void **) &dSpaceGetManualCleanup},
+// {"dSpaceAdd", (void **) &dSpaceAdd},
+// {"dSpaceRemove", (void **) &dSpaceRemove},
+// {"dSpaceQuery", (void **) &dSpaceQuery},
+// {"dSpaceClean", (void **) &dSpaceClean},
+// {"dSpaceGetNumGeoms", (void **) &dSpaceGetNumGeoms},
+// {"dSpaceGetGeom", (void **) &dSpaceGetGeom},
+// {"dSpaceGetClass", (void **) &dSpaceGetClass},
+ {"dGeomDestroy", (void **) &dGeomDestroy},
+ {"dGeomSetData", (void **) &dGeomSetData},
+ {"dGeomGetData", (void **) &dGeomGetData},
+ {"dGeomSetBody", (void **) &dGeomSetBody},
+ {"dGeomGetBody", (void **) &dGeomGetBody},
+ {"dGeomSetPosition", (void **) &dGeomSetPosition},
+ {"dGeomSetRotation", (void **) &dGeomSetRotation},
+// {"dGeomSetQuaternion", (void **) &dGeomSetQuaternion},
+// {"dGeomGetPosition", (void **) &dGeomGetPosition},
+// {"dGeomCopyPosition", (void **) &dGeomCopyPosition},
+// {"dGeomGetRotation", (void **) &dGeomGetRotation},
+// {"dGeomCopyRotation", (void **) &dGeomCopyRotation},
+// {"dGeomGetQuaternion", (void **) &dGeomGetQuaternion},
+// {"dGeomGetAABB", (void **) &dGeomGetAABB},
+ {"dGeomIsSpace", (void **) &dGeomIsSpace},
+// {"dGeomGetSpace", (void **) &dGeomGetSpace},
+// {"dGeomGetClass", (void **) &dGeomGetClass},
+// {"dGeomSetCategoryBits", (void **) &dGeomSetCategoryBits},
+// {"dGeomSetCollideBits", (void **) &dGeomSetCollideBits},
+// {"dGeomGetCategoryBits", (void **) &dGeomGetCategoryBits},
+// {"dGeomGetCollideBits", (void **) &dGeomGetCollideBits},
+// {"dGeomEnable", (void **) &dGeomEnable},
+// {"dGeomDisable", (void **) &dGeomDisable},
+// {"dGeomIsEnabled", (void **) &dGeomIsEnabled},
+// {"dGeomSetOffsetPosition", (void **) &dGeomSetOffsetPosition},
+// {"dGeomSetOffsetRotation", (void **) &dGeomSetOffsetRotation},
+// {"dGeomSetOffsetQuaternion", (void **) &dGeomSetOffsetQuaternion},
+// {"dGeomSetOffsetWorldPosition", (void **) &dGeomSetOffsetWorldPosition},
+// {"dGeomSetOffsetWorldRotation", (void **) &dGeomSetOffsetWorldRotation},
+// {"dGeomSetOffsetWorldQuaternion", (void **) &dGeomSetOffsetWorldQuaternion},
+// {"dGeomClearOffset", (void **) &dGeomClearOffset},
+// {"dGeomIsOffset", (void **) &dGeomIsOffset},
+// {"dGeomGetOffsetPosition", (void **) &dGeomGetOffsetPosition},
+// {"dGeomCopyOffsetPosition", (void **) &dGeomCopyOffsetPosition},
+// {"dGeomGetOffsetRotation", (void **) &dGeomGetOffsetRotation},
+// {"dGeomCopyOffsetRotation", (void **) &dGeomCopyOffsetRotation},
+// {"dGeomGetOffsetQuaternion", (void **) &dGeomGetOffsetQuaternion},
+ {"dCollide", (void **) &dCollide},
+ {"dSpaceCollide", (void **) &dSpaceCollide},
+ {"dSpaceCollide2", (void **) &dSpaceCollide2},
+ {"dCreateSphere", (void **) &dCreateSphere},
+// {"dGeomSphereSetRadius", (void **) &dGeomSphereSetRadius},
+// {"dGeomSphereGetRadius", (void **) &dGeomSphereGetRadius},
+// {"dGeomSpherePointDepth", (void **) &dGeomSpherePointDepth},
+// {"dCreateConvex", (void **) &dCreateConvex},
+// {"dGeomSetConvex", (void **) &dGeomSetConvex},
+ {"dCreateBox", (void **) &dCreateBox},
+// {"dGeomBoxSetLengths", (void **) &dGeomBoxSetLengths},
+// {"dGeomBoxGetLengths", (void **) &dGeomBoxGetLengths},
+// {"dGeomBoxPointDepth", (void **) &dGeomBoxPointDepth},
+// {"dGeomBoxPointDepth", (void **) &dGeomBoxPointDepth},
+// {"dCreatePlane", (void **) &dCreatePlane},
+// {"dGeomPlaneSetParams", (void **) &dGeomPlaneSetParams},
+// {"dGeomPlaneGetParams", (void **) &dGeomPlaneGetParams},
+// {"dGeomPlanePointDepth", (void **) &dGeomPlanePointDepth},
+ {"dCreateCapsule", (void **) &dCreateCapsule},
+// {"dGeomCapsuleSetParams", (void **) &dGeomCapsuleSetParams},
+// {"dGeomCapsuleGetParams", (void **) &dGeomCapsuleGetParams},
+// {"dGeomCapsulePointDepth", (void **) &dGeomCapsulePointDepth},
+// {"dCreateCylinder", (void **) &dCreateCylinder},
+// {"dGeomCylinderSetParams", (void **) &dGeomCylinderSetParams},
+// {"dGeomCylinderGetParams", (void **) &dGeomCylinderGetParams},
+// {"dCreateRay", (void **) &dCreateRay},
+// {"dGeomRaySetLength", (void **) &dGeomRaySetLength},
+// {"dGeomRayGetLength", (void **) &dGeomRayGetLength},
+// {"dGeomRaySet", (void **) &dGeomRaySet},
+// {"dGeomRayGet", (void **) &dGeomRayGet},
+ {"dCreateGeomTransform", (void **) &dCreateGeomTransform},
+ {"dGeomTransformSetGeom", (void **) &dGeomTransformSetGeom},
+// {"dGeomTransformGetGeom", (void **) &dGeomTransformGetGeom},
+ {"dGeomTransformSetCleanup", (void **) &dGeomTransformSetCleanup},
+// {"dGeomTransformGetCleanup", (void **) &dGeomTransformGetCleanup},
+// {"dGeomTransformSetInfo", (void **) &dGeomTransformSetInfo},
+// {"dGeomTransformGetInfo", (void **) &dGeomTransformGetInfo},
+ {"dGeomTriMeshDataCreate", (void **) &dGeomTriMeshDataCreate},
+ {"dGeomTriMeshDataDestroy", (void **) &dGeomTriMeshDataDestroy},
+// {"dGeomTriMeshDataSet", (void **) &dGeomTriMeshDataSet},
+// {"dGeomTriMeshDataGet", (void **) &dGeomTriMeshDataGet},
+// {"dGeomTriMeshSetLastTransform", (void **) &dGeomTriMeshSetLastTransform},
+// {"dGeomTriMeshGetLastTransform", (void **) &dGeomTriMeshGetLastTransform},
+ {"dGeomTriMeshDataBuildSingle", (void **) &dGeomTriMeshDataBuildSingle},
+// {"dGeomTriMeshDataBuildSingle1", (void **) &dGeomTriMeshDataBuildSingle1},
+// {"dGeomTriMeshDataBuildDouble", (void **) &dGeomTriMeshDataBuildDouble},
+// {"dGeomTriMeshDataBuildDouble1", (void **) &dGeomTriMeshDataBuildDouble1},
+// {"dGeomTriMeshDataBuildSimple", (void **) &dGeomTriMeshDataBuildSimple},
+// {"dGeomTriMeshDataBuildSimple1", (void **) &dGeomTriMeshDataBuildSimple1},
+// {"dGeomTriMeshDataPreprocess", (void **) &dGeomTriMeshDataPreprocess},
+// {"dGeomTriMeshDataGetBuffer", (void **) &dGeomTriMeshDataGetBuffer},
+// {"dGeomTriMeshDataSetBuffer", (void **) &dGeomTriMeshDataSetBuffer},
+// {"dGeomTriMeshSetCallback", (void **) &dGeomTriMeshSetCallback},
+// {"dGeomTriMeshGetCallback", (void **) &dGeomTriMeshGetCallback},
+// {"dGeomTriMeshSetArrayCallback", (void **) &dGeomTriMeshSetArrayCallback},
+// {"dGeomTriMeshGetArrayCallback", (void **) &dGeomTriMeshGetArrayCallback},
+// {"dGeomTriMeshSetRayCallback", (void **) &dGeomTriMeshSetRayCallback},
+// {"dGeomTriMeshGetRayCallback", (void **) &dGeomTriMeshGetRayCallback},
+// {"dGeomTriMeshSetTriMergeCallback", (void **) &dGeomTriMeshSetTriMergeCallback},
+// {"dGeomTriMeshGetTriMergeCallback", (void **) &dGeomTriMeshGetTriMergeCallback},
+ {"dCreateTriMesh", (void **) &dCreateTriMesh},
+// {"dGeomTriMeshSetData", (void **) &dGeomTriMeshSetData},
+// {"dGeomTriMeshGetData", (void **) &dGeomTriMeshGetData},
+// {"dGeomTriMeshEnableTC", (void **) &dGeomTriMeshEnableTC},
+// {"dGeomTriMeshIsTCEnabled", (void **) &dGeomTriMeshIsTCEnabled},
+// {"dGeomTriMeshClearTCCache", (void **) &dGeomTriMeshClearTCCache},
+// {"dGeomTriMeshGetTriMeshDataID", (void **) &dGeomTriMeshGetTriMeshDataID},
+// {"dGeomTriMeshGetTriangle", (void **) &dGeomTriMeshGetTriangle},
+// {"dGeomTriMeshGetPoint", (void **) &dGeomTriMeshGetPoint},
+// {"dGeomTriMeshGetTriangleCount", (void **) &dGeomTriMeshGetTriangleCount},
+// {"dGeomTriMeshDataUpdate", (void **) &dGeomTriMeshDataUpdate},
+ {NULL, NULL}
+};
+
+// Handle for ODE DLL
+dllhandle_t ode_dll = NULL;
+#endif
+#endif
+
+static void World_Physics_Init(void)
+{
+#ifdef USEODE
+#ifdef ODE_DYNAMIC
+ const char* dllnames [] =