collision.h | collision.h | |||
---|---|---|---|---|
skipping to change at line 586 | skipping to change at line 586 | |||
* | * | |||
* @param geom the geom to query. | * @param geom the geom to query. | |||
* @param result a copy of the rotation quaternion. | * @param result a copy of the rotation quaternion. | |||
* @ingroup collide | * @ingroup collide | |||
*/ | */ | |||
ODE_API void dGeomGetOffsetQuaternion (dGeomID geom, dQuaternion result); | ODE_API void dGeomGetOffsetQuaternion (dGeomID geom, dQuaternion result); | |||
/* ************************************************************************ */ | /* ************************************************************************ */ | |||
/* collision detection */ | /* collision detection */ | |||
/* | ||||
* Just generate any contacts (disables any contact refining). | ||||
*/ | ||||
#define CONTACTS_UNIMPORTANT 0x80000000 | ||||
/** | /** | |||
* | * | |||
* @brief Given two geoms o1 and o2 that potentially intersect, | * @brief Given two geoms o1 and o2 that potentially intersect, | |||
* generate contact information for them. | * generate contact information for them. | |||
* | * | |||
* Internally, this just calls the correct class-specific collision | * Internally, this just calls the correct class-specific collision | |||
* functions for o1 and o2. | * functions for o1 and o2. | |||
* | * | |||
* @param o1 The first geom to test. | * @param o1 The first geom to test. | |||
* @param o2 The second geom to test. | * @param o2 The second geom to test. | |||
* | * | |||
* @param flags The flags specify how contacts should be generated if | * @param flags The flags specify how contacts should be generated if | |||
* the geoms touch. The lower 16 bits of flags is an integer that | * the geoms touch. The lower 16 bits of flags is an integer that | |||
* specifies the maximum number of contact points to generate. Note | * specifies the maximum number of contact points to generate. You must | |||
* that if this number is zero, this function just pretends that it is | * ask for at least one contact. | |||
* one -- in other words you can not ask for zero contacts. All other bits | * Additionally, following bits may be set: | |||
* in flags must be zero. In the future the other bits may be used to | * CONTACTS_UNIMPORTANT -- just generate any contacts (skip contact refinin | |||
* select from different contact generation strategies. | g). | |||
* All other bits in flags must be set to zero. In the future the other bit | ||||
s | ||||
* may be used to select from different contact generation strategies. | ||||
* | * | |||
* @param contact Points to an array of dContactGeom structures. The array | * @param contact Points to an array of dContactGeom structures. The array | |||
* must be able to hold at least the maximum number of contacts. These | * must be able to hold at least the maximum number of contacts. These | |||
* dContactGeom structures may be embedded within larger structures in the | * dContactGeom structures may be embedded within larger structures in the | |||
* array -- the skip parameter is the byte offset from one dContactGeom to | * array -- the skip parameter is the byte offset from one dContactGeom to | |||
* the next in the array. If skip is sizeof(dContactGeom) then contact | * the next in the array. If skip is sizeof(dContactGeom) then contact | |||
* points to a normal (C-style) array. It is an error for skip to be smalle r | * points to a normal (C-style) array. It is an error for skip to be smalle r | |||
* than sizeof(dContactGeom). | * than sizeof(dContactGeom). | |||
* | * | |||
* @returns If the geoms intersect, this function returns the number of con tact | * @returns If the geoms intersect, this function returns the number of con tact | |||
skipping to change at line 1280 | skipping to change at line 1286 | |||
/* utility functions */ | /* utility functions */ | |||
ODE_API void dClosestLineSegmentPoints (const dVector3 a1, const dVector3 a 2, | ODE_API void dClosestLineSegmentPoints (const dVector3 a1, const dVector3 a 2, | |||
const dVector3 b1, const dVector3 b2, | const dVector3 b1, const dVector3 b2, | |||
dVector3 cp1, dVector3 cp2); | dVector3 cp1, dVector3 cp2); | |||
ODE_API int dBoxTouchesBox (const dVector3 _p1, const dMatrix3 R1, | ODE_API int dBoxTouchesBox (const dVector3 _p1, const dMatrix3 R1, | |||
const dVector3 side1, const dVector3 _p2, | const dVector3 side1, const dVector3 _p2, | |||
const dMatrix3 R2, const dVector3 side2); | const dMatrix3 R2, const dVector3 side2); | |||
// The meaning of flags parameter is the same as in dCollide() | ||||
ODE_API int dBoxBox (const dVector3 p1, const dMatrix3 R1, | ODE_API int dBoxBox (const dVector3 p1, const dMatrix3 R1, | |||
const dVector3 side1, const dVector3 p2, | const dVector3 side1, const dVector3 p2, | |||
const dMatrix3 R2, const dVector3 side2, | const dMatrix3 R2, const dVector3 side2, | |||
dVector3 normal, dReal *depth, int *return_code, | dVector3 normal, dReal *depth, int *return_code, | |||
int maxc, dContactGeom *contact, int skip); | int flags, dContactGeom *contact, int skip); | |||
ODE_API void dInfiniteAABB (dGeomID geom, dReal aabb[6]); | ODE_API void dInfiniteAABB (dGeomID geom, dReal aabb[6]); | |||
ODE_API void dInitODE(void); | ODE_API void dInitODE(void); | |||
ODE_API void dCloseODE(void); | ODE_API void dCloseODE(void); | |||
/* ************************************************************************ */ | /* ************************************************************************ */ | |||
/* custom classes */ | /* custom classes */ | |||
typedef void dGetAABBFn (dGeomID, dReal aabb[6]); | typedef void dGetAABBFn (dGeomID, dReal aabb[6]); | |||
typedef int dColliderFn (dGeomID o1, dGeomID o2, | typedef int dColliderFn (dGeomID o1, dGeomID o2, | |||
End of changes. 4 change blocks. | ||||
6 lines changed or deleted | 15 lines changed or added | |||
common.h | common.h | |||
---|---|---|---|---|
skipping to change at line 92 | skipping to change at line 92 | |||
#define dDEBUGMSG(msg) dMessage (d_ERR_UASSERT, \ | #define dDEBUGMSG(msg) dMessage (d_ERR_UASSERT, \ | |||
msg " (%s:%d)", __FILE__,__LINE__); | msg " (%s:%d)", __FILE__,__LINE__); | |||
#endif | #endif | |||
#else | #else | |||
#define dIASSERT(a) ; | #define dIASSERT(a) ; | |||
#define dUASSERT(a,msg) ; | #define dUASSERT(a,msg) ; | |||
#define dDEBUGMSG(msg) ; | #define dDEBUGMSG(msg) ; | |||
#endif | #endif | |||
#define dAASSERT(a) dUASSERT(a,"Bad argument(s)") | #define dAASSERT(a) dUASSERT(a,"Bad argument(s)") | |||
// Macro used to suppress unused variable warning | ||||
#define dVARIABLEUSED(a) ((void)a) | ||||
/* floating point data type, vector, matrix and quaternion types */ | /* floating point data type, vector, matrix and quaternion types */ | |||
#if defined(dSINGLE) | #if defined(dSINGLE) | |||
typedef float dReal; | typedef float dReal; | |||
#ifdef dDOUBLE | #ifdef dDOUBLE | |||
#error You can only #define dSINGLE or dDOUBLE, not both. | #error You can only #define dSINGLE or dDOUBLE, not both. | |||
#endif // dDOUBLE | #endif // dDOUBLE | |||
#elif defined(dDOUBLE) | #elif defined(dDOUBLE) | |||
typedef double dReal; | typedef double dReal; | |||
#else | #else | |||
#error You must #define dSINGLE or dDOUBLE | #error You must #define dSINGLE or dDOUBLE | |||
#endif | #endif | |||
// Detect if we've got both trimesh engines enabled. | ||||
#if dTRIMESH_ENABLED | ||||
#if dTRIMESH_OPCODE && dTRIMESH_GIMPACT | ||||
#error You can only #define dTRIMESH_OPCODE or dTRIMESH_GIMPACT, not both. | ||||
#endif | ||||
#endif // dTRIMESH_ENABLED | ||||
/* round an integer up to a multiple of 4, except that 0 and 1 are unmodifi ed | /* round an integer up to a multiple of 4, except that 0 and 1 are unmodifi ed | |||
* (used to compute matrix leading dimensions) | * (used to compute matrix leading dimensions) | |||
*/ | */ | |||
#define dPAD(a) (((a) > 1) ? ((((a)-1)|3)+1) : (a)) | #define dPAD(a) (((a) > 1) ? ((((a)-1)|3)+1) : (a)) | |||
/* these types are mainly just used in headers */ | /* these types are mainly just used in headers */ | |||
typedef dReal dVector3[4]; | typedef dReal dVector3[4]; | |||
typedef dReal dVector4[4]; | typedef dReal dVector4[4]; | |||
typedef dReal dMatrix3[4*3]; | typedef dReal dMatrix3[4*3]; | |||
typedef dReal dMatrix4[4*4]; | typedef dReal dMatrix4[4*4]; | |||
skipping to change at line 131 | skipping to change at line 141 | |||
#define REAL(x) (x ## f) /* form a co nstant */ | #define REAL(x) (x ## f) /* form a co nstant */ | |||
#define dRecip(x) ((1.0f/(x))) /* reciprocal */ | #define dRecip(x) ((1.0f/(x))) /* reciprocal */ | |||
#define dSqrt(x) (sqrtf(x)) /* square root */ | #define dSqrt(x) (sqrtf(x)) /* square root */ | |||
#define dRecipSqrt(x) ((1.0f/sqrtf(x))) /* reciprocal square root */ | #define dRecipSqrt(x) ((1.0f/sqrtf(x))) /* reciprocal square root */ | |||
#define dSin(x) (sinf(x)) /* sine */ | #define dSin(x) (sinf(x)) /* sine */ | |||
#define dCos(x) (cosf(x)) /* cosine */ | #define dCos(x) (cosf(x)) /* cosine */ | |||
#define dFabs(x) (fabsf(x)) /* absolute value */ | #define dFabs(x) (fabsf(x)) /* absolute value */ | |||
#define dAtan2(y,x) (atan2f(y,x)) /* arc tangent with 2 args * / | #define dAtan2(y,x) (atan2f(y,x)) /* arc tangent with 2 args * / | |||
#define dFMod(a,b) (fmodf(a,b)) /* modulo */ | #define dFMod(a,b) (fmodf(a,b)) /* modulo */ | |||
#define dFloor(x) floorf(x) /* floor */ | ||||
#ifdef HAVE___ISNANF | #ifdef HAVE___ISNANF | |||
#define dIsNan(x) (__isnanf(x)) | #define dIsNan(x) (__isnanf(x)) | |||
#elif defined(HAVE__ISNANF) | #elif defined(HAVE__ISNANF) | |||
#define dIsNan(x) (_isnanf(x)) | #define dIsNan(x) (_isnanf(x)) | |||
#elif defined(HAVE_ISNANF) | #elif defined(HAVE_ISNANF) | |||
#define dIsNan(x) (isnanf(x)) | #define dIsNan(x) (isnanf(x)) | |||
#else | #else | |||
/* | /* | |||
fall back to _isnan which is the VC way, | fall back to _isnan which is the VC way, | |||
skipping to change at line 164 | skipping to change at line 175 | |||
#define REAL(x) (x) | #define REAL(x) (x) | |||
#define dRecip(x) (1.0/(x)) | #define dRecip(x) (1.0/(x)) | |||
#define dSqrt(x) sqrt(x) | #define dSqrt(x) sqrt(x) | |||
#define dRecipSqrt(x) (1.0/sqrt(x)) | #define dRecipSqrt(x) (1.0/sqrt(x)) | |||
#define dSin(x) sin(x) | #define dSin(x) sin(x) | |||
#define dCos(x) cos(x) | #define dCos(x) cos(x) | |||
#define dFabs(x) fabs(x) | #define dFabs(x) fabs(x) | |||
#define dAtan2(y,x) atan2((y),(x)) | #define dAtan2(y,x) atan2((y),(x)) | |||
#define dFMod(a,b) (fmod((a),(b))) | #define dFMod(a,b) (fmod((a),(b))) | |||
#define dFloor(x) floor(x) | ||||
#ifdef HAVE___ISNAN | #ifdef HAVE___ISNAN | |||
#define dIsNan(x) (__isnan(x)) | #define dIsNan(x) (__isnan(x)) | |||
#elif defined(HAVE__ISNAN) | #elif defined(HAVE__ISNAN) | |||
#define dIsNan(x) (_isnan(x)) | #define dIsNan(x) (_isnan(x)) | |||
#elif defined(HAVE_ISNAN) | #elif defined(HAVE_ISNAN) | |||
#define dIsNan(x) (isnan(x)) | #define dIsNan(x) (isnan(x)) | |||
#else | #else | |||
#define dIsNan(x) (_isnan(x)) | #define dIsNan(x) (_isnan(x)) | |||
#endif | #endif | |||
skipping to change at line 297 | skipping to change at line 310 | |||
dParamHiStop, \ | dParamHiStop, \ | |||
dParamVel, \ | dParamVel, \ | |||
dParamFMax, \ | dParamFMax, \ | |||
dParamFudgeFactor, \ | dParamFudgeFactor, \ | |||
dParamBounce, \ | dParamBounce, \ | |||
dParamCFM, \ | dParamCFM, \ | |||
dParamStopERP, \ | dParamStopERP, \ | |||
dParamStopCFM, \ | dParamStopCFM, \ | |||
/* parameters for suspension */ \ | /* parameters for suspension */ \ | |||
dParamSuspensionERP, \ | dParamSuspensionERP, \ | |||
dParamSuspensionCFM, | dParamSuspensionCFM, \ | |||
dParamERP, \ | ||||
#define D_ALL_PARAM_NAMES_X(start,x) \ | #define D_ALL_PARAM_NAMES_X(start,x) \ | |||
/* parameters for limits and motors */ \ | /* parameters for limits and motors */ \ | |||
dParamLoStop ## x = start, \ | dParamLoStop ## x = start, \ | |||
dParamHiStop ## x, \ | dParamHiStop ## x, \ | |||
dParamVel ## x, \ | dParamVel ## x, \ | |||
dParamFMax ## x, \ | dParamFMax ## x, \ | |||
dParamFudgeFactor ## x, \ | dParamFudgeFactor ## x, \ | |||
dParamBounce ## x, \ | dParamBounce ## x, \ | |||
dParamCFM ## x, \ | dParamCFM ## x, \ | |||
dParamStopERP ## x, \ | dParamStopERP ## x, \ | |||
dParamStopCFM ## x, \ | dParamStopCFM ## x, \ | |||
/* parameters for suspension */ \ | /* parameters for suspension */ \ | |||
dParamSuspensionERP ## x, \ | dParamSuspensionERP ## x, \ | |||
dParamSuspensionCFM ## x, | dParamSuspensionCFM ## x, \ | |||
dParamERP ## x, | ||||
enum { | enum { | |||
D_ALL_PARAM_NAMES(0) | D_ALL_PARAM_NAMES(0) | |||
D_ALL_PARAM_NAMES_X(0x100,2) | D_ALL_PARAM_NAMES_X(0x100,2) | |||
D_ALL_PARAM_NAMES_X(0x200,3) | D_ALL_PARAM_NAMES_X(0x200,3) | |||
/* add a multiple of this constant to the basic parameter numbers to get | /* add a multiple of this constant to the basic parameter numbers to get | |||
* the parameters for the second, third etc axes. | * the parameters for the second, third etc axes. | |||
*/ | */ | |||
dParamGroup=0x100 | dParamGroup=0x100 | |||
End of changes. 6 change blocks. | ||||
2 lines changed or deleted | 17 lines changed or added | |||
config.h | config.h | |||
---|---|---|---|---|
skipping to change at line 196 | skipping to change at line 196 | |||
/* Name of package */ | /* Name of package */ | |||
#define PACKAGE "ODE" | #define PACKAGE "ODE" | |||
/* Define to the address where bug reports for this package should be sent. */ | /* Define to the address where bug reports for this package should be sent. */ | |||
#define PACKAGE_BUGREPORT "ode@ode.org" | #define PACKAGE_BUGREPORT "ode@ode.org" | |||
/* Define to the full name of this package. */ | /* Define to the full name of this package. */ | |||
#define PACKAGE_NAME "ODE" | #define PACKAGE_NAME "ODE" | |||
/* Define to the full name and version of this package. */ | /* Define to the full name and version of this package. */ | |||
#define PACKAGE_STRING "ODE 0.8" | #define PACKAGE_STRING "ODE 0.9.0" | |||
/* Define to the one symbol short name of this package. */ | /* Define to the one symbol short name of this package. */ | |||
#define PACKAGE_TARNAME "ode" | #define PACKAGE_TARNAME "ode" | |||
/* Define to the version of this package. */ | /* Define to the version of this package. */ | |||
#define PACKAGE_VERSION "0.8" | #define PACKAGE_VERSION "0.9.0" | |||
/* is this a pentium on a gcc-based platform? */ | /* is this a pentium on a gcc-based platform? */ | |||
#define PENTIUM 1 | #define PENTIUM 1 | |||
/* Define to the type of arg 1 for `select'. */ | /* Define to the type of arg 1 for `select'. */ | |||
#define SELECT_TYPE_ARG1 int | #define SELECT_TYPE_ARG1 int | |||
/* Define to the type of args 2, 3 and 4 for `select'. */ | /* Define to the type of args 2, 3 and 4 for `select'. */ | |||
#define SELECT_TYPE_ARG234 (fd_set *) | #define SELECT_TYPE_ARG234 (fd_set *) | |||
skipping to change at line 246 | skipping to change at line 246 | |||
automatically deduced at runtime. | automatically deduced at runtime. | |||
STACK_DIRECTION > 0 => grows toward higher addresses | STACK_DIRECTION > 0 => grows toward higher addresses | |||
STACK_DIRECTION < 0 => grows toward lower addresses | STACK_DIRECTION < 0 => grows toward lower addresses | |||
STACK_DIRECTION = 0 => direction of growth unknown */ | STACK_DIRECTION = 0 => direction of growth unknown */ | |||
/* #undef STACK_DIRECTION */ | /* #undef STACK_DIRECTION */ | |||
/* Define to 1 if you have the ANSI C header files. */ | /* Define to 1 if you have the ANSI C header files. */ | |||
#define STDC_HEADERS 1 | #define STDC_HEADERS 1 | |||
/* Version number of package */ | /* Version number of package */ | |||
#define VERSION "0.8.0" | #define VERSION "0.9.0" | |||
/* Define to 1 if your processor stores words with the most significant byt e | /* Define to 1 if your processor stores words with the most significant byt e | |||
first (like Motorola and SPARC, unlike Intel and VAX). */ | first (like Motorola and SPARC, unlike Intel and VAX). */ | |||
/* #undef WORDS_BIGENDIAN */ | /* #undef WORDS_BIGENDIAN */ | |||
/* is this a X86_64 system on a gcc-based platform? */ | /* is this a X86_64 system on a gcc-based platform? */ | |||
/* #undef X86_64_SYSTEM */ | /* #undef X86_64_SYSTEM */ | |||
/* Define to 1 if the X Window System is missing or not being used. */ | /* Define to 1 if the X Window System is missing or not being used. */ | |||
/* #undef X_DISPLAY_MISSING */ | /* #undef X_DISPLAY_MISSING */ | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added | |||
mass.h | mass.h | |||
---|---|---|---|---|
skipping to change at line 72 | skipping to change at line 72 | |||
ODE_API void dMassSetCylinderTotal (dMass *, dReal total_mass, int directio n, | ODE_API void dMassSetCylinderTotal (dMass *, dReal total_mass, int directio n, | |||
dReal radius, dReal length); | dReal radius, dReal length); | |||
ODE_API void dMassSetBox (dMass *, dReal density, | ODE_API void dMassSetBox (dMass *, dReal density, | |||
dReal lx, dReal ly, dReal lz); | dReal lx, dReal ly, dReal lz); | |||
ODE_API void dMassSetBoxTotal (dMass *, dReal total_mass, | ODE_API void dMassSetBoxTotal (dMass *, dReal total_mass, | |||
dReal lx, dReal ly, dReal lz); | dReal lx, dReal ly, dReal lz); | |||
ODE_API void dMassSetTrimesh (dMass *, dReal density, dGeomID g); | ODE_API void dMassSetTrimesh (dMass *, dReal density, dGeomID g); | |||
ODE_API void dMassSetTrimeshTotal (dMass *m, dReal total_mass, dGeomID g); | ||||
ODE_API void dMassAdjust (dMass *, dReal newmass); | ODE_API void dMassAdjust (dMass *, dReal newmass); | |||
ODE_API void dMassTranslate (dMass *, dReal x, dReal y, dReal z); | ODE_API void dMassTranslate (dMass *, dReal x, dReal y, dReal z); | |||
ODE_API void dMassRotate (dMass *, const dMatrix3 R); | ODE_API void dMassRotate (dMass *, const dMatrix3 R); | |||
ODE_API void dMassAdd (dMass *a, const dMass *b); | ODE_API void dMassAdd (dMass *a, const dMass *b); | |||
// Backwards compatible API | // Backwards compatible API | |||
#define dMassSetCappedCylinder dMassSetCapsule | #define dMassSetCappedCylinder dMassSetCapsule | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added | |||
objects.h | objects.h | |||
---|---|---|---|---|
skipping to change at line 1242 | skipping to change at line 1242 | |||
*/ | */ | |||
ODE_API void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z); | ODE_API void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z); | |||
/** | /** | |||
* @brief Set the joint anchor point. | * @brief Set the joint anchor point. | |||
* @ingroup joints | * @ingroup joints | |||
*/ | */ | |||
ODE_API void dJointSetBallAnchor2 (dJointID, dReal x, dReal y, dReal z); | ODE_API void dJointSetBallAnchor2 (dJointID, dReal x, dReal y, dReal z); | |||
/** | /** | |||
* @brief Param setting for Ball joints | ||||
* @ingroup joints | ||||
*/ | ||||
ODE_API void dJointSetBallParam (dJointID, int parameter, dReal value); | ||||
/** | ||||
* @brief Set hinge anchor parameter. | * @brief Set hinge anchor parameter. | |||
* @ingroup joints | * @ingroup joints | |||
*/ | */ | |||
ODE_API void dJointSetHingeAnchor (dJointID, dReal x, dReal y, dReal z); | ODE_API void dJointSetHingeAnchor (dJointID, dReal x, dReal y, dReal z); | |||
ODE_API void dJointSetHingeAnchorDelta (dJointID, dReal x, dReal y, dReal z , dReal ax, dReal ay, dReal az); | ODE_API void dJointSetHingeAnchorDelta (dJointID, dReal x, dReal y, dReal z , dReal ax, dReal ay, dReal az); | |||
/** | /** | |||
* @brief Set hinge axis. | * @brief Set hinge axis. | |||
* @ingroup joints | * @ingroup joints | |||
skipping to change at line 1406 | skipping to change at line 1412 | |||
ODE_API void dJointAddPRTorque (dJointID j, dReal torque); | ODE_API void dJointAddPRTorque (dJointID j, dReal torque); | |||
/** | /** | |||
* @brief Call this on the fixed joint after it has been attached to | * @brief Call this on the fixed joint after it has been attached to | |||
* remember the current desired relative offset and desired relative | * remember the current desired relative offset and desired relative | |||
* rotation between the bodies. | * rotation between the bodies. | |||
* @ingroup joints | * @ingroup joints | |||
*/ | */ | |||
ODE_API void dJointSetFixed (dJointID); | ODE_API void dJointSetFixed (dJointID); | |||
/* | ||||
* @brief Sets joint parameter | ||||
* | ||||
* @ingroup joints | ||||
*/ | ||||
ODE_API void dJointSetFixedParam (dJointID, int parameter, dReal value); | ||||
/** | /** | |||
* @brief set the nr of axes | * @brief set the nr of axes | |||
* @param num 0..3 | * @param num 0..3 | |||
* @ingroup joints | * @ingroup joints | |||
*/ | */ | |||
ODE_API void dJointSetAMotorNumAxes (dJointID, int num); | ODE_API void dJointSetAMotorNumAxes (dJointID, int num); | |||
/** | /** | |||
* @brief set axis | * @brief set axis | |||
* @ingroup joints | * @ingroup joints | |||
skipping to change at line 1516 | skipping to change at line 1529 | |||
* This returns the point on body 2. You can think of a ball and socket | * This returns the point on body 2. You can think of a ball and socket | |||
* joint as trying to keep the result of dJointGetBallAnchor() and | * joint as trying to keep the result of dJointGetBallAnchor() and | |||
* dJointGetBallAnchor2() the same. If the joint is perfectly satisfied, | * dJointGetBallAnchor2() the same. If the joint is perfectly satisfied, | |||
* this function will return the same value as dJointGetBallAnchor() to | * this function will return the same value as dJointGetBallAnchor() to | |||
* within roundoff errors. dJointGetBallAnchor2() can be used, along with | * within roundoff errors. dJointGetBallAnchor2() can be used, along with | |||
* dJointGetBallAnchor(), to see how far the joint has come apart. | * dJointGetBallAnchor(), to see how far the joint has come apart. | |||
*/ | */ | |||
ODE_API void dJointGetBallAnchor2 (dJointID, dVector3 result); | ODE_API void dJointGetBallAnchor2 (dJointID, dVector3 result); | |||
/** | /** | |||
* @brief get joint parameter | ||||
* @ingroup joints | ||||
*/ | ||||
ODE_API dReal dJointGetBallParam (dJointID, int parameter); | ||||
/** | ||||
* @brief Get the hinge anchor point, in world coordinates. | * @brief Get the hinge anchor point, in world coordinates. | |||
* | * | |||
* This returns the point on body 1. If the joint is perfectly satisfied, | * This returns the point on body 1. If the joint is perfectly satisfied, | |||
* this will be the same as the point on body 2. | * this will be the same as the point on body 2. | |||
* @ingroup joints | * @ingroup joints | |||
*/ | */ | |||
ODE_API void dJointGetHingeAnchor (dJointID, dVector3 result); | ODE_API void dJointGetHingeAnchor (dJointID, dVector3 result); | |||
/** | /** | |||
* @brief Get the joint anchor point, in world coordinates. | * @brief Get the joint anchor point, in world coordinates. | |||
skipping to change at line 1868 | skipping to change at line 1887 | |||
*/ | */ | |||
ODE_API void dJointGetLMotorAxis (dJointID, int anum, dVector3 result); | ODE_API void dJointGetLMotorAxis (dJointID, int anum, dVector3 result); | |||
/** | /** | |||
* @brief get joint parameter | * @brief get joint parameter | |||
* @ingroup joints | * @ingroup joints | |||
*/ | */ | |||
ODE_API dReal dJointGetLMotorParam (dJointID, int parameter); | ODE_API dReal dJointGetLMotorParam (dJointID, int parameter); | |||
/** | /** | |||
* @brief get joint parameter | ||||
* @ingroup joints | ||||
*/ | ||||
ODE_API dReal dJointGetFixedParam (dJointID, int parameter); | ||||
/** | ||||
* @ingroup joints | * @ingroup joints | |||
*/ | */ | |||
ODE_API dJointID dConnectingJoint (dBodyID, dBodyID); | ODE_API dJointID dConnectingJoint (dBodyID, dBodyID); | |||
/** | /** | |||
* @ingroup joints | * @ingroup joints | |||
*/ | */ | |||
ODE_API int dConnectingJointList (dBodyID, dBodyID, dJointID*); | ODE_API int dConnectingJointList (dBodyID, dBodyID, dJointID*); | |||
/** | /** | |||
End of changes. 4 change blocks. | ||||
0 lines changed or deleted | 25 lines changed or added | |||
odecpp.h | odecpp.h | |||
---|---|---|---|---|
skipping to change at line 340 | skipping to change at line 340 | |||
if (_id) dJointDestroy (_id); | if (_id) dJointDestroy (_id); | |||
_id = dJointCreateBall (world, group); | _id = dJointCreateBall (world, group); | |||
} | } | |||
void setAnchor (dReal x, dReal y, dReal z) | void setAnchor (dReal x, dReal y, dReal z) | |||
{ dJointSetBallAnchor (_id, x, y, z); } | { dJointSetBallAnchor (_id, x, y, z); } | |||
void getAnchor (dVector3 result) const | void getAnchor (dVector3 result) const | |||
{ dJointGetBallAnchor (_id, result); } | { dJointGetBallAnchor (_id, result); } | |||
void getAnchor2 (dVector3 result) const | void getAnchor2 (dVector3 result) const | |||
{ dJointGetBallAnchor2 (_id, result); } | { dJointGetBallAnchor2 (_id, result); } | |||
void setParam (int parameter, dReal value) | ||||
{ dJointSetBallParam (_id, parameter, value); } | ||||
dReal getParam (int parameter) const | ||||
{ return dJointGetBallParam (_id, parameter); } | ||||
} ; | } ; | |||
class dHingeJoint : public dJoint { | class dHingeJoint : public dJoint { | |||
// intentionally undefined, don't use these | // intentionally undefined, don't use these | |||
dHingeJoint (const dHingeJoint &); | dHingeJoint (const dHingeJoint &); | |||
void operator = (const dHingeJoint &); | void operator = (const dHingeJoint &); | |||
public: | public: | |||
dHingeJoint() { } | dHingeJoint() { } | |||
dHingeJoint (dWorldID world, dJointGroupID group=0) | dHingeJoint (dWorldID world, dJointGroupID group=0) | |||
skipping to change at line 570 | skipping to change at line 574 | |||
dFixedJoint (dWorldID world, dJointGroupID group=0) | dFixedJoint (dWorldID world, dJointGroupID group=0) | |||
{ _id = dJointCreateFixed (world, group); } | { _id = dJointCreateFixed (world, group); } | |||
void create (dWorldID world, dJointGroupID group=0) { | void create (dWorldID world, dJointGroupID group=0) { | |||
if (_id) dJointDestroy (_id); | if (_id) dJointDestroy (_id); | |||
_id = dJointCreateFixed (world, group); | _id = dJointCreateFixed (world, group); | |||
} | } | |||
void set() | void set() | |||
{ dJointSetFixed (_id); } | { dJointSetFixed (_id); } | |||
void setParam (int parameter, dReal value) | ||||
{ dJointSetFixedParam (_id, parameter, value); } | ||||
dReal getParam (int parameter) const | ||||
{ return dJointGetFixedParam (_id, parameter); } | ||||
}; | }; | |||
class dContactJoint : public dJoint { | class dContactJoint : public dJoint { | |||
// intentionally undefined, don't use these | // intentionally undefined, don't use these | |||
dContactJoint (const dContactJoint &); | dContactJoint (const dContactJoint &); | |||
void operator = (const dContactJoint &); | void operator = (const dContactJoint &); | |||
public: | public: | |||
dContactJoint() { } | dContactJoint() { } | |||
dContactJoint (dWorldID world, dJointGroupID group, dContact *contact) | dContactJoint (dWorldID world, dJointGroupID group, dContact *contact) | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 10 lines changed or added | |||
odemath.h | odemath.h | |||
---|---|---|---|---|
skipping to change at line 44 | skipping to change at line 44 | |||
/* | /* | |||
* macro to access elements i,j in an NxM matrix A, independent of the | * macro to access elements i,j in an NxM matrix A, independent of the | |||
* matrix storage convention. | * matrix storage convention. | |||
*/ | */ | |||
#define dACCESS33(A,i,j) ((A)[(i)*4+(j)]) | #define dACCESS33(A,i,j) ((A)[(i)*4+(j)]) | |||
/* | /* | |||
* Macro to test for valid floating point values | * Macro to test for valid floating point values | |||
*/ | */ | |||
#define dVALIDVEC3(v) (!(dIsNan(v[0]) || dIsNan(v[1]) || dIsNan(v[2]))) | #define dVALIDVEC3(v) (!(dIsNan(v[0]) || dIsNan(v[1]) || dIsNan(v[2]))) | |||
#define dVALIDVEC4(v) (!(dIsNan(v[0]) || dIsNan(v[2]) || dIsNan(v[2]) || dI sNan(v[3]))) | #define dVALIDVEC4(v) (!(dIsNan(v[0]) || dIsNan(v[1]) || dIsNan(v[2]) || dI sNan(v[3]))) | |||
#define dVALIDMAT3(m) (!(dIsNan(m[0]) || dIsNan(m[1]) || dIsNan(m[2]) || dI sNan(m[3]) || dIsNan(m[4]) || dIsNan(m[5]) || dIsNan(m[6]) || dIsNan(m[7]) || dIsNan(m[8]) || dIsNan(m[9]) || dIsNan(m[10]) || dIsNan(m[11]))) | #define dVALIDMAT3(m) (!(dIsNan(m[0]) || dIsNan(m[1]) || dIsNan(m[2]) || dI sNan(m[3]) || dIsNan(m[4]) || dIsNan(m[5]) || dIsNan(m[6]) || dIsNan(m[7]) || dIsNan(m[8]) || dIsNan(m[9]) || dIsNan(m[10]) || dIsNan(m[11]))) | |||
#define dVALIDMAT4(m) (!(dIsNan(m[0]) || dIsNan(m[1]) || dIsNan(m[2]) || dI sNan(m[3]) || dIsNan(m[4]) || dIsNan(m[5]) || dIsNan(m[6]) || dIsNan(m[7]) || dIsNan(m[8]) || dIsNan(m[9]) || dIsNan(m[10]) || dIsNan(m[11]) || dIsNan (m[12]) || dIsNan(m[13]) || dIsNan(m[14]) || dIsNan(m[15]) )) | #define dVALIDMAT4(m) (!(dIsNan(m[0]) || dIsNan(m[1]) || dIsNan(m[2]) || dI sNan(m[3]) || dIsNan(m[4]) || dIsNan(m[5]) || dIsNan(m[6]) || dIsNan(m[7]) || dIsNan(m[8]) || dIsNan(m[9]) || dIsNan(m[10]) || dIsNan(m[11]) || dIsNan (m[12]) || dIsNan(m[13]) || dIsNan(m[14]) || dIsNan(m[15]) )) | |||
/* | /* | |||
* General purpose vector operations with other vectors or constants. | * General purpose vector operations with other vectors or constants. | |||
*/ | */ | |||
#define dOP(a,op,b,c) \ | #define dOP(a,op,b,c) \ | |||
(a)[0] = ((b)[0]) op ((c)[0]); \ | (a)[0] = ((b)[0]) op ((c)[0]); \ | |||
(a)[1] = ((b)[1]) op ((c)[1]); \ | (a)[1] = ((b)[1]) op ((c)[1]); \ | |||
skipping to change at line 278 | skipping to change at line 278 | |||
#endif | #endif | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
/* | /* | |||
* normalize 3x1 and 4x1 vectors (i.e. scale them to unit length) | * normalize 3x1 and 4x1 vectors (i.e. scale them to unit length) | |||
*/ | */ | |||
ODE_API void dNormalize3 (dVector3 a); | ODE_API int dSafeNormalize3 (dVector3 a); | |||
ODE_API void dNormalize4 (dVector4 a); | ODE_API int dSafeNormalize4 (dVector4 a); | |||
// For some reason demo_chain1.c does not understand "inline" keyword. | ||||
static __inline void _dNormalize3(dVector3 a) | ||||
{ | ||||
int bNormalizationResult = dSafeNormalize3(a); | ||||
dIASSERT(bNormalizationResult); | ||||
dVARIABLEUSED(bNormalizationResult); | ||||
} | ||||
static __inline void _dNormalize4(dVector4 a) | ||||
{ | ||||
int bNormalizationResult = dSafeNormalize4(a); | ||||
dIASSERT(bNormalizationResult); | ||||
dVARIABLEUSED(bNormalizationResult); | ||||
} | ||||
// For DLL export | ||||
ODE_API void dNormalize3 (dVector3 a); // Potentially asserts on zero vec | ||||
ODE_API void dNormalize4 (dVector4 a); // Potentially asserts on zero vec | ||||
// For internal use | ||||
#define dNormalize3(a) _dNormalize3(a) | ||||
#define dNormalize4(a) _dNormalize4(a) | ||||
/* | /* | |||
* given a unit length "normal" vector n, generate vectors p and q vectors | * given a unit length "normal" vector n, generate vectors p and q vectors | |||
* that are an orthonormal basis for the plane space perpendicular to n. | * that are an orthonormal basis for the plane space perpendicular to n. | |||
* i.e. this makes p,q such that n,p,q are all perpendicular to each other. | * i.e. this makes p,q such that n,p,q are all perpendicular to each other. | |||
* q will equal n x p. if n is not unit length then p will be unit length b ut | * q will equal n x p. if n is not unit length then p will be unit length b ut | |||
* q wont be. | * q wont be. | |||
*/ | */ | |||
ODE_API void dPlaneSpace (const dVector3 n, dVector3 p, dVector3 q); | ODE_API void dPlaneSpace (const dVector3 n, dVector3 p, dVector3 q); | |||
End of changes. 2 change blocks. | ||||
3 lines changed or deleted | 26 lines changed or added | |||