| mass.h | | mass.h | |
| | | | |
| skipping to change at line 83 | | skipping to change at line 83 | |
| | | | |
| ODE_API void dMassAdjust (dMass *, dReal newmass); | | ODE_API void dMassAdjust (dMass *, dReal newmass); | |
| | | | |
| ODE_API void dMassTranslate (dMass *, dReal x, dReal y, dReal z); | | ODE_API void dMassTranslate (dMass *, dReal x, dReal y, dReal z); | |
| | | | |
| ODE_API void dMassRotate (dMass *, const dMatrix3 R); | | ODE_API void dMassRotate (dMass *, const dMatrix3 R); | |
| | | | |
| ODE_API void dMassAdd (dMass *a, const dMass *b); | | ODE_API void dMassAdd (dMass *a, const dMass *b); | |
| | | | |
| // Backwards compatible API | | // Backwards compatible API | |
|
| #define dMassSetCappedCylinder dMassSetCapsule | | ODE_API ODE_API_DEPRECATED void dMassSetCappedCylinder(dMass *a, dReal b, i | |
| #define dMassSetCappedCylinderTotal dMassSetCapsuleTotal | | nt c, dReal d, dReal e); | |
| | | ODE_API ODE_API_DEPRECATED void dMassSetCappedCylinderTotal(dMass *a, dReal | |
| | | b, int c, dReal d, dReal e); | |
| | | | |
| struct dMass { | | struct dMass { | |
| dReal mass; | | dReal mass; | |
|
| dVector4 c; | | dVector3 c; | |
| dMatrix3 I; | | dMatrix3 I; | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| dMass() | | dMass() | |
| { dMassSetZero (this); } | | { dMassSetZero (this); } | |
| void setZero() | | void setZero() | |
| { dMassSetZero (this); } | | { dMassSetZero (this); } | |
| void setParameters (dReal themass, dReal cgx, dReal cgy, dReal cgz, | | void setParameters (dReal themass, dReal cgx, dReal cgy, dReal cgz, | |
| dReal I11, dReal I22, dReal I33, | | dReal I11, dReal I22, dReal I33, | |
| dReal I12, dReal I13, dReal I23) | | dReal I12, dReal I13, dReal I23) | |
| { dMassSetParameters (this,themass,cgx,cgy,cgz,I11,I22,I33,I12,I13,I23)
; } | | { dMassSetParameters (this,themass,cgx,cgy,cgz,I11,I22,I33,I12,I13,I23)
; } | |
|
| | | | |
| void setSphere (dReal density, dReal radius) | | void setSphere (dReal density, dReal radius) | |
| { dMassSetSphere (this,density,radius); } | | { dMassSetSphere (this,density,radius); } | |
|
| void setCapsule (dReal density, int direction, dReal a, dReal b) | | void setSphereTotal (dReal total, dReal radius) | |
| { dMassSetCappedCylinder (this,density,direction,a,b); } | | { dMassSetSphereTotal (this,total,radius); } | |
| void setCappedCylinder (dReal density, int direction, dReal a, dReal b) | | | |
| { setCapsule(density, direction, a, b); } | | void setCapsule (dReal density, int direction, dReal radius, dReal length | |
| | | ) | |
| | | { dMassSetCapsule (this,density,direction,radius,length); } | |
| | | void setCapsuleTotal (dReal total, int direction, dReal radius, dReal len | |
| | | gth) | |
| | | { dMassSetCapsule (this,total,direction,radius,length); } | |
| | | | |
| | | void setCylinder(dReal density, int direction, dReal radius, dReal length | |
| | | ) | |
| | | { dMassSetCylinder (this,density,direction,radius,length); } | |
| | | void setCylinderTotal(dReal total, int direction, dReal radius, dReal len | |
| | | gth) | |
| | | { dMassSetCylinderTotal (this,total,direction,radius,length); } | |
| | | | |
| void setBox (dReal density, dReal lx, dReal ly, dReal lz) | | void setBox (dReal density, dReal lx, dReal ly, dReal lz) | |
| { dMassSetBox (this,density,lx,ly,lz); } | | { dMassSetBox (this,density,lx,ly,lz); } | |
|
| | | void setBoxTotal (dReal total, dReal lx, dReal ly, dReal lz) | |
| | | { dMassSetBoxTotal (this,total,lx,ly,lz); } | |
| | | | |
| | | void setTrimesh(dReal density, dGeomID g) | |
| | | { dMassSetTrimesh (this, density, g); } | |
| | | void setTrimeshTotal(dReal total, dGeomID g) | |
| | | { dMassSetTrimeshTotal (this, total, g); } | |
| | | | |
| void adjust (dReal newmass) | | void adjust (dReal newmass) | |
| { dMassAdjust (this,newmass); } | | { dMassAdjust (this,newmass); } | |
| void translate (dReal x, dReal y, dReal z) | | void translate (dReal x, dReal y, dReal z) | |
| { dMassTranslate (this,x,y,z); } | | { dMassTranslate (this,x,y,z); } | |
| void rotate (const dMatrix3 R) | | void rotate (const dMatrix3 R) | |
| { dMassRotate (this,R); } | | { dMassRotate (this,R); } | |
| void add (const dMass *b) | | void add (const dMass *b) | |
| { dMassAdd (this,b); } | | { dMassAdd (this,b); } | |
| #endif | | #endif | |
| }; | | }; | |
| | | | |
End of changes. 5 change blocks. |
| 7 lines changed or deleted | | 31 lines changed or added | |
|
| objects.h | | objects.h | |
| | | | |
| skipping to change at line 1043 | | skipping to change at line 1043 | |
| | | | |
| /** | | /** | |
| * @brief Return a joint attached to this body, given by index. | | * @brief Return a joint attached to this body, given by index. | |
| * @ingroup bodies | | * @ingroup bodies | |
| * @param index valid range is 0 to n-1 where n is the value returned by | | * @param index valid range is 0 to n-1 where n is the value returned by | |
| * dBodyGetNumJoints(). | | * dBodyGetNumJoints(). | |
| */ | | */ | |
| ODE_API dJointID dBodyGetJoint (dBodyID, int index); | | ODE_API dJointID dBodyGetJoint (dBodyID, int index); | |
| | | | |
| /** | | /** | |
|
| | | * @brief Set rigid body to dynamic state (default). | |
| | | * @param dBodyID identification of body. | |
| | | * @ingroup bodies | |
| | | */ | |
| | | ODE_API void dBodySetDynamic (dBodyID); | |
| | | | |
| | | /** | |
| | | * @brief Set rigid body to kinematic state. | |
| | | * When in kinematic state the body isn't simulated as a dynamic | |
| | | * body (it's "unstoppable", doesn't respond to forces), | |
| | | * but can still affect dynamic bodies (e.g. in joints). | |
| | | * Kinematic bodies can be controlled by position and velocity. | |
| | | * @note A kinematic body has infinite mass. If you set its mass | |
| | | * to something else, it loses the kinematic state and behaves | |
| | | * as a normal dynamic body. | |
| | | * @param dBodyID identification of body. | |
| | | * @ingroup bodies | |
| | | */ | |
| | | ODE_API void dBodySetKinematic (dBodyID); | |
| | | | |
| | | /** | |
| | | * @brief Check wether a body is in kinematic state. | |
| | | * @ingroup bodies | |
| | | * @return 1 if a body is kinematic or 0 if it is dynamic. | |
| | | */ | |
| | | ODE_API int dBodyIsKinematic (dBodyID); | |
| | | | |
| | | /** | |
| * @brief Manually enable a body. | | * @brief Manually enable a body. | |
| * @param dBodyID identification of body. | | * @param dBodyID identification of body. | |
| * @ingroup bodies | | * @ingroup bodies | |
| */ | | */ | |
| ODE_API void dBodyEnable (dBodyID); | | ODE_API void dBodyEnable (dBodyID); | |
| | | | |
| /** | | /** | |
| * @brief Manually disable a body. | | * @brief Manually disable a body. | |
| * @ingroup bodies | | * @ingroup bodies | |
| * @remarks | | * @remarks | |
| | | | |
| skipping to change at line 1205 | | skipping to change at line 1233 | |
| * @ingroup damping bodies | | * @ingroup damping bodies | |
| * @sa dWorldGetMaxAngularSpeed() | | * @sa dWorldGetMaxAngularSpeed() | |
| */ | | */ | |
| ODE_API dReal dBodyGetMaxAngularSpeed (dBodyID b); | | ODE_API dReal dBodyGetMaxAngularSpeed (dBodyID b); | |
| | | | |
| /** | | /** | |
| * @brief Set the body's maximum angular speed. | | * @brief Set the body's maximum angular speed. | |
| * @ingroup damping bodies | | * @ingroup damping bodies | |
| * @sa dWorldSetMaxAngularSpeed() dBodyResetMaxAngularSpeed() | | * @sa dWorldSetMaxAngularSpeed() dBodyResetMaxAngularSpeed() | |
| * The default value is dInfinity, but it's a good idea to limit | | * 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 | | * it at less than 500 if the body has the gyroscopic term | |
| * enabled. | | * enabled. | |
| */ | | */ | |
| ODE_API void dBodySetMaxAngularSpeed(dBodyID b, dReal max_speed); | | ODE_API void dBodySetMaxAngularSpeed(dBodyID b, dReal max_speed); | |
| | | | |
| /** | | /** | |
|
| | | * @brief Get the body's gyroscopic state. | |
| | | * | |
| | | * @return nonzero if gyroscopic term computation is enabled (default), | |
| | | * zero otherwise. | |
| | | * @ingroup bodies | |
| | | */ | |
| | | ODE_API int dBodyGetGyroscopicMode(dBodyID b); | |
| | | | |
| | | /** | |
| | | * @brief Enable/disable the body's gyroscopic term. | |
| | | * | |
| | | * Disabling the gyroscopic term of a body usually improves | |
| | | * stability. It also helps turning spining objects, like cars' | |
| | | * wheels. | |
| | | * | |
| | | * @param enabled nonzero (default) to enable gyroscopic term, 0 | |
| | | * to disable. | |
| | | * @ingroup bodies | |
| | | */ | |
| | | ODE_API void dBodySetGyroscopicMode(dBodyID b, int enabled); | |
| | | | |
| | | /** | |
| * @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 1441 | | skipping to change at line 1491 | |
| * 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 | |
| * Some joints, like hinge-2 need to be attached to two bodies to work. | | * Some joints, like hinge-2 need to be attached to two bodies to work. | |
| */ | | */ | |
| ODE_API void dJointAttach (dJointID, dBodyID body1, dBodyID body2); | | ODE_API void dJointAttach (dJointID, dBodyID body1, dBodyID body2); | |
| | | | |
| /** | | /** | |
|
| | | * @brief Manually enable a joint. | |
| | | * @param dJointID identification of joint. | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API void dJointEnable (dJointID); | |
| | | | |
| | | /** | |
| | | * @brief Manually disable a joint. | |
| | | * @ingroup joints | |
| | | * @remarks | |
| | | * A disabled joint will not affect the simulation, but will maintain the a | |
| | | nchors and | |
| | | * axes so it can be enabled later. | |
| | | */ | |
| | | ODE_API void dJointDisable (dJointID); | |
| | | | |
| | | /** | |
| | | * @brief Check wether a joint is enabled. | |
| | | * @ingroup joints | |
| | | * @return 1 if a joint is currently enabled or 0 if it is disabled. | |
| | | */ | |
| | | ODE_API int dJointIsEnabled (dJointID); | |
| | | | |
| | | /** | |
| * @brief Set the user-data pointer | | * @brief Set the user-data pointer | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
| ODE_API void dJointSetData (dJointID, void *data); | | ODE_API void dJointSetData (dJointID, void *data); | |
| | | | |
| /** | | /** | |
| * @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); | |
| | | | |
| skipping to change at line 1653 | | skipping to change at line 1726 | |
| */ | | */ | |
| ODE_API void dJointSetUniversalAnchor (dJointID, dReal x, dReal y, dReal z)
; | | ODE_API void dJointSetUniversalAnchor (dJointID, dReal x, dReal y, dReal z)
; | |
| | | | |
| /** | | /** | |
| * @brief set axis | | * @brief set axis | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
| ODE_API void dJointSetUniversalAxis1 (dJointID, dReal x, dReal y, dReal z); | | ODE_API void dJointSetUniversalAxis1 (dJointID, dReal x, dReal y, dReal z); | |
| | | | |
| /** | | /** | |
|
| | | * @brief Set the Universal axis1 as if the 2 bodies were already at | |
| | | * offset1 and offset2 appart with respect to axis1 and axis2. | |
| | | * @ingroup joints | |
| | | * | |
| | | * This function initialize the axis1 and the relative orientation of | |
| | | * each body as if body1 was rotated around the new axis1 by the offset1 | |
| | | * value and as if body2 was rotated around the axis2 by offset2. \br | |
| | | * Ex: | |
| | | * <PRE> | |
| | | * dJointSetHuniversalAxis1(jId, 1, 0, 0); | |
| | | * // If you request the position you will have: dJointGetUniversalAngle1(j | |
| | | Id) == 0 | |
| | | * // If you request the position you will have: dJointGetUniversalAngle2(j | |
| | | Id) == 0 | |
| | | * dJointSetHuniversalAxis1Offset(jId, 1, 0, 0, 0.2, 0.17); | |
| | | * // If you request the position you will have: dJointGetUniversalAngle1(j | |
| | | Id) == 0.2 | |
| | | * // If you request the position you will have: dJointGetUniversalAngle2(j | |
| | | Id) == 0.17 | |
| | | * </PRE> | |
| | | * | |
| | | * @param j The Hinge joint ID for which the axis will be set | |
| | | * @param x The X component of the axis in world frame | |
| | | * @param y The Y component of the axis in world frame | |
| | | * @param z The Z component of the axis in world frame | |
| | | * @param angle The angle for the offset of the relative orientation. | |
| | | * As if body1 was rotated by angle when the Axis was set (see | |
| | | below). | |
| | | * The rotation is around the new Hinge axis. | |
| | | * | |
| | | * @note Usually the function dJointSetHingeAxis set the current position o | |
| | | f body1 | |
| | | * and body2 as the zero angle position. This function set the curren | |
| | | t position | |
| | | * as the if the 2 bodies where \b offsets appart. | |
| | | * | |
| | | * @note Any previous offsets are erased. | |
| | | * | |
| | | * @warning Calling dJointSetUniversalAnchor, dJointSetUnivesalAxis1, | |
| | | * dJointSetUniversalAxis2, dJointSetUniversalAxis2Offset | |
| | | * will reset the "zero" angle position. | |
| | | */ | |
| | | ODE_API void dJointSetUniversalAxis1Offset (dJointID, dReal x, dReal y, dRe | |
| | | al z, | |
| | | dReal offset1, dReal offset2); | |
| | | | |
| | | /** | |
| * @brief set axis | | * @brief set axis | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
| ODE_API void dJointSetUniversalAxis2 (dJointID, dReal x, dReal y, dReal z); | | ODE_API void dJointSetUniversalAxis2 (dJointID, dReal x, dReal y, dReal z); | |
| | | | |
| /** | | /** | |
|
| | | * @brief Set the Universal axis2 as if the 2 bodies were already at | |
| | | * offset1 and offset2 appart with respect to axis1 and axis2. | |
| | | * @ingroup joints | |
| | | * | |
| | | * This function initialize the axis2 and the relative orientation of | |
| | | * each body as if body1 was rotated around the axis1 by the offset1 | |
| | | * value and as if body2 was rotated around the new axis2 by offset2. \br | |
| | | * Ex: | |
| | | * <PRE> | |
| | | * dJointSetHuniversalAxis2(jId, 0, 1, 0); | |
| | | * // If you request the position you will have: dJointGetUniversalAngle1(j | |
| | | Id) == 0 | |
| | | * // If you request the position you will have: dJointGetUniversalAngle2(j | |
| | | Id) == 0 | |
| | | * dJointSetHuniversalAxis2Offset(jId, 0, 1, 0, 0.2, 0.17); | |
| | | * // If you request the position you will have: dJointGetUniversalAngle1(j | |
| | | Id) == 0.2 | |
| | | * // If you request the position you will have: dJointGetUniversalAngle2(j | |
| | | Id) == 0.17 | |
| | | * </PRE> | |
| | | | |
| | | * @param j The Hinge joint ID for which the axis will be set | |
| | | * @param x The X component of the axis in world frame | |
| | | * @param y The Y component of the axis in world frame | |
| | | * @param z The Z component of the axis in world frame | |
| | | * @param angle The angle for the offset of the relative orientation. | |
| | | * As if body1 was rotated by angle when the Axis was set (see | |
| | | below). | |
| | | * The rotation is around the new Hinge axis. | |
| | | * | |
| | | * @note Usually the function dJointSetHingeAxis set the current position o | |
| | | f body1 | |
| | | * and body2 as the zero angle position. This function set the curren | |
| | | t position | |
| | | * as the if the 2 bodies where \b offsets appart. | |
| | | * | |
| | | * @note Any previous offsets are erased. | |
| | | * | |
| | | * @warning Calling dJointSetUniversalAnchor, dJointSetUnivesalAxis1, | |
| | | * dJointSetUniversalAxis2, dJointSetUniversalAxis2Offset | |
| | | * will reset the "zero" angle position. | |
| | | */ | |
| | | | |
| | | ODE_API void dJointSetUniversalAxis2Offset (dJointID, dReal x, dReal y, dRe | |
| | | al z, | |
| | | dReal offset1, dReal offset2); | |
| | | | |
| | | /** | |
| * @brief set joint parameter | | * @brief set joint parameter | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
| ODE_API void dJointSetUniversalParam (dJointID, int parameter, dReal value)
; | | ODE_API void dJointSetUniversalParam (dJointID, int parameter, dReal value)
; | |
| | | | |
| /** | | /** | |
| * @brief Applies torque1 about the universal's axis 1, torque2 about the | | * @brief Applies torque1 about the universal's axis 1, torque2 about the | |
| * universal's axis 2. | | * universal's axis 2. | |
| * @remarks This function is just a wrapper for dBodyAddTorque(). | | * @remarks This function is just a wrapper for dBodyAddTorque(). | |
| * @ingroup joints | | * @ingroup joints | |
| | | | |
| skipping to change at line 1718 | | skipping to change at line 1870 | |
| /** | | /** | |
| * @brief set anchor | | * @brief set anchor | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
| ODE_API void dJointSetPUAnchor (dJointID, dReal x, dReal y, dReal z); | | ODE_API void dJointSetPUAnchor (dJointID, dReal x, dReal y, dReal z); | |
| | | | |
| /** | | /** | |
| * @brief set anchor | | * @brief set anchor | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
|
| ODE_API void dJointSetPUAnchorDelta (dJointID, dReal x, dReal y, dReal z, | | ODE_API_DEPRECATED ODE_API void dJointSetPUAnchorDelta (dJointID, dReal x | |
| | | , dReal y, dReal z, | |
| | | dReal dx, dReal d | |
| | | y, dReal dz); | |
| | | | |
| | | /** | |
| | | * @brief Set the PU anchor as if the 2 bodies were already at [dx, dy, d | |
| | | z] appart. | |
| | | * @ingroup joints | |
| | | * | |
| | | * This function initialize the anchor and the relative position of each | |
| | | body | |
| | | * as if the position between body1 and body2 was already the projection | |
| | | of [dx, dy, dz] | |
| | | * along the Piston axis. (i.e as if the body1 was at its current positio | |
| | | n - [dx,dy,dy] when the | |
| | | * axis is set). | |
| | | * Ex: | |
| | | * <PRE> | |
| | | * dReal offset = 3; | |
| | | * dVector3 axis; | |
| | | * dJointGetPUAxis(jId, axis); | |
| | | * dJointSetPUAnchor(jId, 0, 0, 0); | |
| | | * // If you request the position you will have: dJointGetPUPosition(jId) | |
| | | == 0 | |
| | | * dJointSetPUAnchorOffset(jId, 0, 0, 0, axis[X]*offset, axis[Y]*offset, | |
| | | axis[Z]*offset); | |
| | | * // If you request the position you will have: dJointGetPUPosition(jId) | |
| | | == offset | |
| | | * </PRE> | |
| | | * @param j The PU joint for which the anchor point will be set | |
| | | * @param x The X position of the anchor point in world frame | |
| | | * @param y The Y position of the anchor point in world frame | |
| | | * @param z The Z position of the anchor point in world frame | |
| | | * @param dx A delta to be substracted to the X position as if the anchor | |
| | | was set | |
| | | * when body1 was at current_position[X] - dx | |
| | | * @param dx A delta to be substracted to the Y position as if the anchor | |
| | | was set | |
| | | * when body1 was at current_position[Y] - dy | |
| | | * @param dx A delta to be substracted to the Z position as if the anchor | |
| | | was set | |
| | | * when body1 was at current_position[Z] - dz | |
| | | */ | |
| | | ODE_API void dJointSetPUAnchorOffset (dJointID, dReal x, dReal y, dReal z | |
| | | , | |
| dReal dx, dReal dy, dReal dz); | | dReal dx, dReal dy, dReal dz); | |
| | | | |
| /** | | /** | |
| * @brief set the axis for the first axis or the universal articulation | | * @brief set the axis for the first axis or the universal articulation | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
| ODE_API void dJointSetPUAxis1 (dJointID, dReal x, dReal y, dReal z); | | ODE_API void dJointSetPUAxis1 (dJointID, dReal x, dReal y, dReal z); | |
| | | | |
| /** | | /** | |
| * @brief set the axis for the second axis or the universal articulation | | * @brief set the axis for the second axis or the universal articulation | |
| | | | |
| skipping to change at line 2216 | | skipping to change at line 2400 | |
| ODE_API dReal dJointGetPRPosition (dJointID); | | ODE_API dReal dJointGetPRPosition (dJointID); | |
| | | | |
| /** | | /** | |
| * @brief Get the PR linear position's time derivative | | * @brief Get the PR linear position's time derivative | |
| * | | * | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
| ODE_API dReal dJointGetPRPositionRate (dJointID); | | ODE_API dReal dJointGetPRPositionRate (dJointID); | |
| | | | |
| /** | | /** | |
|
| | | * @brief Get the PR angular position (i.e. the twist between the 2 bodi | |
| | | es) | |
| | | * | |
| | | * 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 dJointGetPRAngle (dJointID); | |
| | | | |
| | | /** | |
| | | * @brief Get the PR angular position's time derivative | |
| | | * | |
| | | * @ingroup joints | |
| | | */ | |
| | | ODE_API dReal dJointGetPRAngleRate (dJointID); | |
| | | | |
| | | /** | |
| * @brief Get the prismatic axis | | * @brief Get the prismatic axis | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
| ODE_API void dJointGetPRAxis1 (dJointID, dVector3 result); | | ODE_API void dJointGetPRAxis1 (dJointID, dVector3 result); | |
| | | | |
| /** | | /** | |
| * @brief Get the Rotoide axis | | * @brief Get the Rotoide axis | |
| * @ingroup joints | | * @ingroup joints | |
| */ | | */ | |
| ODE_API void dJointGetPRAxis2 (dJointID, dVector3 result); | | ODE_API void dJointGetPRAxis2 (dJointID, dVector3 result); | |
| | | | |
End of changes. 8 change blocks. |
| 2 lines changed or deleted | | 233 lines changed or added | |
|
| odecpp.h | | odecpp.h | |
| | | | |
| skipping to change at line 71 | | skipping to change at line 71 | |
| 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(int depth) | |
| { dWorldSetAutoEnableDepthSF1 (_id, depth); } | | { dWorldSetAutoEnableDepthSF1 (_id, depth); } | |
|
| int getAutoEnableDepthSF1(dWorldID) const | | int getAutoEnableDepthSF1() const | |
| { return dWorldGetAutoEnableDepthSF1 (_id); } | | { return dWorldGetAutoEnableDepthSF1 (_id); } | |
| | | | |
| void quickStep(dReal stepsize) | | void quickStep(dReal stepsize) | |
| { dWorldQuickStep (_id, stepsize); } | | { dWorldQuickStep (_id, stepsize); } | |
| void setQuickStepNumIterations(int num) | | void setQuickStepNumIterations(int num) | |
| { dWorldSetQuickStepNumIterations (_id, num); } | | { dWorldSetQuickStepNumIterations (_id, num); } | |
| int getQuickStepNumIterations() const | | int getQuickStepNumIterations() const | |
| { return dWorldGetQuickStepNumIterations (_id); } | | { return dWorldGetQuickStepNumIterations (_id); } | |
| void setQuickStepW(dReal over_relaxation) | | void setQuickStepW(dReal over_relaxation) | |
| { dWorldSetQuickStepW (_id, over_relaxation); } | | { dWorldSetQuickStepW (_id, over_relaxation); } | |
| | | | |
| skipping to change at line 267 | | skipping to change at line 267 | |
| { 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) | | void setForce (const dVector3 f) | |
| { setForce (f[0], f[1], f[2]); } | | { 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) | | void setTorque (const dVector3 t) | |
| { setTorque (t[0], t[1], t[2]); } | | { setTorque (t[0], t[1], t[2]); } | |
| | | | |
|
| | | void setDynamic() | |
| | | { dBodySetDynamic (_id); } | |
| | | void setKinematic() | |
| | | { dBodySetKinematic (_id); } | |
| | | bool isKinematic() const | |
| | | { return dBodyIsKinematic (_id) != 0; } | |
| | | | |
| void enable() | | void enable() | |
| { dBodyEnable (_id); } | | { dBodyEnable (_id); } | |
| void disable() | | void disable() | |
| { dBodyDisable (_id); } | | { dBodyDisable (_id); } | |
| bool isEnabled() const | | bool isEnabled() const | |
| { return dBodyIsEnabled (_id) != 0; } | | { return dBodyIsEnabled (_id) != 0; } | |
| | | | |
| void getRelPointPos (dReal px, dReal py, dReal pz, dVector3 result) const | | void getRelPointPos (dReal px, dReal py, dReal pz, dVector3 result) const | |
| { dBodyGetRelPointPos (_id, px, py, pz, result); } | | { dBodyGetRelPointPos (_id, px, py, pz, result); } | |
| void getRelPointPos (const dVector3 p, dVector3 result) const | | void getRelPointPos (const dVector3 p, dVector3 result) const | |
| | | | |
| skipping to change at line 361 | | skipping to change at line 368 | |
| dReal getLinearDamping() const | | dReal getLinearDamping() const | |
| { return dBodyGetLinearDamping(_id); } | | { return dBodyGetLinearDamping(_id); } | |
| void setLinearDamping(dReal scale) | | void setLinearDamping(dReal scale) | |
| { dBodySetLinearDamping(_id, scale); } | | { dBodySetLinearDamping(_id, scale); } | |
| dReal getAngularDamping() const | | dReal getAngularDamping() const | |
| { return dBodyGetAngularDamping(_id); } | | { return dBodyGetAngularDamping(_id); } | |
| void setAngularDamping(dReal scale) | | void setAngularDamping(dReal scale) | |
| { dBodySetAngularDamping(_id, scale); } | | { dBodySetAngularDamping(_id, scale); } | |
| void setDamping(dReal linear_scale, dReal angular_scale) | | void setDamping(dReal linear_scale, dReal angular_scale) | |
| { dBodySetDamping(_id, linear_scale, angular_scale); } | | { dBodySetDamping(_id, linear_scale, angular_scale); } | |
|
| dReal getLinearDampingThreshold() const | | dReal getLinearDampingThreshold() const | |
| { return dBodyGetLinearDampingThreshold(_id); } | | { return dBodyGetLinearDampingThreshold(_id); } | |
|
| void setLinearDampingThreshold(dReal threshold) const | | void setLinearDampingThreshold(dReal threshold) const | |
| { dBodySetLinearDampingThreshold(_id, threshold); } | | { dBodySetLinearDampingThreshold(_id, threshold); } | |
|
| dReal getAngularDampingThreshold() const | | dReal getAngularDampingThreshold() const | |
| { return dBodyGetAngularDampingThreshold(_id); } | | { return dBodyGetAngularDampingThreshold(_id); } | |
|
| void setAngularDampingThreshold(dReal threshold) | | void setAngularDampingThreshold(dReal threshold) | |
| { dBodySetAngularDampingThreshold(_id, threshold); } | | { dBodySetAngularDampingThreshold(_id, threshold); } | |
|
| void setDampingDefaults() | | void setDampingDefaults() | |
| { dBodySetDampingDefaults(_id); } | | { dBodySetDampingDefaults(_id); } | |
| | | | |
|
| dReal getMaxAngularSpeed() const | | dReal getMaxAngularSpeed() const | |
| { return dBodyGetMaxAngularSpeed(_id); } | | { return dBodyGetMaxAngularSpeed(_id); } | |
|
| void setMaxAngularSpeed(dReal max_speed) | | void setMaxAngularSpeed(dReal max_speed) | |
| { dBodySetMaxAngularSpeed(_id, max_speed); } | | { dBodySetMaxAngularSpeed(_id, max_speed); } | |
| | | | |
|
| | | bool getGyroscopicMode() const | |
| | | { return dBodyGetGyroscopicMode(_id) != 0; } | |
| | | void setGyroscopicMode(bool mode) | |
| | | { dBodySetGyroscopicMode(_id, mode); } | |
| | | | |
| }; | | }; | |
| | | | |
| 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: | |
|
| dJointGroup (int dummy_arg=0) | | dJointGroup () | |
| { _id = dJointGroupCreate (0); } | | { _id = dJointGroupCreate (0); } | |
| ~dJointGroup() | | ~dJointGroup() | |
| { dJointGroupDestroy (_id); } | | { dJointGroupDestroy (_id); } | |
|
| void create (int dummy_arg=0) { | | void create () { | |
| if (_id) dJointGroupDestroy (_id); | | if (_id) dJointGroupDestroy (_id); | |
| _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() | |
| | | | |
| skipping to change at line 436 | | skipping to change at line 448 | |
| { return _id; } | | { return _id; } | |
| | | | |
| int getNumBodies() const | | int getNumBodies() const | |
| { return dJointGetNumBodies(_id); } | | { 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) | | void attach (dBody& body1, dBody& body2) | |
| { attach(body1.id(), body2.id()); } | | { attach(body1.id(), body2.id()); } | |
| | | | |
|
| | | void enable() | |
| | | { dJointEnable (_id); } | |
| | | void disable() | |
| | | { dJointDisable (_id); } | |
| | | bool isEnabled() const | |
| | | { return dJointIsEnabled (_id) != 0; } | |
| | | | |
| 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); } | |
| | | | |
| dJointType 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); } | |
| | | | |
| skipping to change at line 747 | | skipping to change at line 766 | |
| 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); } | |
| | | | |
|
| | | dReal getAngle() const | |
| | | { return dJointGetPRAngle (_id); } | |
| | | dReal getAngleRate() const | |
| | | { return dJointGetPRAngleRate (_id); } | |
| | | | |
| virtual void setParam (int parameter, dReal value) | | virtual void setParam (int parameter, dReal value) | |
| { dJointSetPRParam (_id, parameter, value); } | | { dJointSetPRParam (_id, parameter, value); } | |
| virtual dReal getParam (int parameter) const | | virtual dReal getParam (int parameter) const | |
| { return dJointGetPRParam (_id, parameter); } | | { return dJointGetPRParam (_id, parameter); } | |
| }; | | }; | |
| | | | |
| class dPUJoint : public dJoint | | class dPUJoint : public dJoint | |
| { | | { | |
| dPUJoint (const dPUJoint &); | | dPUJoint (const dPUJoint &); | |
| void operator = (const dPUJoint &); | | void operator = (const dPUJoint &); | |
| | | | |
| skipping to change at line 893 | | skipping to change at line 917 | |
| 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) | | dFixedJoint (dWorld& world, dJointGroupID group=0) | |
| { _id = dJointCreateFixed (world, group); } | | { _id = dJointCreateFixed (world, group); } | |
| | | | |
| void create (dWorldID world, dJointGroupID group=0) { | | void create (dWorldID world, dJointGroupID group=0) { | |
| if (_id) dJointDestroy (_id); | | if (_id) dJointDestroy (_id); | |
| _id = dJointCreateFixed (world, group); | | _id = dJointCreateFixed (world, group); | |
| } | | } | |
|
| void create (dWorld& world, dJointGroup group=0) | | void create (dWorld& world, dJointGroupID group=0) | |
| { create(world.id(), group); } | | { create(world.id(), group); } | |
| | | | |
| void set() | | void set() | |
| { dJointSetFixed (_id); } | | { dJointSetFixed (_id); } | |
| | | | |
| virtual void setParam (int parameter, dReal value) | | virtual void setParam (int parameter, dReal value) | |
| { dJointSetFixedParam (_id, parameter, value); } | | { dJointSetFixedParam (_id, parameter, value); } | |
| | | | |
| virtual dReal getParam (int parameter) const | | virtual dReal getParam (int parameter) const | |
| { return dJointGetFixedParam (_id, parameter); } | | { return dJointGetFixedParam (_id, parameter); } | |
| | | | |
End of changes. 16 change blocks. |
| 12 lines changed or deleted | | 36 lines changed or added | |
|
| odecpp_collision.h | | odecpp_collision.h | |
| | | | |
| skipping to change at line 41 | | skipping to change at line 41 | |
| //namespace ode { | | //namespace ode { | |
| | | | |
| class dGeom { | | class dGeom { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dGeom (dGeom &); | | dGeom (dGeom &); | |
| void operator= (dGeom &); | | void operator= (dGeom &); | |
| | | | |
| protected: | | protected: | |
| dGeomID _id; | | dGeomID _id; | |
| | | | |
|
| public: | | | |
| dGeom() | | dGeom() | |
| { _id = 0; } | | { _id = 0; } | |
|
| | | public: | |
| ~dGeom() | | ~dGeom() | |
| { if (_id) dGeomDestroy (_id); } | | { if (_id) dGeomDestroy (_id); } | |
| | | | |
| dGeomID id() const | | dGeomID id() const | |
| { return _id; } | | { return _id; } | |
| operator dGeomID() const | | operator dGeomID() const | |
| { return _id; } | | { return _id; } | |
| | | | |
| void destroy() { | | void destroy() { | |
| if (_id) dGeomDestroy (_id); | | if (_id) dGeomDestroy (_id); | |
| | | | |
| skipping to change at line 158 | | skipping to change at line 158 | |
| void collide (void *data, dNearCallback *callback) | | void collide (void *data, dNearCallback *callback) | |
| { dSpaceCollide (id(),data,callback); } | | { dSpaceCollide (id(),data,callback); } | |
| }; | | }; | |
| | | | |
| class dSimpleSpace : public dSpace { | | class dSimpleSpace : public dSpace { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dSimpleSpace (dSimpleSpace &); | | dSimpleSpace (dSimpleSpace &); | |
| void operator= (dSimpleSpace &); | | void operator= (dSimpleSpace &); | |
| | | | |
| public: | | public: | |
|
| | | dSimpleSpace () | |
| | | { _id = (dGeomID) dSimpleSpaceCreate (0); } | |
| | | dSimpleSpace (dSpace &space) | |
| | | { _id = (dGeomID) dSimpleSpaceCreate (space.id()); } | |
| dSimpleSpace (dSpaceID space) | | dSimpleSpace (dSpaceID space) | |
| { _id = (dGeomID) dSimpleSpaceCreate (space); } | | { _id = (dGeomID) dSimpleSpaceCreate (space); } | |
| }; | | }; | |
| | | | |
| class dHashSpace : public dSpace { | | class dHashSpace : public dSpace { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dHashSpace (dHashSpace &); | | dHashSpace (dHashSpace &); | |
| void operator= (dHashSpace &); | | void operator= (dHashSpace &); | |
| | | | |
| public: | | public: | |
|
| | | dHashSpace () | |
| | | { _id = (dGeomID) dHashSpaceCreate (0); } | |
| | | dHashSpace (dSpace &space) | |
| | | { _id = (dGeomID) dHashSpaceCreate (space.id()); } | |
| dHashSpace (dSpaceID space) | | dHashSpace (dSpaceID space) | |
| { _id = (dGeomID) dHashSpaceCreate (space); } | | { _id = (dGeomID) dHashSpaceCreate (space); } | |
|
| | | | |
| void setLevels (int minlevel, int maxlevel) | | void setLevels (int minlevel, int maxlevel) | |
| { dHashSpaceSetLevels (id(),minlevel,maxlevel); } | | { dHashSpaceSetLevels (id(),minlevel,maxlevel); } | |
| }; | | }; | |
| | | | |
| class dQuadTreeSpace : public dSpace { | | class dQuadTreeSpace : public dSpace { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dQuadTreeSpace (dQuadTreeSpace &); | | dQuadTreeSpace (dQuadTreeSpace &); | |
| void operator= (dQuadTreeSpace &); | | void operator= (dQuadTreeSpace &); | |
| | | | |
| public: | | public: | |
|
| dQuadTreeSpace (dSpaceID space, dVector3 center, dVector3 extents, int de | | dQuadTreeSpace (const dVector3 center, const dVector3 extents, int depth) | |
| pth) | | { _id = (dGeomID) dQuadTreeSpaceCreate (0,center,extents,depth); } | |
| | | dQuadTreeSpace (dSpace &space, const dVector3 center, const dVector3 exte | |
| | | nts, int depth) | |
| | | { _id = (dGeomID) dQuadTreeSpaceCreate (space.id(),center,extents,depth | |
| | | ); } | |
| | | dQuadTreeSpace (dSpaceID space, const dVector3 center, const dVector3 ext | |
| | | ents, int depth) | |
| { _id = (dGeomID) dQuadTreeSpaceCreate (space,center,extents,depth); } | | { _id = (dGeomID) dQuadTreeSpaceCreate (space,center,extents,depth); } | |
| }; | | }; | |
| | | | |
| class dSphere : public dGeom { | | class dSphere : public dGeom { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dSphere (dSphere &); | | dSphere (dSphere &); | |
| void operator= (dSphere &); | | void operator= (dSphere &); | |
| | | | |
| public: | | public: | |
| dSphere () { } | | dSphere () { } | |
|
| | | dSphere (dReal radius) | |
| | | { _id = dCreateSphere (0, radius); } | |
| | | dSphere (dSpace &space, dReal radius) | |
| | | { _id = dCreateSphere (space.id(), radius); } | |
| dSphere (dSpaceID space, dReal radius) | | dSphere (dSpaceID space, dReal radius) | |
| { _id = dCreateSphere (space, radius); } | | { _id = dCreateSphere (space, radius); } | |
| | | | |
| void create (dSpaceID space, dReal radius) { | | void create (dSpaceID space, dReal radius) { | |
| if (_id) dGeomDestroy (_id); | | if (_id) dGeomDestroy (_id); | |
| _id = dCreateSphere (space, radius); | | _id = dCreateSphere (space, radius); | |
| } | | } | |
| | | | |
| void setRadius (dReal radius) | | void setRadius (dReal radius) | |
| { dGeomSphereSetRadius (_id, radius); } | | { dGeomSphereSetRadius (_id, radius); } | |
| | | | |
| skipping to change at line 212 | | skipping to change at line 229 | |
| { return dGeomSphereGetRadius (_id); } | | { return dGeomSphereGetRadius (_id); } | |
| }; | | }; | |
| | | | |
| class dBox : public dGeom { | | class dBox : public dGeom { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dBox (dBox &); | | dBox (dBox &); | |
| void operator= (dBox &); | | void operator= (dBox &); | |
| | | | |
| public: | | public: | |
| dBox () { } | | dBox () { } | |
|
| | | dBox (dReal lx, dReal ly, dReal lz) | |
| | | { _id = dCreateBox (0,lx,ly,lz); } | |
| | | dBox (dSpace &space, dReal lx, dReal ly, dReal lz) | |
| | | { _id = dCreateBox (space,lx,ly,lz); } | |
| dBox (dSpaceID space, dReal lx, dReal ly, dReal lz) | | dBox (dSpaceID space, dReal lx, dReal ly, dReal lz) | |
| { _id = dCreateBox (space,lx,ly,lz); } | | { _id = dCreateBox (space,lx,ly,lz); } | |
| | | | |
| void create (dSpaceID space, dReal lx, dReal ly, dReal lz) { | | void create (dSpaceID space, dReal lx, dReal ly, dReal lz) { | |
| if (_id) dGeomDestroy (_id); | | if (_id) dGeomDestroy (_id); | |
| _id = dCreateBox (space,lx,ly,lz); | | _id = dCreateBox (space,lx,ly,lz); | |
| } | | } | |
| | | | |
| void setLengths (dReal lx, dReal ly, dReal lz) | | void setLengths (dReal lx, dReal ly, dReal lz) | |
| { dGeomBoxSetLengths (_id, lx, ly, lz); } | | { dGeomBoxSetLengths (_id, lx, ly, lz); } | |
| | | | |
| skipping to change at line 233 | | skipping to change at line 254 | |
| { dGeomBoxGetLengths (_id,result); } | | { dGeomBoxGetLengths (_id,result); } | |
| }; | | }; | |
| | | | |
| class dPlane : public dGeom { | | class dPlane : public dGeom { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dPlane (dPlane &); | | dPlane (dPlane &); | |
| void operator= (dPlane &); | | void operator= (dPlane &); | |
| | | | |
| public: | | public: | |
| dPlane() { } | | dPlane() { } | |
|
| | | dPlane (dReal a, dReal b, dReal c, dReal d) | |
| | | { _id = dCreatePlane (0,a,b,c,d); } | |
| | | dPlane (dSpace &space, dReal a, dReal b, dReal c, dReal d) | |
| | | { _id = dCreatePlane (space.id(),a,b,c,d); } | |
| dPlane (dSpaceID space, dReal a, dReal b, dReal c, dReal d) | | dPlane (dSpaceID space, dReal a, dReal b, dReal c, dReal d) | |
| { _id = dCreatePlane (space,a,b,c,d); } | | { _id = dCreatePlane (space,a,b,c,d); } | |
| | | | |
| void create (dSpaceID space, dReal a, dReal b, dReal c, dReal d) { | | void create (dSpaceID space, dReal a, dReal b, dReal c, dReal d) { | |
| if (_id) dGeomDestroy (_id); | | if (_id) dGeomDestroy (_id); | |
| _id = dCreatePlane (space,a,b,c,d); | | _id = dCreatePlane (space,a,b,c,d); | |
| } | | } | |
| | | | |
| void setParams (dReal a, dReal b, dReal c, dReal d) | | void setParams (dReal a, dReal b, dReal c, dReal d) | |
| { dGeomPlaneSetParams (_id, a, b, c, d); } | | { dGeomPlaneSetParams (_id, a, b, c, d); } | |
| | | | |
| skipping to change at line 254 | | skipping to change at line 279 | |
| { dGeomPlaneGetParams (_id,result); } | | { dGeomPlaneGetParams (_id,result); } | |
| }; | | }; | |
| | | | |
| class dCapsule : public dGeom { | | class dCapsule : public dGeom { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dCapsule (dCapsule &); | | dCapsule (dCapsule &); | |
| void operator= (dCapsule &); | | void operator= (dCapsule &); | |
| | | | |
| public: | | public: | |
| dCapsule() { } | | dCapsule() { } | |
|
| | | dCapsule (dReal radius, dReal length) | |
| | | { _id = dCreateCapsule (0,radius,length); } | |
| | | dCapsule (dSpace &space, dReal radius, dReal length) | |
| | | { _id = dCreateCapsule (space.id(),radius,length); } | |
| dCapsule (dSpaceID space, dReal radius, dReal length) | | dCapsule (dSpaceID space, dReal radius, dReal length) | |
| { _id = dCreateCapsule (space,radius,length); } | | { _id = dCreateCapsule (space,radius,length); } | |
| | | | |
| void create (dSpaceID space, dReal radius, dReal length) { | | void create (dSpaceID space, dReal radius, dReal length) { | |
| if (_id) dGeomDestroy (_id); | | if (_id) dGeomDestroy (_id); | |
| _id = dCreateCapsule (space,radius,length); | | _id = dCreateCapsule (space,radius,length); | |
| } | | } | |
| | | | |
| void setParams (dReal radius, dReal length) | | void setParams (dReal radius, dReal length) | |
| { dGeomCapsuleSetParams (_id, radius, length); } | | { dGeomCapsuleSetParams (_id, radius, length); } | |
| | | | |
| skipping to change at line 275 | | skipping to change at line 304 | |
| { dGeomCapsuleGetParams (_id,radius,length); } | | { dGeomCapsuleGetParams (_id,radius,length); } | |
| }; | | }; | |
| | | | |
| class dCylinder : public dGeom { | | class dCylinder : public dGeom { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dCylinder (dCylinder &); | | dCylinder (dCylinder &); | |
| void operator= (dCylinder &); | | void operator= (dCylinder &); | |
| | | | |
| public: | | public: | |
| dCylinder() { } | | dCylinder() { } | |
|
| | | dCylinder (dReal radius, dReal length) | |
| | | { _id = dCreateCylinder (0,radius,length); } | |
| | | dCylinder (dSpace &space, dReal radius, dReal length) | |
| | | { _id = dCreateCylinder (space.id(),radius,length); } | |
| dCylinder (dSpaceID space, dReal radius, dReal length) | | dCylinder (dSpaceID space, dReal radius, dReal length) | |
| { _id = dCreateCylinder (space,radius,length); } | | { _id = dCreateCylinder (space,radius,length); } | |
| | | | |
| void create (dSpaceID space, dReal radius, dReal length) { | | void create (dSpaceID space, dReal radius, dReal length) { | |
| if (_id) dGeomDestroy (_id); | | if (_id) dGeomDestroy (_id); | |
| _id = dCreateCylinder (space,radius,length); | | _id = dCreateCylinder (space,radius,length); | |
| } | | } | |
| | | | |
| void setParams (dReal radius, dReal length) | | void setParams (dReal radius, dReal length) | |
| { dGeomCylinderSetParams (_id, radius, length); } | | { dGeomCylinderSetParams (_id, radius, length); } | |
| | | | |
| skipping to change at line 296 | | skipping to change at line 329 | |
| { dGeomCylinderGetParams (_id,radius,length); } | | { dGeomCylinderGetParams (_id,radius,length); } | |
| }; | | }; | |
| | | | |
| class dRay : public dGeom { | | class dRay : public dGeom { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dRay (dRay &); | | dRay (dRay &); | |
| void operator= (dRay &); | | void operator= (dRay &); | |
| | | | |
| public: | | public: | |
| dRay() { } | | dRay() { } | |
|
| | | dRay (dReal length) | |
| | | { _id = dCreateRay (0,length); } | |
| | | dRay (dSpace &space, dReal length) | |
| | | { _id = dCreateRay (space.id(),length); } | |
| dRay (dSpaceID space, dReal length) | | dRay (dSpaceID space, dReal length) | |
| { _id = dCreateRay (space,length); } | | { _id = dCreateRay (space,length); } | |
| | | | |
| void create (dSpaceID space, dReal length) { | | void create (dSpaceID space, dReal length) { | |
| if (_id) dGeomDestroy (_id); | | if (_id) dGeomDestroy (_id); | |
| _id = dCreateRay (space,length); | | _id = dCreateRay (space,length); | |
| } | | } | |
| | | | |
| void setLength (dReal length) | | void setLength (dReal length) | |
| { dGeomRaySetLength (_id, length); } | | { dGeomRaySetLength (_id, length); } | |
| | | | |
| skipping to change at line 331 | | skipping to change at line 368 | |
| { return dGeomRayGetClosestHit (_id); } | | { return dGeomRayGetClosestHit (_id); } | |
| }; | | }; | |
| | | | |
| class dGeomTransform : public dGeom { | | class dGeomTransform : public dGeom { | |
| // intentionally undefined, don't use these | | // intentionally undefined, don't use these | |
| dGeomTransform (dGeomTransform &); | | dGeomTransform (dGeomTransform &); | |
| void operator= (dGeomTransform &); | | void operator= (dGeomTransform &); | |
| | | | |
| public: | | public: | |
| dGeomTransform() { } | | dGeomTransform() { } | |
|
| | | dGeomTransform (dSpace &space) | |
| | | { _id = dCreateGeomTransform (space.id()); } | |
| dGeomTransform (dSpaceID space) | | dGeomTransform (dSpaceID space) | |
| { _id = dCreateGeomTransform (space); } | | { _id = dCreateGeomTransform (space); } | |
| | | | |
| void create (dSpaceID space=0) { | | void create (dSpaceID space=0) { | |
| if (_id) dGeomDestroy (_id); | | if (_id) dGeomDestroy (_id); | |
| _id = dCreateGeomTransform (space); | | _id = dCreateGeomTransform (space); | |
| } | | } | |
| | | | |
| void setGeom (dGeomID geom) | | void setGeom (dGeomID geom) | |
| { dGeomTransformSetGeom (_id, geom); } | | { dGeomTransformSetGeom (_id, geom); } | |
| | | | |
End of changes. 13 change blocks. |
| 3 lines changed or deleted | | 44 lines changed or added | |
|