objects.h   objects.h 
/************************************************************************* /*************************************************************************
* * * *
* Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. *
* All rights reserved. Email: russ@q12.org Web: www.q12.org * * All rights reserved. Email: russ@q12.org Web: www.q12.org *
* * * *
* This library is free software; you can redistribute it and/or * * This library is free software; you can redistribute it and/or *
* modify it under the terms of EITHER: * * modify it under the terms of EITHER: *
* (1) The GNU Lesser General Public License as published by the Free * * (1) The GNU Lesser General Public License as published by the Free *
* Software Foundation; either version 2.1 of the License, or (at * * Software Foundation; either version 2.1 of the License, or (at *
* your option) any later version. The text of the GNU Lesser * * your option) any later version. The text of the GNU Lesser *
skipping to change at line 1535 skipping to change at line 1536
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
*/ */
ODE_API void dJointSetHingeAxis (dJointID, dReal x, dReal y, dReal z); ODE_API void dJointSetHingeAxis (dJointID, dReal x, dReal y, dReal z);
/** /**
* @brief Set the Hinge axis as if the 2 bodies were already at angle appar
t.
* @ingroup joints
*
* This function initialize the Axis and the relative orientation of each b
ody
* as if body1 was rotated around the axis by the angle value. \br
* Ex:
* <PRE>
* dJointSetHingeAxis(jId, 1, 0, 0);
* // If you request the position you will have: dJointGetHingeAngle(jId) =
= 0
* dJointSetHingeAxisDelta(jId, 1, 0, 0, 0.23);
* // If you request the position you will have: dJointGetHingeAngle(jId) =
= 0.23
* </PRE>
* @param j The Hinge joint ID for which the axis will be set
* @param x The X component of the axis in world frame
* @param y The Y component of the axis in world frame
* @param z The Z component of the axis in world frame
* @param angle The angle for the offset of the relative orientation.
* As if body1 was rotated by angle when the Axis was set (see
below).
* The rotation is around the new Hinge axis.
*
* @note Usually the function dJointSetHingeAxis set the current position o
f body1
* and body2 as the zero angle position. This function set the curren
t position
* as the if the 2 bodies where \b angle appart.
* @warning Calling dJointSetHingeAnchor or dJointSetHingeAxis will reset t
he "zero"
* angle position.
*/
ODE_API void dJointSetHingeAxisOffset (dJointID j, dReal x, dReal y, dReal
z, dReal angle);
/**
* @brief set joint parameter * @brief set joint parameter
* @ingroup joints * @ingroup joints
*/ */
ODE_API void dJointSetHingeParam (dJointID, int parameter, dReal value); ODE_API void dJointSetHingeParam (dJointID, int parameter, dReal value);
/** /**
* @brief Applies the torque about the hinge axis. * @brief Applies the torque about the hinge axis.
* *
* That is, it applies a torque with specified magnitude in the direction * That is, it applies a torque with specified magnitude in the direction
* of the hinge axis, to body 1, and with the same magnitude but in opposit e * of the hinge axis, to body 1, and with the same magnitude but in opposit e
skipping to change at line 1738 skipping to change at line 1769
* @brief Applies the torque about the rotoide axis of the PU joint * @brief Applies the torque about the rotoide axis of the PU joint
* *
* That is, it applies a torque with specified magnitude in the direction * That is, it applies a torque with specified magnitude in the direction
* of the rotoide axis, to body 1, and with the same magnitude but in opp osite * of the rotoide axis, to body 1, and with the same magnitude but in opp osite
* direction to body 2. This function is just a wrapper for dBodyAddTorqu e()} * direction to body 2. This function is just a wrapper for dBodyAddTorqu e()}
* @ingroup joints * @ingroup joints
*/ */
ODE_API void dJointAddPUTorque (dJointID j, dReal torque); ODE_API void dJointAddPUTorque (dJointID j, dReal torque);
/** /**
* @brief set the joint axis * @brief set the joint anchor
* @ingroup joints * @ingroup joints
*/ */
ODE_API void dJointSetPistonAnchor (dJointID, dReal x, dReal y, dReal z); ODE_API void dJointSetPistonAnchor (dJointID, dReal x, dReal y, dReal z);
/** /**
* @brief set the joint axis * @brief Set the Piston anchor as if the 2 bodies were already at [dx,dy
, dz] appart.
* @ingroup joints
*
* This function initialize the anchor and the relative position of each
body
* as if the position between body1 and body2 was already the projection
of [dx, dy, dz]
* along the Piston axis. (i.e as if the body1 was at its current positio
n - [dx,dy,dy] when the
* axis is set).
* Ex:
* <PRE>
* dReal offset = 3;
* dVector3 axis;
* dJointGetPistonAxis(jId, axis);
* dJointSetPistonAnchor(jId, 0, 0, 0);
* // If you request the position you will have: dJointGetPistonPosition(
jId) == 0
* dJointSetPistonAnchorOffset(jId, 0, 0, 0, axis[X]*offset, axis[Y]*offs
et, axis[Z]*offset);
* // If you request the position you will have: dJointGetPistonPosition(
jId) == offset
* </PRE>
* @param j The Piston joint for which the anchor point will be set
* @param x The X position of the anchor point in world frame
* @param y The Y position of the anchor point in world frame
* @param z The Z position of the anchor point in world frame
* @param dx A delta to be substracted to the X position as if the anchor
was set
* when body1 was at current_position[X] - dx
* @param dx A delta to be substracted to the Y position as if the anchor
was set
* when body1 was at current_position[Y] - dy
* @param dx A delta to be substracted to the Z position as if the anchor
was set
* when body1 was at current_position[Z] - dz
*/
ODE_API void dJointSetPistonAnchorOffset(dJointID j, dReal x, dReal y, dR
eal z,
dReal dx, dReal dy, dReal dz);
/**
* @brief set the joint axis
* @ingroup joints * @ingroup joints
*/ */
ODE_API void dJointSetPistonAxis (dJointID, dReal x, dReal y, dReal z); ODE_API void dJointSetPistonAxis (dJointID, dReal x, dReal y, dReal z);
/** /**
* This function set prismatic axis of the joint and also set the positio n * This function set prismatic axis of the joint and also set the positio n
* of the joint. * of the joint.
* *
* @ingroup joints * @ingroup joints
* @param j The joint affected by this function * @param j The joint affected by this function
* @param x The x component of the axis * @param x The x component of the axis
* @param y The y component of the axis * @param y The y component of the axis
* @param z The z component of the axis * @param z The z component of the axis
* @param dx The Initial position of the prismatic join in the x directio n * @param dx The Initial position of the prismatic join in the x directio n
* @param dy The Initial position of the prismatic join in the y directio n * @param dy The Initial position of the prismatic join in the y directio n
* @param dz The Initial position of the prismatic join in the z directio n * @param dz The Initial position of the prismatic join in the z directio n
*/ */
ODE_API void dJointSetPistonAxisDelta (dJointID j, dReal x, dReal y, dRea l z, dReal ax, dReal ay, dReal az); ODE_API_DEPRECATED ODE_API void dJointSetPistonAxisDelta (dJointID j, dRe al x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
/** /**
* @brief set joint parameter * @brief set joint parameter
* @ingroup joints * @ingroup joints
*/ */
ODE_API void dJointSetPistonParam (dJointID, int parameter, dReal value); ODE_API void dJointSetPistonParam (dJointID, int parameter, dReal value);
/** /**
* @brief Applies the given force in the slider's direction. * @brief Applies the given force in the slider's direction.
* *
skipping to change at line 1947 skipping to change at line 2010
* @ingroup joints * @ingroup joints
*/ */
ODE_API dReal dJointGetHingeParam (dJointID, int parameter); ODE_API dReal dJointGetHingeParam (dJointID, int parameter);
/** /**
* @brief Get the hinge angle. * @brief Get the hinge angle.
* *
* The angle is measured between the two bodies, or between the body and * The angle is measured between the two bodies, or between the body and
* the static environment. * the static environment.
* The angle will be between -pi..pi. * The angle will be between -pi..pi.
* Give the relative rotation with respect to the Hinge axis of Body 1 with
* respect to Body 2.
* When the hinge anchor or axis is set, the current position of the attach ed * When the hinge anchor or axis is set, the current position of the attach ed
* bodies is examined and that position will be the zero angle. * bodies is examined and that position will be the zero angle.
* @ingroup joints * @ingroup joints
*/ */
ODE_API dReal dJointGetHingeAngle (dJointID); ODE_API dReal dJointGetHingeAngle (dJointID);
/** /**
* @brief Get the hinge angle time derivative. * @brief Get the hinge angle time derivative.
* @ingroup joints * @ingroup joints
*/ */
ODE_API dReal dJointGetHingeAngleRate (dJointID); ODE_API dReal dJointGetHingeAngleRate (dJointID);
/** /**
* @brief Get the slider linear position (i.e. the slider's extension) * @brief Get the slider linear position (i.e. the slider's extension)
* *
* When the axis is set, the current position of the attached bodies is * When the axis is set, the current position of the attached bodies is
* examined and that position will be the zero position. * examined and that position will be the zero position.
* The position is the distance, with respect to the zero position,
* along the slider axis of body 1 with respect to
* body 2. (A NULL body is replaced by the world).
* @ingroup joints * @ingroup joints
*/ */
ODE_API dReal dJointGetSliderPosition (dJointID); ODE_API dReal dJointGetSliderPosition (dJointID);
/** /**
* @brief Get the slider linear position's time derivative. * @brief Get the slider linear position's time derivative.
* @ingroup joints * @ingroup joints
*/ */
ODE_API dReal dJointGetSliderPositionRate (dJointID); ODE_API dReal dJointGetSliderPositionRate (dJointID);
 End of changes. 7 change blocks. 
3 lines changed or deleted 92 lines changed or added


 odeconfig.h   odeconfig.h 
skipping to change at line 35 skipping to change at line 35
#define ODE_API __declspec(dllexport) #define ODE_API __declspec(dllexport)
#elif !defined(ODE_LIB) #elif !defined(ODE_LIB)
#define ODE_DLL_API __declspec(dllimport) #define ODE_DLL_API __declspec(dllimport)
#endif #endif
#endif #endif
#if !defined(ODE_API) #if !defined(ODE_API)
#define ODE_API #define ODE_API
#endif #endif
#if defined(_MSC_VER)
# define ODE_API_DEPRECATED __declspec(deprecated)
#elif defined (__GNUC__) && ( (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC
_MINOR__ >= 1)) )
# define ODE_API_DEPRECATED __attribute__((__deprecated__))
#else
# define ODE_API_DEPRECATED
#endif
/* Well-defined common data types...need to define for 64 bit systems */ /* Well-defined common data types...need to define for 64 bit systems */
#if defined(_M_IA64) || defined(__ia64__) || defined(_M_AMD64) || defined(_ _x86_64__) #if defined(_M_IA64) || defined(__ia64__) || defined(_M_AMD64) || defined(_ _x86_64__)
#define X86_64_SYSTEM 1 #define X86_64_SYSTEM 1
typedef int int32; typedef int int32;
typedef unsigned int uint32; typedef unsigned int uint32;
typedef short int16; typedef short int16;
typedef unsigned short uint16; typedef unsigned short uint16;
typedef char int8; typedef char int8;
typedef unsigned char uint8; typedef unsigned char uint8;
#else #else
skipping to change at line 67 skipping to change at line 75
#endif #endif
/* Define the dInfinity macro */ /* Define the dInfinity macro */
#ifdef INFINITY #ifdef INFINITY
#define dInfinity INFINITY #define dInfinity INFINITY
#elif defined(HUGE_VAL) #elif defined(HUGE_VAL)
#ifdef dSINGLE #ifdef dSINGLE
#ifdef HUGE_VALF #ifdef HUGE_VALF
#define dInfinity HUGE_VALF #define dInfinity HUGE_VALF
#else #else
#define dInfinity HUGE_VAL #define dInfinity ((float)HUGE_VAL)
#endif #endif
#else #else
#define dInfinity HUGE_VAL #define dInfinity HUGE_VAL
#endif #endif
#else #else
#define dInfinity ((1.0)/(0.0)) #ifdef dSINGLE
#define dInfinity ((float)(1.0/0.0))
#else
#define dInfinity (1.0/0.0)
#endif
#endif #endif
#endif #endif
 End of changes. 3 change blocks. 
