| objects.h | | objects.h | |
| | | | |
| skipping to change at line 261 | | skipping to change at line 261 | |
| /** | | /** | |
| * @brief Step the world using the StepFast1 algorithm. | | * @brief Step the world using the StepFast1 algorithm. | |
| * @param stepsize the nr of seconds to advance the simulation. | | * @param stepsize the nr of seconds to advance the simulation. | |
| * @param maxiterations The number of iterations to perform. | | * @param maxiterations The number of iterations to perform. | |
| * @ingroup world | | * @ingroup world | |
| */ | | */ | |
| ODE_API void dWorldStepFast1(dWorldID, dReal stepsize, int maxiterations); | | ODE_API void dWorldStepFast1(dWorldID, dReal stepsize, int maxiterations); | |
| | | | |
| /** | | /** | |
| * @defgroup disable Automatic Enabling and Disabling | | * @defgroup disable Automatic Enabling and Disabling | |
|
| | | * @ingroup world bodies | |
| * | | * | |
| * Every body can be enabled or disabled. Enabled bodies participate in the | | * Every body can be enabled or disabled. Enabled bodies participate in the | |
| * simulation, while disabled bodies are turned off and do not get updated | | * simulation, while disabled bodies are turned off and do not get updated | |
| * during a simulation step. New bodies are always created in the enabled s
tate. | | * during a simulation step. New bodies are always created in the enabled s
tate. | |
| * | | * | |
| * A disabled body that is connected through a joint to an enabled body wil
l be | | * A disabled body that is connected through a joint to an enabled body wil
l be | |
| * automatically re-enabled at the next simulation step. | | * automatically re-enabled at the next simulation step. | |
| * | | * | |
| * Disabled bodies do not consume CPU time, therefore to speed up the simul
ation | | * Disabled bodies do not consume CPU time, therefore to speed up the simul
ation | |
| * bodies should be disabled when they come to rest. This can be done autom
atically | | * bodies should be disabled when they come to rest. This can be done autom
atically | |
| | | | |
| skipping to change at line 416 | | skipping to change at line 417 | |
| ODE_API int dWorldGetAutoDisableFlag (dWorldID); | | ODE_API int dWorldGetAutoDisableFlag (dWorldID); | |
| | | | |
| /** | | /** | |
| * @brief Set auto disable flag for newly created bodies. | | * @brief Set auto disable flag for newly created bodies. | |
| * @ingroup disable | | * @ingroup disable | |
| * @param do_auto_disable default is false. | | * @param do_auto_disable default is false. | |
| */ | | */ | |
| ODE_API void dWorldSetAutoDisableFlag (dWorldID, int do_auto_disable); | | ODE_API void dWorldSetAutoDisableFlag (dWorldID, int do_auto_disable); | |
| | | | |
| /** | | /** | |
|
| | | * @defgroup damping Damping | |
| | | * @ingroup bodies world | |
| | | * | |
| | | * Damping serves two purposes: reduce simulation instability, and to allow | |
| | | * the bodies to come to rest (and possibly auto-disabling them). | |
| | | * | |
| | | * Bodies are constructed using the world's current damping parameters. Set | |
| | | ting | |
| | | * the scales to 0 disables the damping. | |
| | | * | |
| | | * Here is how it is done: after every time step linear and angular | |
| | | * velocities are tested against the corresponding thresholds. If they | |
| | | * are above, they are multiplied by (1 - scale). So a negative scale value | |
| | | * will actually increase the speed, and values greater than one will | |
| | | * make the object oscillate every step; both can make the simulation unsta | |
| | | ble. | |
| | | * | |
| | | * To disable damping just set the damping scale to zero. | |
| | | * | |
| | | * You can also limit the maximum angular velocity. In contrast to the damp | |
| | | ing | |
| | | * functions, the angular velocity is affected before the body is moved. | |
| | | * This means that it will introduce errors in joints that are forcing the | |
| | | body | |
| | | * to rotate too fast. Some bodies have naturally high angular velocities | |
| | | * (like cars' wheels), so you may want to give them a very high (like the | |
| | | default, | |
| | | * dInfinity) limit. | |
| | | * | |
| | | * @note The velocities are damped after the stepper function has moved the | |
| | | * object. Otherwise the damping could introduce errors in joints. First th | |
| | | e | |
| | | * joint constraints are processed by the stepper (moving the body), then | |
| | | * the damping is applied. | |
| | | * | |
| | | * @note The damping happens right after the moved callback is called; this | |
| | | way | |
| | | * it still possible use the exact velocities the body has acquired during | |
| | | the | |
| | | * step. You can even use the callback to create your own customized dampin | |
| | | g. | |
| | | */ | |
| | | | |
| | | /** | |
| | | * @brief Get the world's linear damping threshold. | |
| | | * @ingroup damping | |
| | | */ | |
| | | ODE_API dReal dWorldGetLinearDampingThreshold (dWorldID w); | |
| | | | |
| | | /** | |
| | | * @brief Set the world's linear damping threshold. | |
| | | * @param threshold The damping won't be applied if the linear speed is | |
| | | * below this threshold. Default is 0.01. | |
| | | * @ingroup damping | |
| | | */ | |
| | | ODE_API void dWorldSetLinearDampingThreshold(dWorldID w, dReal threshold); | |
| | | | |
| | | /** | |
| | | * @brief Get the world's angular damping threshold. | |
| | | * @ingroup damping | |
| | | */ | |
| | | ODE_API dReal dWorldGetAngularDampingThreshold (dWorldID w); | |
| | | | |
| | | /** | |
| | | * @brief Set the world's angular damping threshold. | |
| | | * @param threshold The damping won't be applied if the angular speed is | |
| | | * below this threshold. Default is 0.01. | |
| | | * @ingroup damping | |
| | | */ | |
| | | ODE_API void dWorldSetAngularDampingThreshold(dWorldID w, dReal threshold); | |
| | | | |
| | | /** | |
| | | * @brief Get the world's linear damping scale. | |
| | | * @ingroup damping | |
| | | */ | |
| | | ODE_API dReal dWorldGetLinearDamping (dWorldID w); | |
| | | | |
| | | /** | |
| | | * @brief Set the world's linear damping scale. | |
| | | * @param scale The linear damping scale that is to be applied to bodies. | |
| | | * Default is 0 (no damping). Should be in the interval [0, 1]. | |
| | | * @ingroup damping | |
| | | */ | |
| | | ODE_API void dWorldSetLinearDamping (dWorldID w, dReal scale); | |
| | | | |
| | | /** | |
| | | * @brief Get the world's angular damping scale. | |
| | | * @ingroup damping | |
| | | */ | |
| | | ODE_API dReal dWorldGetAngularDamping (dWorldID w); | |
| | | | |
| | | /** | |
| | | * @brief Set the world's angular damping scale. | |
| | | * @param scale The angular damping scale that is to be applied to bodies. | |
| | | * Default is 0 (no damping). Should be in the interval [0, 1]. | |
| | | * @ingroup damping | |
| | | */ | |
| | | ODE_API void dWorldSetAngularDamping(dWorldID w, dReal scale); | |
| | | | |
| | | /** | |
| | | * @brief Convenience function to set body linear and angular scales. | |
| | | * @param linear_scale The linear damping scale that is to be applied to bo | |
| | | dies. | |
| | | * @param angular_scale The angular damping scale that is to be applied to | |
| | | bodies. | |
| | | * @ingroup damping | |
| | | */ | |
| | | ODE_API void dWorldSetDamping(dWorldID w, | |
| | | dReal linear_scale, | |
| | | dReal angular_scale); | |
| | | | |
| | | /** | |
| | | * @brief Get the default maximum angular speed. | |
| | | * @ingroup damping | |
| | | * @sa dBodyGetMaxAngularSpeed() | |
| | | */ | |
| | | ODE_API dReal dWorldGetMaxAngularSpeed (dWorldID w); | |
| | | | |
| | | /** | |
| | | * @brief Set the default maximum angular speed for new bodies. | |
| | | * @ingroup damping | |
| | | * @sa dBodySetMaxAngularSpeed() | |
| | | */ | |
| | | ODE_API void dWorldSetMaxAngularSpeed (dWorldID w, dReal max_speed); | |
| | | | |
| | | /** | |
| * @defgroup bodies Rigid Bodies | | * @defgroup bodies Rigid Bodies | |
| * | | * | |
| * A rigid body has various properties from the point of view of the | | * A rigid body has various properties from the point of view of the | |
| * simulation. Some properties change over time: | | * simulation. Some properties change over time: | |
| * | | * | |
| * @li Position vector (x,y,z) of the body's point of reference. | | * @li Position vector (x,y,z) of the body's point of reference. | |
| * Currently the point of reference must correspond to the body's cent
er of mass. | | * Currently the point of reference must correspond to the body's cent
er of mass. | |
| * @li Linear velocity of the point of reference, a vector (vx,vy,vz). | | * @li Linear velocity of the point of reference, a vector (vx,vy,vz). | |
| * @li Orientation of a body, represented by a quaternion (qs,qx,qy,qz) or | | * @li Orientation of a body, represented by a quaternion (qs,qx,qy,qz) or | |
| * a 3x3 rotation matrix. | | * a 3x3 rotation matrix. | |
| | | | |
| skipping to change at line 450 | | skipping to change at line 566 | |
| * in ODE (vectors, matrices etc) are relative to the body coordinate frame
, and others | | * in ODE (vectors, matrices etc) are relative to the body coordinate frame
, and others | |
| * are relative to the global coordinate frame. | | * are relative to the global coordinate frame. | |
| * | | * | |
| * Note that the shape of a rigid body is not a dynamical property (except
insofar as | | * Note that the shape of a rigid body is not a dynamical property (except
insofar as | |
| * it influences the various mass properties). It is only collision detecti
on that cares | | * it influences the various mass properties). It is only collision detecti
on that cares | |
| * about the detailed shape of the body. | | * about the detailed shape of the body. | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * @brief Get auto disable linear average threshold. | | * @brief Get auto disable linear average threshold. | |
|
| * @ingroup bodies | | * @ingroup bodies disable | |
| * @return the threshold | | * @return the threshold | |
| */ | | */ | |
| ODE_API dReal dBodyGetAutoDisableLinearThreshold (dBodyID); | | ODE_API dReal dBodyGetAutoDisableLinearThreshold (dBodyID); | |
| | | | |
| /** | | /** | |
| * @brief Set auto disable linear average threshold. | | * @brief Set auto disable linear average threshold. | |
|
| * @ingroup bodies | | * @ingroup bodies disable | |
| * @return the threshold | | * @return the threshold | |
| */ | | */ | |
| ODE_API void dBodySetAutoDisableLinearThreshold (dBodyID, dReal linear_ave
rage_threshold); | | ODE_API void dBodySetAutoDisableLinearThreshold (dBodyID, dReal linear_ave
rage_threshold); | |
| | | | |
| /** | | /** | |
| * @brief Get auto disable angular average threshold. | | * @brief Get auto disable angular average threshold. | |
|
| * @ingroup bodies | | * @ingroup bodies disable | |
| * @return the threshold | | * @return the threshold | |
| */ | | */ | |
| ODE_API dReal dBodyGetAutoDisableAngularThreshold (dBodyID); | | ODE_API dReal dBodyGetAutoDisableAngularThreshold (dBodyID); | |
| | | | |
| /** | | /** | |
| * @brief Set auto disable angular average threshold. | | * @brief Set auto disable angular average threshold. | |
|
| * @ingroup bodies | | * @ingroup bodies disable | |
| * @return the threshold | | * @return the threshold | |
| */ | | */ | |
| ODE_API void dBodySetAutoDisableAngularThreshold (dBodyID, dReal angular_a
verage_threshold); | | ODE_API void dBodySetAutoDisableAngularThreshold (dBodyID, dReal angular_a
verage_threshold); | |
| | | | |
| /** | | /** | |
| * @brief Get auto disable average size (samples count). | | * @brief Get auto disable average size (samples count). | |
|
| * @ingroup bodies | | * @ingroup bodies disable | |
| * @return the nr of steps/size. | | * @return the nr of steps/size. | |
| */ | | */ | |
| ODE_API int dBodyGetAutoDisableAverageSamplesCount (dBodyID); | | ODE_API int dBodyGetAutoDisableAverageSamplesCount (dBodyID); | |
| | | | |
| /** | | /** | |
| * @brief Set auto disable average buffer size (average steps). | | * @brief Set auto disable average buffer size (average steps). | |
|
| * @ingroup bodies | | * @ingroup bodies disable | |
| * @param average_samples_count the nr of samples to review. | | * @param average_samples_count the nr of samples to review. | |
| */ | | */ | |
| ODE_API void dBodySetAutoDisableAverageSamplesCount (dBodyID, unsigned int
average_samples_count); | | ODE_API void dBodySetAutoDisableAverageSamplesCount (dBodyID, unsigned int
average_samples_count); | |
| | | | |
| /** | | /** | |
| * @brief Get auto steps a body must be thought of as idle to disable | | * @brief Get auto steps a body must be thought of as idle to disable | |
|
| * @ingroup bodies | | * @ingroup bodies disable | |
| * @return the nr of steps | | * @return the nr of steps | |
| */ | | */ | |
| ODE_API int dBodyGetAutoDisableSteps (dBodyID); | | ODE_API int dBodyGetAutoDisableSteps (dBodyID); | |
| | | | |
| /** | | /** | |
| * @brief Set auto disable steps. | | * @brief Set auto disable steps. | |
|
| * @ingroup bodies | | * @ingroup bodies disable | |
| * @param steps the nr of steps. | | * @param steps the nr of steps. | |
| */ | | */ | |
| ODE_API void dBodySetAutoDisableSteps (dBodyID, int steps); | | ODE_API void dBodySetAutoDisableSteps (dBodyID, int steps); | |
| | | | |
| /** | | /** | |
| * @brief Get auto disable time. | | * @brief Get auto disable time. | |
|
| * @ingroup bodies | | * @ingroup bodies disable | |
| * @return nr of seconds | | * @return nr of seconds | |
| */ | | */ | |
| ODE_API dReal dBodyGetAutoDisableTime (dBodyID); | | ODE_API dReal dBodyGetAutoDisableTime (dBodyID); | |
| | | | |
| /** | | /** | |
| * @brief Set auto disable time. | | * @brief Set auto disable time. | |
|
| * @ingroup bodies | | * @ingroup bodies disable | |
| * @param time nr of seconds. | | * @param time nr of seconds. | |
| */ | | */ | |
| ODE_API void dBodySetAutoDisableTime (dBodyID, dReal time); | | ODE_API void dBodySetAutoDisableTime (dBodyID, dReal time); | |
| | | | |
| /** | | /** | |
| * @brief Get auto disable flag. | | * @brief Get auto disable flag. | |
|
| * @ingroup bodies | | * @ingroup bodies disable | |
| * @return 0 or 1 | | * @return 0 or 1 | |
| */ | | */ | |
| ODE_API int dBodyGetAutoDisableFlag (dBodyID); | | ODE_API int dBodyGetAutoDisableFlag (dBodyID); | |
| | | | |
| /** | | /** | |
| * @brief Set auto disable flag. | | * @brief Set auto disable flag. | |
|
| * @ingroup bodies | | * @ingroup bodies disable | |
| * @param do_auto_disable 0 or 1 | | * @param do_auto_disable 0 or 1 | |
| */ | | */ | |
| ODE_API void dBodySetAutoDisableFlag (dBodyID, int do_auto_disable); | | ODE_API void dBodySetAutoDisableFlag (dBodyID, int do_auto_disable); | |
| | | | |
| /** | | /** | |
| * @brief Set auto disable defaults. | | * @brief Set auto disable defaults. | |
| * @remarks | | * @remarks | |
| * Set the values for the body to those set as default for the world. | | * Set the values for the body to those set as default for the world. | |
|
| * @ingroup bodies | | * @ingroup bodies disable | |
| */ | | */ | |
| ODE_API void dBodySetAutoDisableDefaults (dBodyID); | | ODE_API void dBodySetAutoDisableDefaults (dBodyID); | |
| | | | |
| /** | | /** | |
|
| * @brief Retrives the world attached to te given body. | | * @brief Retrieves the world attached to te given body. | |
| * @remarks | | * @remarks | |
| * | | * | |
| * @ingroup bodies | | * @ingroup bodies | |
| */ | | */ | |
| ODE_API dWorldID dBodyGetWorld (dBodyID); | | ODE_API dWorldID dBodyGetWorld (dBodyID); | |
| | | | |
| /** | | /** | |
| * @brief Create a body in given world. | | * @brief Create a body in given world. | |
| * @remarks | | * @remarks | |
| * Default mass parameters are at position (0,0,0). | | * Default mass parameters are at position (0,0,0). | |
| | | | |
| skipping to change at line 631 | | skipping to change at line 747 | |
| | | | |
| /** | | /** | |
| * @brief Get the position of a body. | | * @brief Get the position of a body. | |
| * @ingroup bodies | | * @ingroup bodies | |
| * @remarks | | * @remarks | |
| * When getting, the returned values are pointers to internal data structur
es, | | * When getting, the returned values are pointers to internal data structur
es, | |
| * so the vectors are valid until any changes are made to the rigid body | | * so the vectors are valid until any changes are made to the rigid body | |
| * system structure. | | * system structure. | |
| * @sa dBodyCopyPosition | | * @sa dBodyCopyPosition | |
| */ | | */ | |
|
| ODE_API const dReal * dBodyGetPosition (dBodyID); | | ODE_API const dReal * dBodyGetPosition (dBodyID); | |
| | | | |
| /** | | /** | |
| * @brief Copy the position of a body into a vector. | | * @brief Copy the position of a body into a vector. | |
| * @ingroup bodies | | * @ingroup bodies | |
| * @param body the body to query | | * @param body the body to query | |
| * @param pos a copy of the body position | | * @param pos a copy of the body position | |
| * @sa dBodyGetPosition | | * @sa dBodyGetPosition | |
| */ | | */ | |
| ODE_API void dBodyCopyPosition (dBodyID body, dVector3 pos); | | ODE_API void dBodyCopyPosition (dBodyID body, dVector3 pos); | |
| | | | |
| /** | | /** | |
| * @brief Get the rotation of a body. | | * @brief Get the rotation of a body. | |
| * @ingroup bodies | | * @ingroup bodies | |
| * @return pointer to a 4x3 rotation matrix. | | * @return pointer to a 4x3 rotation matrix. | |
| */ | | */ | |
|
| ODE_API const dReal * dBodyGetRotation (dBodyID); | | ODE_API const dReal * dBodyGetRotation (dBodyID); | |
| | | | |
| /** | | /** | |
| * @brief Copy the rotation of a body. | | * @brief Copy the rotation of a body. | |
| * @ingroup bodies | | * @ingroup bodies | |
| * @param body the body to query | | * @param body the body to query | |
| * @param R a copy of the rotation matrix | | * @param R a copy of the rotation matrix | |
| * @sa dBodyGetRotation | | * @sa dBodyGetRotation | |
| */ | | */ | |
| ODE_API void dBodyCopyRotation (dBodyID, dMatrix3 R); | | ODE_API void dBodyCopyRotation (dBodyID, dMatrix3 R); | |
| | | | |
| | | | |
| skipping to change at line 678 | | skipping to change at line 794 | |
| * @param body the body to query | | * @param body the body to query | |
| * @param quat a copy of the orientation quaternion | | * @param quat a copy of the orientation quaternion | |
| * @sa dBodyGetQuaternion | | * @sa dBodyGetQuaternion | |
| */ | | */ | |
| ODE_API void dBodyCopyQuaternion(dBodyID body, dQuaternion quat); | | ODE_API void dBodyCopyQuaternion(dBodyID body, dQuaternion quat); | |
| | | | |
| /** | | /** | |
| * @brief Get the linear velocity of a body. | | * @brief Get the linear velocity of a body. | |
| * @ingroup bodies | | * @ingroup bodies | |
| */ | | */ | |
|
| ODE_API const dReal * dBodyGetLinearVel (dBodyID); | | ODE_API const dReal * dBodyGetLinearVel (dBodyID); | |
| | | | |
| /** | | /** | |
| * @brief Get the angular velocity of a body. | | * @brief Get the angular velocity of a body. | |
| * @ingroup bodies | | * @ingroup bodies | |
| */ | | */ | |
| ODE_API const dReal * dBodyGetAngularVel (dBodyID); | | ODE_API const dReal * dBodyGetAngularVel (dBodyID); | |
| | | | |
| /** | | /** | |
| * @brief Set the mass of a body. | | * @brief Set the mass of a body. | |
| * @ingroup bodies | | * @ingroup bodies | |
| | | | |
| skipping to change at line 756 | | skipping to change at line 872 | |
| | | | |
| /** | | /** | |
| * @brief Return the current accumulated force vector. | | * @brief Return the current accumulated force vector. | |
| * @return points to an array of 3 reals. | | * @return points to an array of 3 reals. | |
| * @remarks | | * @remarks | |
| * The returned values are pointers to internal data structures, so | | * The returned values are pointers to internal data structures, so | |
| * the vectors are only valid until any changes are made to the rigid | | * the vectors are only valid until any changes are made to the rigid | |
| * body system. | | * body system. | |
| * @ingroup bodies | | * @ingroup bodies | |
| */ | | */ | |
|
| ODE_API const dReal * dBodyGetForce (dBodyID); | | ODE_API const dReal * dBodyGetForce (dBodyID); | |
| | | | |
| /** | | /** | |
| * @brief Return the current accumulated torque vector. | | * @brief Return the current accumulated torque vector. | |
| * @return points to an array of 3 reals. | | * @return points to an array of 3 reals. | |
| * @remarks | | * @remarks | |
| * The returned values are pointers to internal data structures, so | | * The returned values are pointers to internal data structures, so | |
| * the vectors are only valid until any changes are made to the rigid | | * the vectors are only valid until any changes are made to the rigid | |
| * body system. | | * body system. | |
| * @ingroup bodies | | * @ingroup bodies | |
| */ | | */ | |
|
| ODE_API const dReal * dBodyGetTorque (dBodyID); | | ODE_API const dReal * dBodyGetTorque (dBodyID); | |
| | | | |
| /** | | /** | |
| * @brief Set the body force accumulation vector. | | * @brief Set the body force accumulation vector. | |
| * @remarks | | * @remarks | |
| * This is mostly useful to zero the force and torque for deactivated bodie
s | | * This is mostly useful to zero the force and torque for deactivated bodie
s | |
| * before they are reactivated, in the case where the force-adding function
s | | * before they are reactivated, in the case where the force-adding function
s | |
| * were called on them while they were deactivated. | | * were called on them while they were deactivated. | |
| * @ingroup bodies | | * @ingroup bodies | |
| */ | | */ | |
| ODE_API void dBodySetForce (dBodyID b, dReal x, dReal y, dReal z); | | ODE_API void dBodySetForce (dBodyID b, dReal x, dReal y, dReal z); | |
| | | | |
| skipping to change at line 965 | | skipping to change at line 1081 | |
| ODE_API void dBodySetGravityMode (dBodyID b, int mode); | | ODE_API void dBodySetGravityMode (dBodyID b, int mode); | |
| | | | |
| /** | | /** | |
| * @brief Get whether the body is influenced by the world's gravity or not. | | * @brief Get whether the body is influenced by the world's gravity or not. | |
| * @ingroup bodies | | * @ingroup bodies | |
| * @return nonzero means gravity affects this body. | | * @return nonzero means gravity affects this body. | |
| */ | | */ | |
| ODE_API int dBodyGetGravityMode (dBodyID b); | | ODE_API int dBodyGetGravityMode (dBodyID b); | |
| | | | |
| /** | | /** | |
|
| | | * @brief Set the 'moved' callback of a body. | |
| | | * | |
| | | * Whenever a body has its position or rotation changed during the | |
| | | * timestep, the callback will be called (with body as the argument). | |
| | | * Use it to know which body may need an update in an external | |
| | | * structure (like a 3D engine). | |
| | | * | |
| | | * @param b the body that needs to be watched. | |
| | | * @param callback the callback to be invoked when the body moves. Set to z | |
| | | ero | |
| | | * to disable. | |
| | | * @ingroup bodies | |
| | | */ | |
| | | ODE_API void dBodySetMovedCallback(dBodyID b, void (*callback)(dBodyID)); | |
| | | | |
| | | /** | |
| | | * @brief Return the first geom associated with the body. | |
| | | * | |
| | | * You can traverse through the geoms by repeatedly calling | |
| | | * dBodyGetNextGeom(). | |
| | | * | |
| | | * @return the first geom attached to this body, or 0. | |
| | | * @ingroup bodies | |
| | | */ | |
| | | ODE_API dGeomID dBodyGetFirstGeom (dBodyID b); | |
| | | | |
| | | /** | |
| | | * @brief returns the next geom associated with the same body. | |
| | | * @param g a geom attached to some body. | |
| | | * @return the next geom attached to the same body, or 0. | |
| | | * @sa dBodyGetFirstGeom | |
| | | * @ingroup bodies | |
| | | */ | |
| | | ODE_API dGeomID dBodyGetNextGeom (dGeomID g); | |
| | | | |
| | | /** | |
| | | * @brief Resets the damping settings to the current world's settings. | |
| | | * @ingroup bodies damping | |
| | | */ | |
| | | ODE_API void dBodySetDampingDefaults(dBodyID b); | |
| | | | |
| | | /** | |
| | | * @brief Get the body's linear damping scale. | |
| | | * @ingroup bodies damping | |
| | | */ | |
| | | ODE_API dReal dBodyGetLinearDamping (dBodyID b); | |
| | | | |
| | | /** | |
| | | * @brief Set the body's linear damping scale. | |
| | | * @param scale The linear damping scale. Should be in the interval [0, 1]. | |
| | | * @ingroup bodies damping | |
| | | * @remarks From now on the body will not use the world's linear damping | |
| | | * scale until dBodySetDampingDefaults() is called. | |
| | | * @sa dBodySetDampingDefaults() | |
| | | */ | |
| | | ODE_API void dBodySetLinearDamping(dBodyID b, dReal scale); | |
| | | | |
| | | /** | |
| | | * @brief Get the body's angular damping scale. | |
| | | * @ingroup bodies damping | |
| | | * @remarks If the body's angular damping scale was not set, this function | |
| | | * returns the world's angular damping scale. | |
| | | */ | |
| | | ODE_API dReal dBodyGetAngularDamping (dBodyID b); | |
| | | | |
| | | /** | |
| | | * @brief Set the body's angular damping scale. | |
| | | * @param scale The angular damping scale. Should be in the interval [0, 1] | |
| | | . | |
| | | * @ingroup bodies damping | |
| | | * @remarks From now on the body will not use the world's angular damping | |
| | | * scale until dBodyResetAngularDamping() is called. | |
| | | * @sa dBodyResetAngularDamping() | |
| | | */ | |
| | | ODE_API void dBodySetAngularDamping(dBodyID b, dReal scale); | |
| | | | |
| | | /** | |
| | | * @brief Convenience function to set linear and angular scales at once. | |
| | | * @param linear_scale The linear damping scale. Should be in the interval | |
| | | [0, 1]. | |
| | | * @param angular_scale The angular damping scale. Should be in the interva | |
| | | l [0, 1]. | |
| | | * @ingroup bodies damping | |
| | | * @sa dBodySetLinearDamping() dBodySetAngularDamping() | |
| | | */ | |
| | | ODE_API void dBodySetDamping(dBodyID b, dReal linear_scale, dReal angular_s | |
| | | cale); | |
| | | | |
| | | /** | |
| | | * @brief Get the body's linear damping threshold. | |
| | | * @ingroup bodies damping | |
| | | */ | |
| | | ODE_API dReal dBodyGetLinearDampingThreshold (dBodyID b); | |
| | | | |
| | | /** | |
| | | * @brief Set the body's linear damping threshold. | |
| | | * @param threshold The linear threshold to be used. Damping | |
| | | * is only applied if the linear speed is above this limit. | |
| | | * @ingroup bodies damping | |
| | | */ | |
| | | ODE_API void dBodySetLinearDampingThreshold(dBodyID b, dReal threshold); | |
| | | | |
| | | /** | |
| | | * @brief Get the body's angular damping threshold. | |
| | | * @ingroup bodies damping | |
| | | */ | |
| | | ODE_API dReal dBodyGetAngularDampingThreshold (dBodyID b); | |
| | | | |
| | | /** | |
| | | * @brief Set the body's angular damping threshold. | |
| | | * @param threshold The angular threshold to be used. Damping is | |
| | | * only used if the angular speed is above this limit. | |
| | | * @ingroup bodies damping | |
| | | */ | |
| | | ODE_API void dBodySetAngularDampingThreshold(dBodyID b, dReal threshold); | |
| | | | |
| | | /** | |
| | | * @brief Get the body's maximum angular speed. | |
| | | * @ingroup damping bodies | |
| | | * @sa dWorldGetMaxAngularSpeed() | |
| | | */ | |
| | | ODE_API dReal dBodyGetMaxAngularSpeed (dBodyID b); | |
| | | | |
| | | /** | |
| | | * @brief Set the body's maximum angular speed. | |
| | | * @ingroup damping bodies | |
| | | * @sa dWorldSetMaxAngularSpeed() dBodyResetMaxAngularSpeed() | |
| | | * The default value is dInfinity, but it's a good idea to limit | |
| | | * it at less than 500 if you build ODE with the gyroscopic term | |
| | | * enabled. | |
| | | */ | |
| | | ODE_API void dBodySetMaxAngularSpeed(dBodyID b, dReal max_speed); | |
| | | | |
| | | /** | |
| * @defgroup joints Joints | | * @defgroup joints Joints | |
| * | | * | |
| * In real life a joint is something like a hinge, that is used to connect
two | | * In real life a joint is something like a hinge, that is used to connect
two | |
| * objects. | | * objects. | |
| * In ODE a joint is very similar: It is a relationship that is enforced be
tween | | * In ODE a joint is very similar: It is a relationship that is enforced be
tween | |
| * two bodies so that they can only have certain positions and orientations | | * two bodies so that they can only have certain positions and orientations | |
| * relative to each other. | | * relative to each other. | |
| * This relationship is called a constraint -- the words joint and | | * This relationship is called a constraint -- the words joint and | |
| * constraint are often used interchangeably. | | * constraint are often used interchangeably. | |
| * | | * | |
| | | | |
| skipping to change at line 1088 | | skipping to change at line 1333 | |
| ODE_API dJointID dJointCreateUniversal (dWorldID, dJointGroupID); | | ODE_API dJointID dJointCreateUniversal (dWorldID, dJointGroupID); | |
| | | | |
| /** | | /** | |
| * @brief Create a new joint of the PR (Prismatic and Rotoide) type. | | * @brief Create a new joint of the PR (Prismatic and Rotoide) type. | |
| * @ingroup joints | | * @ingroup joints | |
| * @param dJointGroupID set to 0 to allocate the joint normally. | | * @param dJointGroupID set to 0 to allocate the joint normally. | |
| * If it is nonzero the joint is allocated in the given joint group. | | * If it is nonzero the joint is allocated in the given joint group. | |
| */ | | */ | |
| ODE_API dJointID dJointCreatePR (dWorldID, dJointGroupID); | | ODE_API dJointID dJointCreatePR (dWorldID, dJointGroupID); | |
| | | | |
|
| | | /** | |
| | | * @brief Create a new joint of the PU (Prismatic and Universal) type. | |
| | | * @ingroup joints | |
| | | * @param dJointGroupID set to 0 to allocate the joint normally. | |
| | | * If it is nonzero the joint is allocated in the given joint group. | |
| | | */ | |
| | | ODE_API dJointID dJointCreatePU (dWorldID, dJointGroupID); | |
| | | | |
| | | /** | |
| | | * @brief Create a new joint of the Piston type. | |
| | | * @ingroup joints | |
| | | * @param dJointGroupID set to 0 to allocate the joint normally. | |
| | | * If it is nonzero the joint is allocated in the gi | |
| | | ven | |
| | | * joint group. | |
| | | */ | |
| | | ODE_API dJointID dJointCreatePiston (dWorldID, dJointGroupID); | |
| | | | |
| /** | | /** | |
| * @brief Create a new joint of the fixed type. | | * @brief Create a new joint of the fixed type. | |
| * @ingroup joints | | * @ingroup joints | |
| * @param dJointGroupID set to 0 to allocate the joint normally. | | * @param dJointGroupID set to 0 to allocate the joint normally. | |
| * If it is nonzero the joint is allocated in the given joint group. | | * If it is nonzero the joint is allocated in the given joint group. | |
| */ | | */ | |
| ODE_API dJointID dJointCreateFixed (dWorldID, dJointGroupID); | | ODE_API dJointID dJointCreateFixed (dWorldID, dJointGroupID); | |
| | | | |
| ODE_API dJointID dJointCreateNull (dWorldID, dJointGroupID); | | ODE_API dJointID dJointCreateNull (dWorldID, dJointGroupID); | |
| | | | |
| | | | |
| skipping to change at line 1157 | | skipping to change at line 1419 | |
| /** | | /** | |
| * @brief Empty a joint group. | | * @brief Empty a joint group. | |
| * @ingroup joints | | * @ingroup joints | |
| * | | * | |
| * All joints in the joint group will be destroyed, | | * All joints in the joint group will be destroyed, | |
| * but the joint group itself will not be destroyed. | | * but the joint group itself will not be destroyed. | |
| */ | | */ | |
| ODE_API void dJointGroupEmpty (dJointGroupID); | | ODE_API void dJointGroupEmpty (dJointGroupID); | |
| | | | |
| /** | | /** | |
|
| | | * @brief Return the number of bodies attached to the joint | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API int dJointGetNumBodies(dJointID); | |
| | | | |
| | | /** | |
| * @brief Attach the joint to some new bodies. | | * @brief Attach the joint to some new bodies. | |
| * @ingroup joints | | * @ingroup joints | |
| * | | * | |
| * If the joint is already attached, it will be detached from the old bodie
s | | * If the joint is already attached, it will be detached from the old bodie
s | |
| * first. | | * first. | |
| * To attach this joint to only one body, set body1 or body2 to zero - a ze
ro | | * To attach this joint to only one body, set body1 or body2 to zero - a ze
ro | |
| * body refers to the static environment. | | * body refers to the static environment. | |
| * Setting both bodies to zero puts the joint into "limbo", i.e. it will | | * Setting both bodies to zero puts the joint into "limbo", i.e. it will | |
| * have no effect on the simulation. | | * have no effect on the simulation. | |
| * @remarks | | * @remarks | |
| | | | |
| skipping to change at line 1187 | | skipping to change at line 1455 | |
| /** | | /** | |
| * @brief Get the user-data pointer | | * @brief Get the user-data pointer | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
| ODE_API void *dJointGetData (dJointID); | | ODE_API void *dJointGetData (dJointID); | |
| | | | |
| /** | | /** | |
| * @brief Get the type of the joint | | * @brief Get the type of the joint | |
| * @ingroup joints | | * @ingroup joints | |
| * @return the type, being one of these: | | * @return the type, being one of these: | |
|
| * \li JointTypeBall | | * \li dJointTypeBall | |
| * \li JointTypeHinge | | * \li dJointTypeHinge | |
| * \li JointTypeSlider | | * \li dJointTypeSlider | |
| * \li JointTypeContact | | * \li dJointTypeContact | |
| * \li JointTypeUniversal | | * \li dJointTypeUniversal | |
| * \li JointTypeHinge2 | | * \li dJointTypeHinge2 | |
| * \li JointTypeFixed | | * \li dJointTypeFixed | |
| * \li JointTypeAMotor | | * \li dJointTypeNull | |
| * \li JointTypeLMotor | | * \li dJointTypeAMotor | |
| | | * \li dJointTypeLMotor | |
| | | * \li dJointTypePlane2D | |
| | | * \li dJointTypePR | |
| | | * \li dJointTypePU | |
| | | * \li dJointTypePiston | |
| */ | | */ | |
|
| ODE_API int dJointGetType (dJointID); | | ODE_API dJointType dJointGetType (dJointID); | |
| | | | |
| /** | | /** | |
| * @brief Return the bodies that this joint connects. | | * @brief Return the bodies that this joint connects. | |
| * @ingroup joints | | * @ingroup joints | |
| * @param index return the first (0) or second (1) body. | | * @param index return the first (0) or second (1) body. | |
| * @remarks | | * @remarks | |
| * If one of these returned body IDs is zero, the joint connects the other
body | | * If one of these returned body IDs is zero, the joint connects the other
body | |
| * to the static environment. | | * to the static environment. | |
| * If both body IDs are zero, the joint is in ``limbo'' and has no effect o
n | | * If both body IDs are zero, the joint is in ``limbo'' and has no effect o
n | |
| * the simulation. | | * the simulation. | |
| | | | |
| skipping to change at line 1404 | | skipping to change at line 1677 | |
| /** | | /** | |
| * @brief Applies the torque about the rotoide axis of the PR joint | | * @brief Applies the torque about the rotoide axis of the PR 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 oppos
ite | | * of the rotoide axis, to body 1, and with the same magnitude but in oppos
ite | |
| * direction to body 2. This function is just a wrapper for dBodyAddTorque(
)} | | * direction to body 2. This function is just a wrapper for dBodyAddTorque(
)} | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
| ODE_API void dJointAddPRTorque (dJointID j, dReal torque); | | ODE_API void dJointAddPRTorque (dJointID j, dReal torque); | |
| | | | |
|
| | | /** | |
| | | * @brief set anchor | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointSetPUAnchor (dJointID, dReal x, dReal y, dReal z); | |
| | | | |
| | | /** | |
| | | * @brief set anchor | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointSetPUAnchorDelta (dJointID, dReal x, dReal y, dReal z, | |
| | | dReal dx, dReal dy, dReal dz); | |
| | | | |
| | | /** | |
| | | * @brief set the axis for the first axis or the universal articulation | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointSetPUAxis1 (dJointID, dReal x, dReal y, dReal z); | |
| | | | |
| | | /** | |
| | | * @brief set the axis for the second axis or the universal articulation | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointSetPUAxis2 (dJointID, dReal x, dReal y, dReal z); | |
| | | | |
| | | /** | |
| | | * @brief set the axis for the prismatic articulation | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointSetPUAxis3 (dJointID, dReal x, dReal y, dReal z); | |
| | | | |
| | | /** | |
| | | * @brief set the axis for the prismatic articulation | |
| | | * @ingroup joints | |
| | | * @note This function was added for convenience it is the same as | |
| | | * dJointSetPUAxis3 | |
| | | */ | |
| | | ODE_API void dJointSetPUAxisP (dJointID id, dReal x, dReal y, dReal z); | |
| | | | |
| | | /** | |
| | | * @brief set joint parameter | |
| | | * @ingroup joints | |
| | | * | |
| | | * @note parameterX where X equal 2 refer to parameter for second axis of | |
| | | the | |
| | | * universal articulation | |
| | | * @note parameterX where X equal 3 refer to parameter for prismatic | |
| | | * articulation | |
| | | */ | |
| | | ODE_API void dJointSetPUParam (dJointID, int parameter, dReal value); | |
| | | | |
| | | /** | |
| | | * @brief Applies the torque about the rotoide axis of the PU joint | |
| | | * | |
| | | * 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 | |
| | | * direction to body 2. This function is just a wrapper for dBodyAddTorqu | |
| | | e()} | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointAddPUTorque (dJointID j, dReal torque); | |
| | | | |
| | | /** | |
| | | * @brief set the joint axis | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointSetPistonAnchor (dJointID, dReal x, dReal y, dReal z); | |
| | | | |
| | | /** | |
| | | * @brief set the joint axis | |
| | | * @ingroup joints | |
| | | */ | |
| | | 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 | |
| | | * of the joint. | |
| | | * | |
| | | * @ingroup joints | |
| | | * @param j The joint affected by this function | |
| | | * @param x The x component of the axis | |
| | | * @param y The y 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 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 | |
| | | */ | |
| | | ODE_API void dJointSetPistonAxisDelta (dJointID j, dReal x, dReal y, dRea | |
| | | l z, dReal ax, dReal ay, dReal az); | |
| | | | |
| | | /** | |
| | | * @brief set joint parameter | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointSetPistonParam (dJointID, int parameter, dReal value); | |
| | | | |
| | | /** | |
| | | * @brief Applies the given force in the slider's direction. | |
| | | * | |
| | | * That is, it applies a force with specified magnitude, in the direction | |
| | | of | |
| | | * prismatic's axis, to body1, and with the same magnitude but opposite | |
| | | * direction to body2. This function is just a wrapper for dBodyAddForce | |
| | | (). | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointAddPistonForce (dJointID joint, dReal force); | |
| | | | |
| /** | | /** | |
| * @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 | | * @brief Sets joint parameter | |
| | | | |
| skipping to change at line 1788 | | skipping to change at line 2164 | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
| ODE_API void dJointGetPRAxis2 (dJointID, dVector3 result); | | ODE_API void dJointGetPRAxis2 (dJointID, dVector3 result); | |
| | | | |
| /** | | /** | |
| * @brief get joint parameter | | * @brief get joint parameter | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
| ODE_API dReal dJointGetPRParam (dJointID, int parameter); | | ODE_API dReal dJointGetPRParam (dJointID, int parameter); | |
| | | | |
|
| /** | | /** | |
| | | * @brief Get the joint anchor point, in world coordinates. | |
| | | * @return the point on body 1. If the joint is perfectly satisfied, | |
| | | * this will be the same as the point on body 2. | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointGetPUAnchor (dJointID, dVector3 result); | |
| | | | |
| | | /** | |
| | | * @brief Get the PU linear position (i.e. the prismatic's extension) | |
| | | * | |
| | | * When the axis is set, the current position of the attached bodies is | |
| | | * examined and that position will be the zero position. | |
| | | * | |
| | | * The position is the "oriented" length between the | |
| | | * position = (Prismatic axis) dot_product [(body1 + offset) - (body2 + a | |
| | | nchor2)] | |
| | | * | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API dReal dJointGetPUPosition (dJointID); | |
| | | | |
| | | /** | |
| | | * @brief Get the PR linear position's time derivative | |
| | | * | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API dReal dJointGetPUPositionRate (dJointID); | |
| | | | |
| | | /** | |
| | | * @brief Get the first axis of the universal component of the joint | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointGetPUAxis1 (dJointID, dVector3 result); | |
| | | | |
| | | /** | |
| | | * @brief Get the second axis of the Universal component of the joint | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointGetPUAxis2 (dJointID, dVector3 result); | |
| | | | |
| | | /** | |
| | | * @brief Get the prismatic axis | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointGetPUAxis3 (dJointID, dVector3 result); | |
| | | | |
| | | /** | |
| | | * @brief Get the prismatic axis | |
| | | * @ingroup joints | |
| | | * | |
| | | * @note This function was added for convenience it is the same as | |
| | | * dJointGetPUAxis3 | |
| | | */ | |
| | | ODE_API void dJointGetPUAxisP (dJointID id, dVector3 result); | |
| | | | |
| | | /** | |
| | | * @brief Get both angles at the same time. | |
| | | * @ingroup joints | |
| | | * | |
| | | * @param joint The Prismatic universal joint for which we want to calc | |
| | | ulate the angles | |
| | | * @param angle1 The angle between the body1 and the axis 1 | |
| | | * @param angle2 The angle between the body2 and the axis 2 | |
| | | * | |
| | | * @note This function combine dJointGetPUAngle1 and dJointGetPUAngle2 to | |
| | | gether | |
| | | * and try to avoid redundant calculation | |
| | | */ | |
| | | ODE_API void dJointGetPUAngles (dJointID, dReal *angle1, dReal *angle2); | |
| | | | |
| | | /** | |
| | | * @brief Get angle | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API dReal dJointGetPUAngle1 (dJointID); | |
| | | | |
| | | /** | |
| | | * @brief * @brief Get time derivative of angle1 | |
| | | * | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API dReal dJointGetPUAngle1Rate (dJointID); | |
| | | | |
| | | /** | |
| | | * @brief Get angle | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API dReal dJointGetPUAngle2 (dJointID); | |
| | | | |
| | | /** | |
| | | * @brief * @brief Get time derivative of angle2 | |
| | | * | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API dReal dJointGetPUAngle2Rate (dJointID); | |
| | | | |
| | | /** | |
| | | * @brief get joint parameter | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API dReal dJointGetPUParam (dJointID, int parameter); | |
| | | | |
| | | /** | |
| | | * @brief Get the Piston linear position (i.e. the piston's extension) | |
| | | * | |
| | | * When the axis is set, the current position of the attached bodies is | |
| | | * examined and that position will be the zero position. | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API dReal dJointGetPistonPosition (dJointID); | |
| | | | |
| | | /** | |
| | | * @brief Get the piston linear position's time derivative. | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API dReal dJointGetPistonPositionRate (dJointID); | |
| | | | |
| | | /** | |
| | | * @brief Get the Piston angular position (i.e. the twist between the 2 | |
| | | bodies) | |
| | | * | |
| | | * When the axis is set, the current position of the attached bodies is | |
| | | * examined and that position will be the zero position. | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API dReal dJointGetPistonAngle (dJointID); | |
| | | | |
| | | /** | |
| | | * @brief Get the piston angular position's time derivative. | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API dReal dJointGetPistonAngleRate (dJointID); | |
| | | | |
| | | /** | |
| | | * @brief Get the joint anchor | |
| | | * | |
| | | * This returns the point on body 1. If the joint is perfectly satisfied, | |
| | | * this will be the same as the point on body 2 in direction perpendicula | |
| | | r | |
| | | * to the prismatic axis. | |
| | | * | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointGetPistonAnchor (dJointID, dVector3 result); | |
| | | | |
| | | /** | |
| | | * @brief Get the joint anchor w.r.t. body 2 | |
| | | * | |
| | | * This returns the point on body 2. You can think of a Piston | |
| | | * joint as trying to keep the result of dJointGetPistonAnchor() and | |
| | | * dJointGetPistonAnchor2() the same in the direction perpendicular to th | |
| | | e | |
| | | * pirsmatic axis. If the joint is perfectly satisfied, | |
| | | * this function will return the same value as dJointGetPistonAnchor() to | |
| | | * within roundoff errors. dJointGetPistonAnchor2() can be used, along wi | |
| | | th | |
| | | * dJointGetPistonAnchor(), to see how far the joint has come apart. | |
| | | * | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointGetPistonAnchor2 (dJointID, dVector3 result); | |
| | | | |
| | | /** | |
| | | * @brief Get the prismatic axis (This is also the rotoide axis. | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointGetPistonAxis (dJointID, dVector3 result); | |
| | | | |
| | | /** | |
| | | * @brief get joint parameter | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API dReal dJointGetPistonParam (dJointID, int parameter); | |
| | | | |
| | | /** | |
| * @brief Get the number of angular axes that will be controlled by the | | * @brief Get the number of angular axes that will be controlled by the | |
| * AMotor. | | * AMotor. | |
| * @param num can range from 0 (which effectively deactivates the | | * @param num can range from 0 (which effectively deactivates the | |
| * joint) to 3. | | * joint) to 3. | |
| * This is automatically set to 3 in dAMotorEuler mode. | | * This is automatically set to 3 in dAMotorEuler mode. | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
| ODE_API int dJointGetAMotorNumAxes (dJointID); | | ODE_API int dJointGetAMotorNumAxes (dJointID); | |
| | | | |
| /** | | /** | |
| | | | |
End of changes. 28 change blocks. |
| 30 lines changed or deleted | | 608 lines changed or added | |
|
| odecpp.h | | odecpp.h | |
| | | | |
| skipping to change at line 29 | | skipping to change at line 29 | |
| * LICENSE.TXT and LICENSE-BSD.TXT for more details. * | | * LICENSE.TXT and LICENSE-BSD.TXT for more details. * | |
| * * | | * * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| /* C++ interface for non-collision stuff */ | | /* C++ interface for non-collision stuff */ | |
| | | | |
| #ifndef _ODE_ODECPP_H_ | | #ifndef _ODE_ODECPP_H_ | |
| #define _ODE_ODECPP_H_ | | #define _ODE_ODECPP_H_ | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| | | | |
|
| #include <ode/error.h> | | //namespace ode { | |
| | | | |
| class dWorld { | | class dWorld { | |
| dWorldID _id; | | dWorldID _id; | |
| | | | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dWorld (const dWorld &); | | dWorld (const dWorld &); | |
| void operator= (const dWorld &); | | void operator= (const dWorld &); | |
| | | | |
| public: | | public: | |
| dWorld() | | dWorld() | |
| | | | |
| skipping to change at line 51 | | skipping to change at line 51 | |
| ~dWorld() | | ~dWorld() | |
| { dWorldDestroy (_id); } | | { dWorldDestroy (_id); } | |
| | | | |
| dWorldID id() const | | dWorldID id() const | |
| { return _id; } | | { return _id; } | |
| operator dWorldID() const | | operator dWorldID() const | |
| { return _id; } | | { return _id; } | |
| | | | |
| void setGravity (dReal x, dReal y, dReal z) | | void setGravity (dReal x, dReal y, dReal z) | |
| { dWorldSetGravity (_id,x,y,z); } | | { dWorldSetGravity (_id,x,y,z); } | |
|
| | | void setGravity (const dVector3 g) | |
| | | { setGravity (g[0], g[1], g[2]); } | |
| void getGravity (dVector3 g) const | | void getGravity (dVector3 g) const | |
| { dWorldGetGravity (_id,g); } | | { dWorldGetGravity (_id,g); } | |
| | | | |
| void setERP (dReal erp) | | void setERP (dReal erp) | |
| { dWorldSetERP(_id, erp); } | | { dWorldSetERP(_id, erp); } | |
| dReal getERP() const | | dReal getERP() const | |
| { return dWorldGetERP(_id); } | | { return dWorldGetERP(_id); } | |
| | | | |
| void setCFM (dReal cfm) | | void setCFM (dReal cfm) | |
| { dWorldSetCFM(_id, cfm); } | | { dWorldSetCFM(_id, cfm); } | |
| dReal getCFM() const | | dReal getCFM() const | |
| { return dWorldGetCFM(_id); } | | { return dWorldGetCFM(_id); } | |
| | | | |
| void step (dReal stepsize) | | void step (dReal stepsize) | |
| { dWorldStep (_id,stepsize); } | | { dWorldStep (_id,stepsize); } | |
| | | | |
| void stepFast1 (dReal stepsize, int maxiterations) | | void stepFast1 (dReal stepsize, int maxiterations) | |
| { dWorldStepFast1 (_id,stepsize,maxiterations); } | | { dWorldStepFast1 (_id,stepsize,maxiterations); } | |
| void setAutoEnableDepthSF1(dWorldID, int depth) | | void setAutoEnableDepthSF1(dWorldID, int depth) | |
| { dWorldSetAutoEnableDepthSF1 (_id, depth); } | | { dWorldSetAutoEnableDepthSF1 (_id, depth); } | |
|
| int getAutoEnableDepthSF1(dWorldID) | | int getAutoEnableDepthSF1(dWorldID) const | |
| { return dWorldGetAutoEnableDepthSF1 (_id); } | | { return dWorldGetAutoEnableDepthSF1 (_id); } | |
| | | | |
|
| | | void quickStep(dReal stepsize) | |
| | | { dWorldQuickStep (_id, stepsize); } | |
| | | void setQuickStepNumIterations(int num) | |
| | | { dWorldSetQuickStepNumIterations (_id, num); } | |
| | | int getQuickStepNumIterations() const | |
| | | { return dWorldGetQuickStepNumIterations (_id); } | |
| | | void setQuickStepW(dReal over_relaxation) | |
| | | { dWorldSetQuickStepW (_id, over_relaxation); } | |
| | | dReal getQuickStepW() const | |
| | | { return dWorldGetQuickStepW (_id); } | |
| | | | |
| void setAutoDisableLinearThreshold (dReal threshold) | | void setAutoDisableLinearThreshold (dReal threshold) | |
| { dWorldSetAutoDisableLinearThreshold (_id,threshold); } | | { dWorldSetAutoDisableLinearThreshold (_id,threshold); } | |
|
| dReal getAutoDisableLinearThreshold() | | dReal getAutoDisableLinearThreshold() const | |
| { return dWorldGetAutoDisableLinearThreshold (_id); } | | { return dWorldGetAutoDisableLinearThreshold (_id); } | |
| void setAutoDisableAngularThreshold (dReal threshold) | | void setAutoDisableAngularThreshold (dReal threshold) | |
| { dWorldSetAutoDisableAngularThreshold (_id,threshold); } | | { dWorldSetAutoDisableAngularThreshold (_id,threshold); } | |
|
| dReal getAutoDisableAngularThreshold() | | dReal getAutoDisableAngularThreshold() const | |
| { return dWorldGetAutoDisableAngularThreshold (_id); } | | { return dWorldGetAutoDisableAngularThreshold (_id); } | |
| void setAutoDisableSteps (int steps) | | void setAutoDisableSteps (int steps) | |
| { dWorldSetAutoDisableSteps (_id,steps); } | | { dWorldSetAutoDisableSteps (_id,steps); } | |
|
| int getAutoDisableSteps() | | int getAutoDisableSteps() const | |
| { return dWorldGetAutoDisableSteps (_id); } | | { return dWorldGetAutoDisableSteps (_id); } | |
| void setAutoDisableTime (dReal time) | | void setAutoDisableTime (dReal time) | |
| { dWorldSetAutoDisableTime (_id,time); } | | { dWorldSetAutoDisableTime (_id,time); } | |
|
| dReal getAutoDisableTime() | | dReal getAutoDisableTime() const | |
| { return dWorldGetAutoDisableTime (_id); } | | { return dWorldGetAutoDisableTime (_id); } | |
| void setAutoDisableFlag (int do_auto_disable) | | void setAutoDisableFlag (int do_auto_disable) | |
| { dWorldSetAutoDisableFlag (_id,do_auto_disable); } | | { dWorldSetAutoDisableFlag (_id,do_auto_disable); } | |
|
| int getAutoDisableFlag() | | int getAutoDisableFlag() const | |
| { return dWorldGetAutoDisableFlag (_id); } | | { return dWorldGetAutoDisableFlag (_id); } | |
| | | | |
|
| | | dReal getLinearDampingThreshold() const | |
| | | { return dWorldGetLinearDampingThreshold(_id); } | |
| | | void setLinearDampingThreshold(dReal threshold) | |
| | | { dWorldSetLinearDampingThreshold(_id, threshold); } | |
| | | dReal getAngularDampingThreshold() const | |
| | | { return dWorldGetAngularDampingThreshold(_id); } | |
| | | void setAngularDampingThreshold(dReal threshold) | |
| | | { dWorldSetAngularDampingThreshold(_id, threshold); } | |
| | | dReal getLinearDamping() const | |
| | | { return dWorldGetLinearDamping(_id); } | |
| | | void setLinearDamping(dReal scale) | |
| | | { dWorldSetLinearDamping(_id, scale); } | |
| | | dReal getAngularDamping() const | |
| | | { return dWorldGetAngularDamping(_id); } | |
| | | void setAngularDamping(dReal scale) | |
| | | { dWorldSetAngularDamping(_id, scale); } | |
| | | void setDamping(dReal linear_scale, dReal angular_scale) | |
| | | { dWorldSetDamping(_id, linear_scale, angular_scale); } | |
| | | | |
| | | dReal getMaxAngularSpeed() const | |
| | | { return dWorldGetMaxAngularSpeed(_id); } | |
| | | void setMaxAngularSpeed(dReal max_speed) | |
| | | { dWorldSetMaxAngularSpeed(_id, max_speed); } | |
| | | | |
| | | void setContactSurfaceLayer(dReal depth) | |
| | | { dWorldSetContactSurfaceLayer (_id, depth); } | |
| | | dReal getContactSurfaceLayer() const | |
| | | { return dWorldGetContactSurfaceLayer (_id); } | |
| | | | |
| void impulseToForce (dReal stepsize, dReal ix, dReal iy, dReal iz, | | void impulseToForce (dReal stepsize, dReal ix, dReal iy, dReal iz, | |
| dVector3 force) | | dVector3 force) | |
| { dWorldImpulseToForce (_id,stepsize,ix,iy,iz,force); } | | { dWorldImpulseToForce (_id,stepsize,ix,iy,iz,force); } | |
| }; | | }; | |
| | | | |
| class dBody { | | class dBody { | |
| dBodyID _id; | | dBodyID _id; | |
|
| | | | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dBody (const dBody &); | | dBody (const dBody &); | |
| void operator= (const dBody &); | | void operator= (const dBody &); | |
| | | | |
| public: | | public: | |
| dBody() | | dBody() | |
| { _id = 0; } | | { _id = 0; } | |
| dBody (dWorldID world) | | dBody (dWorldID world) | |
| { _id = dBodyCreate (world); } | | { _id = dBodyCreate (world); } | |
|
| | | dBody (dWorld& world) | |
| | | { _id = dBodyCreate (world.id()); } | |
| ~dBody() | | ~dBody() | |
| { if (_id) dBodyDestroy (_id); } | | { if (_id) dBodyDestroy (_id); } | |
| | | | |
| void create (dWorldID world) { | | void create (dWorldID world) { | |
| if (_id) dBodyDestroy (_id); | | if (_id) dBodyDestroy (_id); | |
| _id = dBodyCreate (world); | | _id = dBodyCreate (world); | |
| } | | } | |
|
| | | void create (dWorld& world) { | |
| | | create(world.id()); | |
| | | } | |
| | | | |
| dBodyID id() const | | dBodyID id() const | |
| { return _id; } | | { return _id; } | |
| operator dBodyID() const | | operator dBodyID() const | |
| { return _id; } | | { return _id; } | |
| | | | |
| void setData (void *data) | | void setData (void *data) | |
| { dBodySetData (_id,data); } | | { dBodySetData (_id,data); } | |
| void *getData() const | | void *getData() const | |
| { return dBodyGetData (_id); } | | { return dBodyGetData (_id); } | |
| | | | |
| void setPosition (dReal x, dReal y, dReal z) | | void setPosition (dReal x, dReal y, dReal z) | |
| { dBodySetPosition (_id,x,y,z); } | | { dBodySetPosition (_id,x,y,z); } | |
|
| | | void setPosition (const dVector3 p) | |
| | | { setPosition(p[0], p[1], p[2]); } | |
| | | | |
| void setRotation (const dMatrix3 R) | | void setRotation (const dMatrix3 R) | |
| { dBodySetRotation (_id,R); } | | { dBodySetRotation (_id,R); } | |
| void setQuaternion (const dQuaternion q) | | void setQuaternion (const dQuaternion q) | |
| { dBodySetQuaternion (_id,q); } | | { dBodySetQuaternion (_id,q); } | |
|
| void setLinearVel (dReal x, dReal y, dReal z) | | void setLinearVel (dReal x, dReal y, dReal z) | |
| { dBodySetLinearVel (_id,x,y,z); } | | { dBodySetLinearVel (_id,x,y,z); } | |
|
| | | void setLinearVel (const dVector3 v) | |
| | | { setLinearVel(v[0], v[1], v[2]); } | |
| void setAngularVel (dReal x, dReal y, dReal z) | | void setAngularVel (dReal x, dReal y, dReal z) | |
| { dBodySetAngularVel (_id,x,y,z); } | | { dBodySetAngularVel (_id,x,y,z); } | |
|
| | | void setAngularVel (const dVector3 v) | |
| | | { setAngularVel (v[0], v[1], v[2]); } | |
| | | | |
| const dReal * getPosition() const | | const dReal * getPosition() const | |
| { return dBodyGetPosition (_id); } | | { return dBodyGetPosition (_id); } | |
| const dReal * getRotation() const | | const dReal * getRotation() const | |
| { return dBodyGetRotation (_id); } | | { return dBodyGetRotation (_id); } | |
| const dReal * getQuaternion() const | | const dReal * getQuaternion() const | |
| { return dBodyGetQuaternion (_id); } | | { return dBodyGetQuaternion (_id); } | |
| const dReal * getLinearVel() const | | const dReal * getLinearVel() const | |
| { return dBodyGetLinearVel (_id); } | | { return dBodyGetLinearVel (_id); } | |
| const dReal * getAngularVel() const | | const dReal * getAngularVel() const | |
| { return dBodyGetAngularVel (_id); } | | { return dBodyGetAngularVel (_id); } | |
| | | | |
| void setMass (const dMass *mass) | | void setMass (const dMass *mass) | |
| { dBodySetMass (_id,mass); } | | { dBodySetMass (_id,mass); } | |
|
| void getMass (dMass *mass) const | | void setMass (const dMass &mass) | |
| { dBodyGetMass (_id,mass); } | | { setMass (&mass); } | |
| | | dMass getMass () const | |
| | | { dMass mass; dBodyGetMass (_id,&mass); return mass; } | |
| | | | |
| void addForce (dReal fx, dReal fy, dReal fz) | | void addForce (dReal fx, dReal fy, dReal fz) | |
| { dBodyAddForce (_id, fx, fy, fz); } | | { dBodyAddForce (_id, fx, fy, fz); } | |
|
| | | void addForce (const dVector3 f) | |
| | | { addForce (f[0], f[1], f[2]); } | |
| void addTorque (dReal fx, dReal fy, dReal fz) | | void addTorque (dReal fx, dReal fy, dReal fz) | |
| { dBodyAddTorque (_id, fx, fy, fz); } | | { dBodyAddTorque (_id, fx, fy, fz); } | |
|
| | | void addTorque (const dVector3 t) | |
| | | { addTorque(t[0], t[1], t[2]); } | |
| | | | |
| void addRelForce (dReal fx, dReal fy, dReal fz) | | void addRelForce (dReal fx, dReal fy, dReal fz) | |
| { dBodyAddRelForce (_id, fx, fy, fz); } | | { dBodyAddRelForce (_id, fx, fy, fz); } | |
|
| | | void addRelForce (const dVector3 f) | |
| | | { addRelForce (f[0], f[1], f[2]); } | |
| void addRelTorque (dReal fx, dReal fy, dReal fz) | | void addRelTorque (dReal fx, dReal fy, dReal fz) | |
| { dBodyAddRelTorque (_id, fx, fy, fz); } | | { dBodyAddRelTorque (_id, fx, fy, fz); } | |
|
| | | void addRelTorque (const dVector3 t) | |
| | | { addRelTorque (t[0], t[1], t[2]); } | |
| | | | |
| void addForceAtPos (dReal fx, dReal fy, dReal fz, | | void addForceAtPos (dReal fx, dReal fy, dReal fz, | |
| dReal px, dReal py, dReal pz) | | dReal px, dReal py, dReal pz) | |
| { dBodyAddForceAtPos (_id, fx, fy, fz, px, py, pz); } | | { dBodyAddForceAtPos (_id, fx, fy, fz, px, py, pz); } | |
|
| | | void addForceAtPos (const dVector3 f, const dVector3 p) | |
| | | { addForceAtPos (f[0], f[1], f[2], p[0], p[1], p[2]); } | |
| | | | |
| void addForceAtRelPos (dReal fx, dReal fy, dReal fz, | | void addForceAtRelPos (dReal fx, dReal fy, dReal fz, | |
|
| dReal px, dReal py, dReal pz) | | dReal px, dReal py, dReal pz) | |
| { dBodyAddForceAtRelPos (_id, fx, fy, fz, px, py, pz); } | | { dBodyAddForceAtRelPos (_id, fx, fy, fz, px, py, pz); } | |
|
| | | void addForceAtRelPos (const dVector3 f, const dVector3 p) | |
| | | { addForceAtRelPos (f[0], f[1], f[2], p[0], p[1], p[2]); } | |
| | | | |
| void addRelForceAtPos (dReal fx, dReal fy, dReal fz, | | void addRelForceAtPos (dReal fx, dReal fy, dReal fz, | |
| dReal px, dReal py, dReal pz) | | dReal px, dReal py, dReal pz) | |
| { dBodyAddRelForceAtPos (_id, fx, fy, fz, px, py, pz); } | | { dBodyAddRelForceAtPos (_id, fx, fy, fz, px, py, pz); } | |
|
| | | void addRelForceAtPos (const dVector3 f, const dVector3 p) | |
| | | { addRelForceAtPos (f[0], f[1], f[2], p[0], p[1], p[2]); } | |
| | | | |
| void addRelForceAtRelPos (dReal fx, dReal fy, dReal fz, | | void addRelForceAtRelPos (dReal fx, dReal fy, dReal fz, | |
| dReal px, dReal py, dReal pz) | | dReal px, dReal py, dReal pz) | |
| { dBodyAddRelForceAtRelPos (_id, fx, fy, fz, px, py, pz); } | | { dBodyAddRelForceAtRelPos (_id, fx, fy, fz, px, py, pz); } | |
|
| | | void addRelForceAtRelPos (const dVector3 f, const dVector3 p) | |
| | | { addRelForceAtRelPos (f[0], f[1], f[2], p[0], p[1], p[2]); } | |
| | | | |
| const dReal * getForce() const | | const dReal * getForce() const | |
| { return dBodyGetForce(_id); } | | { return dBodyGetForce(_id); } | |
| const dReal * getTorque() const | | const dReal * getTorque() const | |
| { return dBodyGetTorque(_id); } | | { return dBodyGetTorque(_id); } | |
| void setForce (dReal x, dReal y, dReal z) | | void setForce (dReal x, dReal y, dReal z) | |
| { dBodySetForce (_id,x,y,z); } | | { dBodySetForce (_id,x,y,z); } | |
|
| | | void setForce (const dVector3 f) | |
| | | { setForce (f[0], f[1], f[2]); } | |
| 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) | |
| | | { setTorque (t[0], t[1], t[2]); } | |
| | | | |
| void enable() | | void enable() | |
| { dBodyEnable (_id); } | | { dBodyEnable (_id); } | |
| void disable() | | void disable() | |
| { dBodyDisable (_id); } | | { dBodyDisable (_id); } | |
|
| int isEnabled() const | | bool isEnabled() const | |
| { return dBodyIsEnabled (_id); } | | { return bool(dBodyIsEnabled (_id)); } | |
| | | | |
| 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 | |
| | | { 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 | |
| | | { getRelPointVel (p[0], p[1], p[2], result); } | |
| | | | |
| void getPointVel (dReal px, dReal py, dReal pz, dVector3 result) const | | void getPointVel (dReal px, dReal py, dReal pz, dVector3 result) const | |
|
| { dBodyGetPointVel (_id,px,py,pz,result); } | | { dBodyGetPointVel (_id, px, py, pz, result); } | |
| | | void getPointVel (const dVector3 p, dVector3 result) const | |
| | | { getPointVel (p[0], p[1], p[2], result); } | |
| | | | |
| void getPosRelPoint (dReal px, dReal py, dReal pz, dVector3 result) const | | void getPosRelPoint (dReal px, dReal py, dReal pz, dVector3 result) const | |
|
| { dBodyGetPosRelPoint (_id,px,py,pz,result); } | | { dBodyGetPosRelPoint (_id, px, py, pz, result); } | |
| | | void getPosRelPoint (const dVector3 p, dVector3 result) const | |
| | | { getPosRelPoint (p[0], p[1], p[2], result); } | |
| | | | |
| void vectorToWorld (dReal px, dReal py, dReal pz, dVector3 result) const | | void vectorToWorld (dReal px, dReal py, dReal pz, dVector3 result) const | |
|
| { dBodyVectorToWorld (_id,px,py,pz,result); } | | { dBodyVectorToWorld (_id, px, py, pz, result); } | |
| | | void vectorToWorld (const dVector3 p, dVector3 result) const | |
| | | { vectorToWorld (p[0], p[1], p[2], result); } | |
| | | | |
| void vectorFromWorld (dReal px, dReal py, dReal pz, dVector3 result) cons
t | | void vectorFromWorld (dReal px, dReal py, dReal pz, dVector3 result) cons
t | |
| { dBodyVectorFromWorld (_id,px,py,pz,result); } | | { dBodyVectorFromWorld (_id,px,py,pz,result); } | |
|
| | | void vectorFromWorld (const dVector3 p, dVector3 result) const | |
| | | { vectorFromWorld (p[0], p[1], p[2], result); } | |
| | | | |
|
| void setFiniteRotationMode (int 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) | |
| | | { setFiniteRotationAxis (a[0], a[1], a[2]); } | |
| | | | |
|
| int getFiniteRotationMode() const | | bool getFiniteRotationMode() const | |
| { return dBodyGetFiniteRotationMode (_id); } | | { return bool(dBodyGetFiniteRotationMode (_id)); } | |
| 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 (int mode) | | void setGravityMode (bool mode) | |
| { dBodySetGravityMode (_id,mode); } | | { dBodySetGravityMode (_id,mode); } | |
|
| int getGravityMode() const | | bool getGravityMode() const | |
| { return dBodyGetGravityMode (_id); } | | { return bool(dBodyGetGravityMode (_id)); } | |
| | | | |
|
| int isConnectedTo (dBodyID body) const | | bool isConnectedTo (dBodyID body) const | |
| { return dAreConnected (_id, body); } | | { return bool(dAreConnected (_id, body)); } | |
| | | | |
| void setAutoDisableLinearThreshold (dReal threshold) | | void setAutoDisableLinearThreshold (dReal threshold) | |
| { dBodySetAutoDisableLinearThreshold (_id,threshold); } | | { dBodySetAutoDisableLinearThreshold (_id,threshold); } | |
|
| dReal getAutoDisableLinearThreshold() | | 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() | | 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() | | 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() | | dReal getAutoDisableTime() const | |
| { return dBodyGetAutoDisableTime (_id); } | | { return dBodyGetAutoDisableTime (_id); } | |
|
| void setAutoDisableFlag (int do_auto_disable) | | void setAutoDisableFlag (bool do_auto_disable) | |
| { dBodySetAutoDisableFlag (_id,do_auto_disable); } | | { dBodySetAutoDisableFlag (_id,do_auto_disable); } | |
|
| int getAutoDisableFlag() | | bool getAutoDisableFlag() const | |
| { return dBodyGetAutoDisableFlag (_id); } | | { return bool(dBodyGetAutoDisableFlag (_id)); } | |
| | | | |
| | | dReal getLinearDamping() const | |
| | | { return dBodyGetLinearDamping(_id); } | |
| | | void setLinearDamping(dReal scale) | |
| | | { dBodySetLinearDamping(_id, scale); } | |
| | | dReal getAngularDamping() const | |
| | | { return dBodyGetAngularDamping(_id); } | |
| | | void setAngularDamping(dReal scale) | |
| | | { dBodySetAngularDamping(_id, scale); } | |
| | | void setDamping(dReal linear_scale, dReal angular_scale) | |
| | | { dBodySetDamping(_id, linear_scale, angular_scale); } | |
| | | dReal getLinearDampingThreshold() const | |
| | | { return dBodyGetLinearDampingThreshold(_id); } | |
| | | void setLinearDampingThreshold(dReal threshold) const | |
| | | { dBodySetLinearDampingThreshold(_id, threshold); } | |
| | | dReal getAngularDampingThreshold() const | |
| | | { return dBodyGetAngularDampingThreshold(_id); } | |
| | | void setAngularDampingThreshold(dReal threshold) | |
| | | { dBodySetAngularDampingThreshold(_id, threshold); } | |
| | | void setDampingDefaults() | |
| | | { dBodySetDampingDefaults(_id); } | |
| | | | |
| | | dReal getMaxAngularSpeed() const | |
| | | { return dBodyGetMaxAngularSpeed(_id); } | |
| | | void setMaxAngularSpeed(dReal max_speed) | |
| | | { dBodySetMaxAngularSpeed(_id, max_speed); } | |
| | | | |
| }; | | }; | |
| | | | |
| class dJointGroup { | | class dJointGroup { | |
| dJointGroupID _id; | | dJointGroupID _id; | |
| | | | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dJointGroup (const dJointGroup &); | | dJointGroup (const dJointGroup &); | |
| void operator= (const dJointGroup &); | | void operator= (const dJointGroup &); | |
| | | | |
| public: | | public: | |
| | | | |
| skipping to change at line 276 | | skipping to change at line 403 | |
| _id = dJointGroupCreate (0); | | _id = dJointGroupCreate (0); | |
| } | | } | |
| | | | |
| dJointGroupID id() const | | dJointGroupID id() const | |
| { return _id; } | | { return _id; } | |
| operator dJointGroupID() const | | operator dJointGroupID() const | |
| { return _id; } | | { return _id; } | |
| | | | |
| void empty() | | void empty() | |
| { dJointGroupEmpty (_id); } | | { dJointGroupEmpty (_id); } | |
|
| | | void clear() | |
| | | { empty(); } | |
| }; | | }; | |
| | | | |
| 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: | | public: | |
| dJoint() | | dJoint() | |
| { _id = 0; } | | { _id = 0; } | |
|
| ~dJoint() | | 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 | |
| | | { return dJointGetNumBodies(_id); } | |
| | | | |
| void attach (dBodyID body1, dBodyID body2) | | void attach (dBodyID body1, dBodyID body2) | |
| { dJointAttach (_id, body1, body2); } | | { dJointAttach (_id, body1, body2); } | |
|
| | | void attach (dBody& body1, dBody& body2) | |
| | | { attach(body1.id(), body2.id()); } | |
| | | | |
| void setData (void *data) | | void setData (void *data) | |
| { dJointSetData (_id, data); } | | { dJointSetData (_id, data); } | |
| void *getData() const | | void *getData() const | |
| { return dJointGetData (_id); } | | { return dJointGetData (_id); } | |
| | | | |
|
| int getType() const | | dJointType getType() const | |
| { return dJointGetType (_id); } | | { return dJointGetType (_id); } | |
| | | | |
| dBodyID getBody (int index) const | | dBodyID getBody (int index) const | |
| { return dJointGetBody (_id, index); } | | { return dJointGetBody (_id, index); } | |
| | | | |
| void setFeedback(dJointFeedback *fb) | | void setFeedback(dJointFeedback *fb) | |
| { dJointSetFeedback(_id, fb); } | | { dJointSetFeedback(_id, fb); } | |
| dJointFeedback *getFeedback() const | | dJointFeedback *getFeedback() const | |
| { return dJointGetFeedback(_id); } | | { return dJointGetFeedback(_id); } | |
|
| | | | |
| | | // If not implemented it will do nothing as describe in the doc | |
| | | virtual void setParam (int, dReal) {}; | |
| | | virtual dReal getParam (int) const { return 0; } | |
| }; | | }; | |
| | | | |
| class dBallJoint : public dJoint { | | class dBallJoint : public dJoint { | |
| private: | | private: | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dBallJoint (const dBallJoint &); | | dBallJoint (const dBallJoint &); | |
| void operator= (const dBallJoint &); | | void operator= (const dBallJoint &); | |
| | | | |
| public: | | public: | |
| dBallJoint() { } | | dBallJoint() { } | |
| dBallJoint (dWorldID world, dJointGroupID group=0) | | dBallJoint (dWorldID world, dJointGroupID group=0) | |
| { _id = dJointCreateBall (world, group); } | | { _id = dJointCreateBall (world, group); } | |
|
| | | dBallJoint (dWorld& world, dJointGroupID group=0) | |
| | | { _id = dJointCreateBall (world.id(), group); } | |
| | | | |
| void create (dWorldID world, dJointGroupID group=0) { | | void create (dWorldID world, dJointGroupID group=0) { | |
| if (_id) dJointDestroy (_id); | | if (_id) dJointDestroy (_id); | |
| _id = dJointCreateBall (world, group); | | _id = dJointCreateBall (world, group); | |
| } | | } | |
|
| | | void create (dWorld& world, dJointGroupID group=0) | |
| | | { create(world.id(), 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 setAnchor (const dVector3 a) | |
| | | { setAnchor (a[0], a[1], a[2]); } | |
| 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) | | virtual void setParam (int parameter, dReal value) | |
| { dJointSetBallParam (_id, parameter, value); } | | { dJointSetBallParam (_id, parameter, value); } | |
|
| dReal getParam (int parameter) const | | virtual dReal getParam (int parameter) const | |
| { return dJointGetBallParam (_id, parameter); } | | { return dJointGetBallParam (_id, parameter); } | |
|
| | | // TODO: expose params through methods | |
| } ; | | } ; | |
| | | | |
| 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) | |
| { _id = dJointCreateHinge (world, group); } | | { _id = dJointCreateHinge (world, group); } | |
|
| | | dHingeJoint (dWorld& world, dJointGroupID group=0) | |
| | | { _id = dJointCreateHinge (world.id(), group); } | |
| | | | |
| void create (dWorldID world, dJointGroupID group=0) { | | void create (dWorldID world, dJointGroupID group=0) { | |
| if (_id) dJointDestroy (_id); | | if (_id) dJointDestroy (_id); | |
| _id = dJointCreateHinge (world, group); | | _id = dJointCreateHinge (world, group); | |
| } | | } | |
|
| | | void create (dWorld& world, dJointGroupID group=0) | |
| | | { create(world.id(), group); } | |
| | | | |
| void setAnchor (dReal x, dReal y, dReal z) | | void setAnchor (dReal x, dReal y, dReal z) | |
| { dJointSetHingeAnchor (_id, x, y, z); } | | { dJointSetHingeAnchor (_id, x, y, z); } | |
|
| | | void setAnchor (const dVector3 a) | |
| | | { setAnchor (a[0], a[1], a[2]); } | |
| void getAnchor (dVector3 result) const | | void getAnchor (dVector3 result) const | |
| { dJointGetHingeAnchor (_id, result); } | | { dJointGetHingeAnchor (_id, result); } | |
| void getAnchor2 (dVector3 result) const | | void getAnchor2 (dVector3 result) const | |
| { dJointGetHingeAnchor2 (_id, result); } | | { dJointGetHingeAnchor2 (_id, result); } | |
| | | | |
| void setAxis (dReal x, dReal y, dReal z) | | void setAxis (dReal x, dReal y, dReal z) | |
| { dJointSetHingeAxis (_id, x, y, z); } | | { dJointSetHingeAxis (_id, x, y, z); } | |
|
| | | void setAxis (const dVector3 a) | |
| | | { setAxis(a[0], a[1], a[2]); } | |
| void getAxis (dVector3 result) const | | void getAxis (dVector3 result) const | |
| { dJointGetHingeAxis (_id, result); } | | { dJointGetHingeAxis (_id, result); } | |
| | | | |
| dReal getAngle() const | | dReal getAngle() const | |
| { return dJointGetHingeAngle (_id); } | | { return dJointGetHingeAngle (_id); } | |
| dReal getAngleRate() const | | dReal getAngleRate() const | |
| { return dJointGetHingeAngleRate (_id); } | | { return dJointGetHingeAngleRate (_id); } | |
| | | | |
|
| void setParam (int parameter, dReal value) | | virtual void setParam (int parameter, dReal value) | |
| { dJointSetHingeParam (_id, parameter, value); } | | { dJointSetHingeParam (_id, parameter, value); } | |
|
| dReal getParam (int parameter) const | | virtual dReal getParam (int parameter) const | |
| { return dJointGetHingeParam (_id, parameter); } | | { return dJointGetHingeParam (_id, parameter); } | |
|
| | | // TODO: expose params through methods | |
| | | | |
| void addTorque (dReal torque) | | void addTorque (dReal torque) | |
| { dJointAddHingeTorque(_id, torque); } | | { dJointAddHingeTorque(_id, torque); } | |
| }; | | }; | |
| | | | |
| class dSliderJoint : public dJoint { | | class dSliderJoint : public dJoint { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dSliderJoint (const dSliderJoint &); | | dSliderJoint (const dSliderJoint &); | |
| void operator = (const dSliderJoint &); | | void operator = (const dSliderJoint &); | |
| | | | |
| public: | | public: | |
| dSliderJoint() { } | | dSliderJoint() { } | |
| dSliderJoint (dWorldID world, dJointGroupID group=0) | | dSliderJoint (dWorldID world, dJointGroupID group=0) | |
| { _id = dJointCreateSlider (world, group); } | | { _id = dJointCreateSlider (world, group); } | |
|
| | | dSliderJoint (dWorld& world, dJointGroupID group=0) | |
| | | { _id = dJointCreateSlider (world.id(), group); } | |
| | | | |
| void create (dWorldID world, dJointGroupID group=0) { | | void create (dWorldID world, dJointGroupID group=0) { | |
| if (_id) dJointDestroy (_id); | | if (_id) dJointDestroy (_id); | |
| _id = dJointCreateSlider (world, group); | | _id = dJointCreateSlider (world, group); | |
| } | | } | |
|
| | | void create (dWorld& world, dJointGroupID group=0) | |
| | | { create(world.id(), group); } | |
| | | | |
| void setAxis (dReal x, dReal y, dReal z) | | void setAxis (dReal x, dReal y, dReal z) | |
| { dJointSetSliderAxis (_id, x, y, z); } | | { dJointSetSliderAxis (_id, x, y, z); } | |
|
| | | void setAxis (const dVector3 a) | |
| | | { setAxis (a[0], a[1], a[2]); } | |
| void getAxis (dVector3 result) const | | void getAxis (dVector3 result) const | |
| { dJointGetSliderAxis (_id, result); } | | { dJointGetSliderAxis (_id, result); } | |
| | | | |
| dReal getPosition() const | | dReal getPosition() const | |
| { return dJointGetSliderPosition (_id); } | | { return dJointGetSliderPosition (_id); } | |
| dReal getPositionRate() const | | dReal getPositionRate() const | |
| { return dJointGetSliderPositionRate (_id); } | | { return dJointGetSliderPositionRate (_id); } | |
| | | | |
|
| void setParam (int parameter, dReal value) | | virtual void setParam (int parameter, dReal value) | |
| { dJointSetSliderParam (_id, parameter, value); } | | { dJointSetSliderParam (_id, parameter, value); } | |
|
| dReal getParam (int parameter) const | | virtual dReal getParam (int parameter) const | |
| { return dJointGetSliderParam (_id, parameter); } | | { return dJointGetSliderParam (_id, parameter); } | |
|
| | | // TODO: expose params through methods | |
| | | | |
| void addForce (dReal force) | | void addForce (dReal force) | |
| { dJointAddSliderForce(_id, force); } | | { dJointAddSliderForce(_id, force); } | |
| }; | | }; | |
| | | | |
| class dUniversalJoint : public dJoint { | | class dUniversalJoint : public dJoint { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dUniversalJoint (const dUniversalJoint &); | | dUniversalJoint (const dUniversalJoint &); | |
| void operator = (const dUniversalJoint &); | | void operator = (const dUniversalJoint &); | |
| | | | |
| public: | | public: | |
| dUniversalJoint() { } | | dUniversalJoint() { } | |
| dUniversalJoint (dWorldID world, dJointGroupID group=0) | | dUniversalJoint (dWorldID world, dJointGroupID group=0) | |
| { _id = dJointCreateUniversal (world, group); } | | { _id = dJointCreateUniversal (world, group); } | |
|
| | | dUniversalJoint (dWorld& world, dJointGroupID group=0) | |
| | | { _id = dJointCreateUniversal (world.id(), group); } | |
| | | | |
| void create (dWorldID world, dJointGroupID group=0) { | | void create (dWorldID world, dJointGroupID group=0) { | |
| if (_id) dJointDestroy (_id); | | if (_id) dJointDestroy (_id); | |
| _id = dJointCreateUniversal (world, group); | | _id = dJointCreateUniversal (world, group); | |
| } | | } | |
|
| | | void create (dWorld& world, dJointGroupID group=0) | |
| | | { create(world.id(), group); } | |
| | | | |
| void setAnchor (dReal x, dReal y, dReal z) | | void setAnchor (dReal x, dReal y, dReal z) | |
| { dJointSetUniversalAnchor (_id, x, y, z); } | | { dJointSetUniversalAnchor (_id, x, y, z); } | |
|
| | | void setAnchor (const dVector3 a) | |
| | | { setAnchor(a[0], a[1], a[2]); } | |
| void setAxis1 (dReal x, dReal y, dReal z) | | void setAxis1 (dReal x, dReal y, dReal z) | |
| { dJointSetUniversalAxis1 (_id, x, y, z); } | | { dJointSetUniversalAxis1 (_id, x, y, z); } | |
|
| | | void setAxis1 (const dVector3 a) | |
| | | { setAxis1 (a[0], a[1], a[2]); } | |
| void setAxis2 (dReal x, dReal y, dReal z) | | void setAxis2 (dReal x, dReal y, dReal z) | |
| { dJointSetUniversalAxis2 (_id, x, y, z); } | | { dJointSetUniversalAxis2 (_id, x, y, z); } | |
|
| void setParam (int parameter, dReal value) | | void setAxis2 (const dVector3 a) | |
| { dJointSetUniversalParam (_id, parameter, value); } | | { setAxis2 (a[0], a[1], a[2]); } | |
| | | | |
| void getAnchor (dVector3 result) const | | void getAnchor (dVector3 result) const | |
| { dJointGetUniversalAnchor (_id, result); } | | { dJointGetUniversalAnchor (_id, result); } | |
| void getAnchor2 (dVector3 result) const | | void getAnchor2 (dVector3 result) const | |
| { dJointGetUniversalAnchor2 (_id, result); } | | { dJointGetUniversalAnchor2 (_id, result); } | |
| void getAxis1 (dVector3 result) const | | void getAxis1 (dVector3 result) const | |
| { dJointGetUniversalAxis1 (_id, result); } | | { dJointGetUniversalAxis1 (_id, result); } | |
| void getAxis2 (dVector3 result) const | | void getAxis2 (dVector3 result) const | |
| { dJointGetUniversalAxis2 (_id, result); } | | { dJointGetUniversalAxis2 (_id, result); } | |
|
| dReal getParam (int parameter) const | | | |
| | | virtual void setParam (int parameter, dReal value) | |
| | | { dJointSetUniversalParam (_id, parameter, value); } | |
| | | virtual dReal getParam (int parameter) const | |
| { return dJointGetUniversalParam (_id, parameter); } | | { return dJointGetUniversalParam (_id, parameter); } | |
|
| void getAngles(dReal *angle1, dReal *angle2) const | | // TODO: expose params through methods | |
| | | | |
| | | void getAngles(dReal *angle1, dReal *angle2) const | |
| { dJointGetUniversalAngles (_id, angle1, angle2); } | | { dJointGetUniversalAngles (_id, angle1, angle2); } | |
| | | | |
| dReal getAngle1() const | | dReal getAngle1() const | |
| { return dJointGetUniversalAngle1 (_id); } | | { return dJointGetUniversalAngle1 (_id); } | |
| dReal getAngle1Rate() const | | dReal getAngle1Rate() const | |
| { return dJointGetUniversalAngle1Rate (_id); } | | { return dJointGetUniversalAngle1Rate (_id); } | |
| dReal getAngle2() const | | dReal getAngle2() const | |
| { return dJointGetUniversalAngle2 (_id); } | | { return dJointGetUniversalAngle2 (_id); } | |
| dReal getAngle2Rate() const | | dReal getAngle2Rate() const | |
| { return dJointGetUniversalAngle2Rate (_id); } | | { return dJointGetUniversalAngle2Rate (_id); } | |
| | | | |
| skipping to change at line 480 | | skipping to change at line 654 | |
| | | | |
| class dHinge2Joint : public dJoint { | | class dHinge2Joint : public dJoint { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dHinge2Joint (const dHinge2Joint &); | | dHinge2Joint (const dHinge2Joint &); | |
| void operator = (const dHinge2Joint &); | | void operator = (const dHinge2Joint &); | |
| | | | |
| public: | | public: | |
| dHinge2Joint() { } | | dHinge2Joint() { } | |
| dHinge2Joint (dWorldID world, dJointGroupID group=0) | | dHinge2Joint (dWorldID world, dJointGroupID group=0) | |
| { _id = dJointCreateHinge2 (world, group); } | | { _id = dJointCreateHinge2 (world, group); } | |
|
| | | dHinge2Joint (dWorld& world, dJointGroupID group=0) | |
| | | { _id = dJointCreateHinge2 (world.id(), group); } | |
| | | | |
| void create (dWorldID world, dJointGroupID group=0) { | | void create (dWorldID world, dJointGroupID group=0) { | |
| if (_id) dJointDestroy (_id); | | if (_id) dJointDestroy (_id); | |
| _id = dJointCreateHinge2 (world, group); | | _id = dJointCreateHinge2 (world, group); | |
| } | | } | |
|
| | | void create (dWorld& world, dJointGroupID group=0) | |
| | | { create(world.id(), group); } | |
| | | | |
| void setAnchor (dReal x, dReal y, dReal z) | | void setAnchor (dReal x, dReal y, dReal z) | |
| { dJointSetHinge2Anchor (_id, x, y, z); } | | { dJointSetHinge2Anchor (_id, x, y, z); } | |
|
| | | void setAnchor (const dVector3 a) | |
| | | { setAnchor(a[0], a[1], a[2]); } | |
| void setAxis1 (dReal x, dReal y, dReal z) | | void setAxis1 (dReal x, dReal y, dReal z) | |
| { dJointSetHinge2Axis1 (_id, x, y, z); } | | { dJointSetHinge2Axis1 (_id, x, y, z); } | |
|
| | | void setAxis1 (const dVector3 a) | |
| | | { setAxis1 (a[0], a[1], a[2]); } | |
| void setAxis2 (dReal x, dReal y, dReal z) | | void setAxis2 (dReal x, dReal y, dReal z) | |
| { dJointSetHinge2Axis2 (_id, x, y, z); } | | { dJointSetHinge2Axis2 (_id, x, y, z); } | |
|
| | | void setAxis2 (const dVector3 a) | |
| | | { setAxis2 (a[0], a[1], a[2]); } | |
| | | | |
| void getAnchor (dVector3 result) const | | void getAnchor (dVector3 result) const | |
| { dJointGetHinge2Anchor (_id, result); } | | { dJointGetHinge2Anchor (_id, result); } | |
| void getAnchor2 (dVector3 result) const | | void getAnchor2 (dVector3 result) const | |
| { dJointGetHinge2Anchor2 (_id, result); } | | { dJointGetHinge2Anchor2 (_id, result); } | |
| void getAxis1 (dVector3 result) const | | void getAxis1 (dVector3 result) const | |
| { dJointGetHinge2Axis1 (_id, result); } | | { dJointGetHinge2Axis1 (_id, result); } | |
| void getAxis2 (dVector3 result) const | | void getAxis2 (dVector3 result) const | |
| { dJointGetHinge2Axis2 (_id, result); } | | { dJointGetHinge2Axis2 (_id, result); } | |
| | | | |
| dReal getAngle1() const | | dReal getAngle1() const | |
| { return dJointGetHinge2Angle1 (_id); } | | { return dJointGetHinge2Angle1 (_id); } | |
| dReal getAngle1Rate() const | | dReal getAngle1Rate() const | |
| { return dJointGetHinge2Angle1Rate (_id); } | | { return dJointGetHinge2Angle1Rate (_id); } | |
| dReal getAngle2Rate() const | | dReal getAngle2Rate() const | |
| { return dJointGetHinge2Angle2Rate (_id); } | | { return dJointGetHinge2Angle2Rate (_id); } | |
| | | | |
|
| void setParam (int parameter, dReal value) | | virtual void setParam (int parameter, dReal value) | |
| { dJointSetHinge2Param (_id, parameter, value); } | | { dJointSetHinge2Param (_id, parameter, value); } | |
|
| dReal getParam (int parameter) const | | virtual dReal getParam (int parameter) const | |
| { return dJointGetHinge2Param (_id, parameter); } | | { return dJointGetHinge2Param (_id, parameter); } | |
|
| | | // TODO: expose params through methods | |
| | | | |
| void addTorques(dReal torque1, dReal torque2) | | void addTorques(dReal torque1, dReal torque2) | |
| { dJointAddHinge2Torques(_id, torque1, torque2); } | | { dJointAddHinge2Torques(_id, torque1, torque2); } | |
| }; | | }; | |
| | | | |
| class dPRJoint : public dJoint { | | class dPRJoint : public dJoint { | |
| dPRJoint (const dPRJoint &); | | dPRJoint (const dPRJoint &); | |
| void operator = (const dPRJoint &); | | void operator = (const dPRJoint &); | |
| | | | |
| public: | | public: | |
| dPRJoint() { } | | dPRJoint() { } | |
| dPRJoint (dWorldID world, dJointGroupID group=0) | | dPRJoint (dWorldID world, dJointGroupID group=0) | |
| { _id = dJointCreatePR (world, group); } | | { _id = dJointCreatePR (world, group); } | |
|
| | | dPRJoint (dWorld& world, dJointGroupID group=0) | |
| | | { _id = dJointCreatePR (world.id(), group); } | |
| | | | |
| void create (dWorldID world, dJointGroupID group=0) { | | void create (dWorldID world, dJointGroupID group=0) { | |
| if (_id) dJointDestroy (_id); | | if (_id) dJointDestroy (_id); | |
| _id = dJointCreatePR (world, group); | | _id = dJointCreatePR (world, group); | |
| } | | } | |
|
| | | void create (dWorld& world, dJointGroupID group=0) | |
| | | { create(world.id(), group); } | |
| | | | |
| void setAnchor (dReal x, dReal y, dReal z) | | void setAnchor (dReal x, dReal y, dReal z) | |
| { dJointSetPRAnchor (_id, x, y, z); } | | { dJointSetPRAnchor (_id, x, y, z); } | |
|
| | | void setAnchor (const dVector3 a) | |
| | | { setAnchor (a[0], a[1], a[2]); } | |
| void setAxis1 (dReal x, dReal y, dReal z) | | void setAxis1 (dReal x, dReal y, dReal z) | |
| { dJointSetPRAxis1 (_id, x, y, z); } | | { dJointSetPRAxis1 (_id, x, y, z); } | |
|
| | | void setAxis1 (const dVector3 a) | |
| | | { setAxis1(a[0], a[1], a[2]); } | |
| void setAxis2 (dReal x, dReal y, dReal z) | | void setAxis2 (dReal x, dReal y, dReal z) | |
| { dJointSetPRAxis2 (_id, x, y, z); } | | { dJointSetPRAxis2 (_id, x, y, z); } | |
|
| | | void setAxis2 (const dVector3 a) | |
| | | { setAxis2(a[0], a[1], a[2]); } | |
| | | | |
| void getAnchor (dVector3 result) const | | void getAnchor (dVector3 result) const | |
| { dJointGetPRAnchor (_id, result); } | | { dJointGetPRAnchor (_id, result); } | |
| void getAxis1 (dVector3 result) const | | void getAxis1 (dVector3 result) const | |
| { dJointGetPRAxis1 (_id, result); } | | { dJointGetPRAxis1 (_id, result); } | |
| void getAxis2 (dVector3 result) const | | void getAxis2 (dVector3 result) const | |
| { dJointGetPRAxis2 (_id, result); } | | { dJointGetPRAxis2 (_id, result); } | |
| | | | |
| dReal getPosition() const | | dReal getPosition() const | |
| { return dJointGetPRPosition (_id); } | | { return dJointGetPRPosition (_id); } | |
| dReal getPositionRate() const | | dReal getPositionRate() const | |
| { return dJointGetPRPositionRate (_id); } | | { return dJointGetPRPositionRate (_id); } | |
| | | | |
|
| void setParam (int parameter, dReal value) | | virtual void setParam (int parameter, dReal value) | |
| { dJointSetPRParam (_id, parameter, value); } | | { dJointSetPRParam (_id, parameter, value); } | |
|
| dReal getParam (int parameter) const | | virtual dReal getParam (int parameter) const | |
| { return dJointGetPRParam (_id, parameter); } | | { return dJointGetPRParam (_id, parameter); } | |
| }; | | }; | |
| | | | |
|
| class dFixedJoint : public dJoint { | | class dPUJoint : public dJoint | |
| | | { | |
| | | dPUJoint (const dPUJoint &); | |
| | | void operator = (const dPUJoint &); | |
| | | | |
| | | public: | |
| | | dPUJoint() { } | |
| | | dPUJoint (dWorldID world, dJointGroupID group=0) | |
| | | { _id = dJointCreatePU (world, group); } | |
| | | dPUJoint (dWorld& world, dJointGroupID group=0) | |
| | | { _id = dJointCreatePU (world.id(), group); } | |
| | | | |
| | | void create (dWorldID world, dJointGroupID group=0) | |
| | | { | |
| | | if (_id) dJointDestroy (_id); | |
| | | _id = dJointCreatePU (world, group); | |
| | | } | |
| | | void create (dWorld& world, dJointGroupID group=0) | |
| | | { create(world.id(), group); } | |
| | | | |
| | | void setAnchor (dReal x, dReal y, dReal z) | |
| | | { dJointSetPUAnchor (_id, x, y, z); } | |
| | | void setAnchor (const dVector3 a) | |
| | | { setAnchor (a[0], a[1], a[2]); } | |
| | | void setAxis1 (dReal x, dReal y, dReal z) | |
| | | { dJointSetPUAxis1 (_id, x, y, z); } | |
| | | void setAxis1 (const dVector3 a) | |
| | | { setAxis1(a[0], a[1], a[2]); } | |
| | | void setAxis2 (dReal x, dReal y, dReal z) | |
| | | { dJointSetPUAxis2 (_id, x, y, z); } | |
| | | void setAxis3 (dReal x, dReal y, dReal z) | |
| | | { dJointSetPUAxis3 (_id, x, y, z); } | |
| | | void setAxis3 (const dVector3 a) | |
| | | { setAxis3(a[0], a[1], a[2]); } | |
| | | void setAxisP (dReal x, dReal y, dReal z) | |
| | | { dJointSetPUAxis3 (_id, x, y, z); } | |
| | | void setAxisP (const dVector3 a) | |
| | | { setAxisP(a[0], a[1], a[2]); } | |
| | | | |
| | | virtual void getAnchor (dVector3 result) const | |
| | | { dJointGetPUAnchor (_id, result); } | |
| | | void getAxis1 (dVector3 result) const | |
| | | { dJointGetPUAxis1 (_id, result); } | |
| | | void getAxis2 (dVector3 result) const | |
| | | { dJointGetPUAxis2 (_id, result); } | |
| | | void getAxis3 (dVector3 result) const | |
| | | { dJointGetPUAxis3 (_id, result); } | |
| | | void getAxisP (dVector3 result) const | |
| | | { dJointGetPUAxis3 (_id, result); } | |
| | | | |
| | | dReal getAngle1() const | |
| | | { return dJointGetPUAngle1 (_id); } | |
| | | dReal getAngle1Rate() const | |
| | | { return dJointGetPUAngle1Rate (_id); } | |
| | | dReal getAngle2() const | |
| | | { return dJointGetPUAngle2 (_id); } | |
| | | dReal getAngle2Rate() const | |
| | | { return dJointGetPUAngle2Rate (_id); } | |
| | | | |
| | | dReal getPosition() const | |
| | | { return dJointGetPUPosition (_id); } | |
| | | dReal getPositionRate() const | |
| | | { return dJointGetPUPositionRate (_id); } | |
| | | | |
| | | virtual void setParam (int parameter, dReal value) | |
| | | { dJointSetPUParam (_id, parameter, value); } | |
| | | virtual dReal getParam (int parameter) const | |
| | | { return dJointGetPUParam (_id, parameter); } | |
| | | // TODO: expose params through methods | |
| | | }; | |
| | | | |
| | | class dPistonJoint : public dJoint | |
| | | { | |
| | | // intentionally undefined, don't use these | |
| | | dPistonJoint (const dPistonJoint &); | |
| | | void operator = (const dPistonJoint &); | |
| | | | |
| | | public: | |
| | | dPistonJoint() { } | |
| | | dPistonJoint (dWorldID world, dJointGroupID group=0) | |
| | | { _id = dJointCreatePiston (world, group); } | |
| | | dPistonJoint (dWorld& world, dJointGroupID group=0) | |
| | | { _id = dJointCreatePiston (world, group); } | |
| | | | |
| | | void create (dWorldID world, dJointGroupID group=0) | |
| | | { | |
| | | if (_id) dJointDestroy (_id); | |
| | | _id = dJointCreatePiston (world, group); | |
| | | } | |
| | | void create (dWorld& world, dJointGroupID group=0) | |
| | | { create(world.id(), group); } | |
| | | | |
| | | void setAnchor (dReal x, dReal y, dReal z) | |
| | | { dJointSetPistonAnchor (_id, x, y, z); } | |
| | | void setAnchor (const dVector3 a) | |
| | | { setAnchor (a[0], a[1], a[2]); } | |
| | | void getAnchor (dVector3 result) const | |
| | | { dJointGetPistonAnchor (_id, result); } | |
| | | void getAnchor2 (dVector3 result) const | |
| | | { dJointGetPistonAnchor2 (_id, result); } | |
| | | | |
| | | void setAxis (dReal x, dReal y, dReal z) | |
| | | { dJointSetPistonAxis (_id, x, y, z); } | |
| | | void setAxis (const dVector3 a) | |
| | | { setAxis(a[0], a[1], a[2]); } | |
| | | void getAxis (dVector3 result) const | |
| | | { dJointGetPistonAxis (_id, result); } | |
| | | | |
| | | dReal getPosition() const | |
| | | { return dJointGetPistonPosition (_id); } | |
| | | dReal getPositionRate() const | |
| | | { return dJointGetPistonPositionRate (_id); } | |
| | | | |
| | | virtual void setParam (int parameter, dReal value) | |
| | | { dJointSetPistonParam (_id, parameter, value); } | |
| | | virtual dReal getParam (int parameter) const | |
| | | { return dJointGetPistonParam (_id, parameter); } | |
| | | // TODO: expose params through methods | |
| | | | |
| | | void addForce (dReal force) | |
| | | { dJointAddPistonForce (_id, force); } | |
| | | }; | |
| | | | |
| | | class dFixedJoint : public dJoint | |
| | | { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dFixedJoint (const dFixedJoint &); | | dFixedJoint (const dFixedJoint &); | |
| void operator = (const dFixedJoint &); | | void operator = (const dFixedJoint &); | |
| | | | |
| public: | | public: | |
| dFixedJoint() { } | | dFixedJoint() { } | |
| dFixedJoint (dWorldID world, dJointGroupID group=0) | | dFixedJoint (dWorldID world, dJointGroupID group=0) | |
| { _id = dJointCreateFixed (world, group); } | | { _id = dJointCreateFixed (world, group); } | |
|
| | | dFixedJoint (dWorld& world, dJointGroupID group=0) | |
| | | { _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 create (dWorld& world, dJointGroup group=0) | |
| | | { create(world.id(), group); } | |
| | | | |
| void set() | | void set() | |
| { dJointSetFixed (_id); } | | { dJointSetFixed (_id); } | |
| | | | |
|
| void setParam (int parameter, dReal value) | | virtual void setParam (int parameter, dReal value) | |
| { dJointSetFixedParam (_id, parameter, value); } | | { dJointSetFixedParam (_id, parameter, value); } | |
| | | | |
|
| dReal getParam (int parameter) const | | virtual dReal getParam (int parameter) const | |
| { return dJointGetFixedParam (_id, parameter); } | | { return dJointGetFixedParam (_id, parameter); } | |
|
| | | // TODO: expose params through methods | |
| }; | | }; | |
| | | | |
| 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) | |
| { _id = dJointCreateContact (world, group, contact); } | | { _id = dJointCreateContact (world, group, contact); } | |
|
| | | dContactJoint (dWorld& world, dJointGroupID group, dContact *contact) | |
| | | { _id = dJointCreateContact (world.id(), group, contact); } | |
| | | | |
| void create (dWorldID world, dJointGroupID group, dContact *contact) { | | void create (dWorldID world, dJointGroupID group, dContact *contact) { | |
| if (_id) dJointDestroy (_id); | | if (_id) dJointDestroy (_id); | |
| _id = dJointCreateContact (world, group, contact); | | _id = dJointCreateContact (world, group, contact); | |
| } | | } | |
|
| | | | |
| | | void create (dWorld& world, dJointGroupID group, dContact *contact) | |
| | | { create(world.id(), group, contact); } | |
| }; | | }; | |
| | | | |
| class dNullJoint : public dJoint { | | class dNullJoint : public dJoint { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dNullJoint (const dNullJoint &); | | dNullJoint (const dNullJoint &); | |
| void operator = (const dNullJoint &); | | void operator = (const dNullJoint &); | |
| | | | |
| public: | | public: | |
| dNullJoint() { } | | dNullJoint() { } | |
| dNullJoint (dWorldID world, dJointGroupID group=0) | | dNullJoint (dWorldID world, dJointGroupID group=0) | |
| { _id = dJointCreateNull (world, group); } | | { _id = dJointCreateNull (world, group); } | |
|
| | | dNullJoint (dWorld& world, dJointGroupID group=0) | |
| | | { _id = dJointCreateNull (world.id(), group); } | |
| | | | |
| void create (dWorldID world, dJointGroupID group=0) { | | void create (dWorldID world, dJointGroupID group=0) { | |
| if (_id) dJointDestroy (_id); | | if (_id) dJointDestroy (_id); | |
| _id = dJointCreateNull (world, group); | | _id = dJointCreateNull (world, group); | |
| } | | } | |
|
| | | void create (dWorld& world, dJointGroupID group=0) | |
| | | { create(world.id(), group); } | |
| }; | | }; | |
| | | | |
| class dAMotorJoint : public dJoint { | | class dAMotorJoint : public dJoint { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dAMotorJoint (const dAMotorJoint &); | | dAMotorJoint (const dAMotorJoint &); | |
| void operator = (const dAMotorJoint &); | | void operator = (const dAMotorJoint &); | |
| | | | |
| public: | | public: | |
| dAMotorJoint() { } | | dAMotorJoint() { } | |
| dAMotorJoint (dWorldID world, dJointGroupID group=0) | | dAMotorJoint (dWorldID world, dJointGroupID group=0) | |
| { _id = dJointCreateAMotor (world, group); } | | { _id = dJointCreateAMotor (world, group); } | |
|
| | | dAMotorJoint (dWorld& world, dJointGroupID group=0) | |
| | | { _id = dJointCreateAMotor (world.id(), group); } | |
| | | | |
| void create (dWorldID world, dJointGroupID group=0) { | | void create (dWorldID world, dJointGroupID group=0) { | |
| if (_id) dJointDestroy (_id); | | if (_id) dJointDestroy (_id); | |
| _id = dJointCreateAMotor (world, group); | | _id = dJointCreateAMotor (world, group); | |
| } | | } | |
|
| | | void create (dWorld& world, dJointGroupID group=0) | |
| | | { create(world.id(), group); } | |
| | | | |
| void setMode (int mode) | | void setMode (int mode) | |
| { dJointSetAMotorMode (_id, mode); } | | { dJointSetAMotorMode (_id, mode); } | |
| int getMode() const | | int getMode() const | |
| { return dJointGetAMotorMode (_id); } | | { return dJointGetAMotorMode (_id); } | |
| | | | |
| void setNumAxes (int num) | | void setNumAxes (int num) | |
| { dJointSetAMotorNumAxes (_id, num); } | | { dJointSetAMotorNumAxes (_id, num); } | |
| int getNumAxes() const | | int getNumAxes() const | |
| { return dJointGetAMotorNumAxes (_id); } | | { return dJointGetAMotorNumAxes (_id); } | |
| | | | |
| void setAxis (int anum, int rel, dReal x, dReal y, dReal z) | | void setAxis (int anum, int rel, dReal x, dReal y, dReal z) | |
| { dJointSetAMotorAxis (_id, anum, rel, x, y, z); } | | { dJointSetAMotorAxis (_id, anum, rel, x, y, z); } | |
|
| | | void setAxis (int anum, int rel, const dVector3 a) | |
| | | { setAxis(anum, rel, a[0], a[1], a[2]); } | |
| void getAxis (int anum, dVector3 result) const | | void getAxis (int anum, dVector3 result) const | |
| { dJointGetAMotorAxis (_id, anum, result); } | | { dJointGetAMotorAxis (_id, anum, result); } | |
| int getAxisRel (int anum) const | | int getAxisRel (int anum) const | |
| { return dJointGetAMotorAxisRel (_id, anum); } | | { return dJointGetAMotorAxisRel (_id, anum); } | |
| | | | |
| void setAngle (int anum, dReal angle) | | void setAngle (int anum, dReal angle) | |
| { dJointSetAMotorAngle (_id, anum, angle); } | | { dJointSetAMotorAngle (_id, anum, angle); } | |
| dReal getAngle (int anum) const | | dReal getAngle (int anum) const | |
| { return dJointGetAMotorAngle (_id, anum); } | | { return dJointGetAMotorAngle (_id, anum); } | |
| dReal getAngleRate (int anum) | | dReal getAngleRate (int anum) | |
| { return dJointGetAMotorAngleRate (_id,anum); } | | { return dJointGetAMotorAngleRate (_id,anum); } | |
| | | | |
| void setParam (int parameter, dReal value) | | void setParam (int parameter, dReal value) | |
| { dJointSetAMotorParam (_id, parameter, value); } | | { dJointSetAMotorParam (_id, parameter, value); } | |
| dReal getParam (int parameter) const | | dReal getParam (int parameter) const | |
| { return dJointGetAMotorParam (_id, parameter); } | | { return dJointGetAMotorParam (_id, parameter); } | |
|
| | | // TODO: expose params through methods | |
| | | | |
| void addTorques(dReal torque1, dReal torque2, dReal torque3) | | void addTorques(dReal torque1, dReal torque2, dReal torque3) | |
| { dJointAddAMotorTorques(_id, torque1, torque2, torque3); } | | { dJointAddAMotorTorques(_id, torque1, torque2, torque3); } | |
| }; | | }; | |
| | | | |
| class dLMotorJoint : public dJoint { | | class dLMotorJoint : public dJoint { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dLMotorJoint (const dLMotorJoint &); | | dLMotorJoint (const dLMotorJoint &); | |
| void operator = (const dLMotorJoint &); | | void operator = (const dLMotorJoint &); | |
| | | | |
| public: | | public: | |
| dLMotorJoint() { } | | dLMotorJoint() { } | |
| dLMotorJoint (dWorldID world, dJointGroupID group=0) | | dLMotorJoint (dWorldID world, dJointGroupID group=0) | |
| { _id = dJointCreateLMotor (world, group); } | | { _id = dJointCreateLMotor (world, group); } | |
|
| | | dLMotorJoint (dWorld& world, dJointGroupID group=0) | |
| | | { _id = dJointCreateLMotor (world.id(), group); } | |
| | | | |
| void create (dWorldID world, dJointGroupID group=0) { | | void create (dWorldID world, dJointGroupID group=0) { | |
| if (_id) dJointDestroy (_id); | | if (_id) dJointDestroy (_id); | |
| _id = dJointCreateLMotor (world, group); | | _id = dJointCreateLMotor (world, group); | |
| } | | } | |
|
| | | void create (dWorld& world, dJointGroupID group=0) | |
| | | { create(world.id(), group); } | |
| | | | |
| void setNumAxes (int num) | | void setNumAxes (int num) | |
| { dJointSetLMotorNumAxes (_id, num); } | | { dJointSetLMotorNumAxes (_id, num); } | |
| int getNumAxes() const | | int getNumAxes() const | |
| { return dJointGetLMotorNumAxes (_id); } | | { return dJointGetLMotorNumAxes (_id); } | |
| | | | |
| void setAxis (int anum, int rel, dReal x, dReal y, dReal z) | | void setAxis (int anum, int rel, dReal x, dReal y, dReal z) | |
| { dJointSetLMotorAxis (_id, anum, rel, x, y, z); } | | { dJointSetLMotorAxis (_id, anum, rel, x, y, z); } | |
|
| | | void setAxis (int anum, int rel, const dVector3 a) | |
| | | { setAxis(anum, rel, a[0], a[1], a[2]); } | |
| void getAxis (int anum, dVector3 result) const | | void getAxis (int anum, dVector3 result) const | |
| { dJointGetLMotorAxis (_id, anum, result); } | | { dJointGetLMotorAxis (_id, anum, result); } | |
| | | | |
| void setParam (int parameter, dReal value) | | void setParam (int parameter, dReal value) | |
| { dJointSetLMotorParam (_id, parameter, value); } | | { dJointSetLMotorParam (_id, parameter, value); } | |
| dReal getParam (int parameter) const | | dReal getParam (int parameter) const | |
| { return dJointGetLMotorParam (_id, parameter); } | | { return dJointGetLMotorParam (_id, parameter); } | |
|
| | | // TODO: expose params through methods | |
| }; | | }; | |
| | | | |
|
| | | //} | |
| | | | |
| #endif | | #endif | |
| #endif | | #endif | |
|
| | | | |
| | | // Local variables: | |
| | | // mode:c++ | |
| | | // c-basic-offset:2 | |
| | | // End: | |
| | | | |
End of changes. 116 change blocks. |
| 51 lines changed or deleted | | 400 lines changed or added | |
|