2 lines changed or deleted 15 lines changed or added


 odecpp.h   odecpp.h 
skipping to change at line 272 skipping to change at line 272
void setTorque (dReal x, dReal y, dReal z) void setTorque (dReal x, dReal y, dReal z)
{ dBodySetTorque (_id,x,y,z); } { dBodySetTorque (_id,x,y,z); }
void setTorque (const dVector3 t) void setTorque (const dVector3 t)
{ setTorque (t[0], t[1], t[2]); } { setTorque (t[0], t[1], t[2]); }
void enable() void enable()
{ dBodyEnable (_id); } { dBodyEnable (_id); }
void disable() void disable()
{ dBodyDisable (_id); } { dBodyDisable (_id); }
bool isEnabled() const bool isEnabled() const
{ return bool(dBodyIsEnabled (_id)); } { return dBodyIsEnabled (_id) != 0; }
void getRelPointPos (dReal px, dReal py, dReal pz, dVector3 result) const void getRelPointPos (dReal px, dReal py, dReal pz, dVector3 result) const
{ dBodyGetRelPointPos (_id, px, py, pz, result); } { dBodyGetRelPointPos (_id, px, py, pz, result); }
void getRelPointPos (const dVector3 p, dVector3 result) const void getRelPointPos (const dVector3 p, dVector3 result) const
{ getRelPointPos (p[0], p[1], p[2], result); } { getRelPointPos (p[0], p[1], p[2], result); }
void getRelPointVel (dReal px, dReal py, dReal pz, dVector3 result) const void getRelPointVel (dReal px, dReal py, dReal pz, dVector3 result) const
{ dBodyGetRelPointVel (_id, px, py, pz, result); } { dBodyGetRelPointVel (_id, px, py, pz, result); }
void getRelPointVel (const dVector3 p, dVector3 result) const void getRelPointVel (const dVector3 p, dVector3 result) const
{ getRelPointVel (p[0], p[1], p[2], result); } { getRelPointVel (p[0], p[1], p[2], result); }
skipping to change at line 313 skipping to change at line 313
void setFiniteRotationMode (bool mode) void setFiniteRotationMode (bool mode)
{ dBodySetFiniteRotationMode (_id, mode); } { dBodySetFiniteRotationMode (_id, mode); }
void setFiniteRotationAxis (dReal x, dReal y, dReal z) void setFiniteRotationAxis (dReal x, dReal y, dReal z)
{ dBodySetFiniteRotationAxis (_id, x, y, z); } { dBodySetFiniteRotationAxis (_id, x, y, z); }
void setFiniteRotationAxis (const dVector3 a) void setFiniteRotationAxis (const dVector3 a)
{ setFiniteRotationAxis (a[0], a[1], a[2]); } { setFiniteRotationAxis (a[0], a[1], a[2]); }
bool getFiniteRotationMode() const bool getFiniteRotationMode() const
{ return bool(dBodyGetFiniteRotationMode (_id)); } { return dBodyGetFiniteRotationMode (_id) != 0; }
void getFiniteRotationAxis (dVector3 result) const void getFiniteRotationAxis (dVector3 result) const
{ dBodyGetFiniteRotationAxis (_id, result); } { dBodyGetFiniteRotationAxis (_id, result); }
int getNumJoints() const int getNumJoints() const
{ return dBodyGetNumJoints (_id); } { return dBodyGetNumJoints (_id); }
dJointID getJoint (int index) const dJointID getJoint (int index) const
{ return dBodyGetJoint (_id, index); } { return dBodyGetJoint (_id, index); }
void setGravityMode (bool mode) void setGravityMode (bool mode)
{ dBodySetGravityMode (_id,mode); } { dBodySetGravityMode (_id,mode); }
bool getGravityMode() const bool getGravityMode() const
{ return bool(dBodyGetGravityMode (_id)); } { return dBodyGetGravityMode (_id) != 0; }
bool isConnectedTo (dBodyID body) const bool isConnectedTo (dBodyID body) const
{ return bool(dAreConnected (_id, body)); } { return dAreConnected (_id, body) != 0; }
void setAutoDisableLinearThreshold (dReal threshold) void setAutoDisableLinearThreshold (dReal threshold)
{ dBodySetAutoDisableLinearThreshold (_id,threshold); } { dBodySetAutoDisableLinearThreshold (_id,threshold); }
dReal getAutoDisableLinearThreshold() const dReal getAutoDisableLinearThreshold() const
{ return dBodyGetAutoDisableLinearThreshold (_id); } { return dBodyGetAutoDisableLinearThreshold (_id); }
void setAutoDisableAngularThreshold (dReal threshold) void setAutoDisableAngularThreshold (dReal threshold)
{ dBodySetAutoDisableAngularThreshold (_id,threshold); } { dBodySetAutoDisableAngularThreshold (_id,threshold); }
dReal getAutoDisableAngularThreshold() const dReal getAutoDisableAngularThreshold() const
{ return dBodyGetAutoDisableAngularThreshold (_id); } { return dBodyGetAutoDisableAngularThreshold (_id); }
void setAutoDisableSteps (int steps) void setAutoDisableSteps (int steps)
{ dBodySetAutoDisableSteps (_id,steps); } { dBodySetAutoDisableSteps (_id,steps); }
int getAutoDisableSteps() const int getAutoDisableSteps() const
{ return dBodyGetAutoDisableSteps (_id); } { return dBodyGetAutoDisableSteps (_id); }
void setAutoDisableTime (dReal time) void setAutoDisableTime (dReal time)
{ dBodySetAutoDisableTime (_id,time); } { dBodySetAutoDisableTime (_id,time); }
dReal getAutoDisableTime() const dReal getAutoDisableTime() const
{ return dBodyGetAutoDisableTime (_id); } { return dBodyGetAutoDisableTime (_id); }
void setAutoDisableFlag (bool do_auto_disable) void setAutoDisableFlag (bool do_auto_disable)
{ dBodySetAutoDisableFlag (_id,do_auto_disable); } { dBodySetAutoDisableFlag (_id,do_auto_disable); }
bool getAutoDisableFlag() const bool getAutoDisableFlag() const
{ return bool(dBodyGetAutoDisableFlag (_id)); } { return dBodyGetAutoDisableFlag (_id) != 0; }
dReal getLinearDamping() const dReal getLinearDamping() const
{ return dBodyGetLinearDamping(_id); } { return dBodyGetLinearDamping(_id); }
void setLinearDamping(dReal scale) void setLinearDamping(dReal scale)
{ dBodySetLinearDamping(_id, scale); } { dBodySetLinearDamping(_id, scale); }
dReal getAngularDamping() const dReal getAngularDamping() const
{ return dBodyGetAngularDamping(_id); } { return dBodyGetAngularDamping(_id); }
void setAngularDamping(dReal scale) void setAngularDamping(dReal scale)
{ dBodySetAngularDamping(_id, scale); } { dBodySetAngularDamping(_id, scale); }
void setDamping(dReal linear_scale, dReal angular_scale) void setDamping(dReal linear_scale, dReal angular_scale)
skipping to change at line 416 skipping to change at line 416
class dJoint { class dJoint {
private: private:
// intentionally undefined, don't use these // intentionally undefined, don't use these
dJoint (const dJoint &) ; dJoint (const dJoint &) ;
void operator= (const dJoint &); void operator= (const dJoint &);
protected: protected:
dJointID _id; dJointID _id;
public: dJoint() // don't let user construct pure dJoint objects
dJoint()
{ _id = 0; } { _id = 0; }
public:
virtual ~dJoint() // :( Destructor must be virtual to suppress compiler w arning "class XXX has virtual functions but non-virtual destructor" virtual ~dJoint() // :( Destructor must be virtual to suppress compiler w arning "class XXX has virtual functions but non-virtual destructor"
{ if (_id) dJointDestroy (_id); } { if (_id) dJointDestroy (_id); }
dJointID id() const dJointID id() const
{ return _id; } { return _id; }
operator dJointID() const operator dJointID() const
{ return _id; } { return _id; }
int getNumBodies() const int getNumBodies() const
{ return dJointGetNumBodies(_id); } { return dJointGetNumBodies(_id); }
 End of changes. 7 change blocks. 
7 lines changed or deleted 8 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/