ODE  0.13.1
 All Data Structures Functions Variables Typedefs Enumerations Groups
Joints

Functions

dJointID dJointCreateBall (dWorldID, dJointGroupID)
 Create a new joint of the ball type. More...
 
dJointID dJointCreateHinge (dWorldID, dJointGroupID)
 Create a new joint of the hinge type. More...
 
dJointID dJointCreateSlider (dWorldID, dJointGroupID)
 Create a new joint of the slider type. More...
 
dJointID dJointCreateContact (dWorldID, dJointGroupID, const dContact *)
 Create a new joint of the contact type. More...
 
dJointID dJointCreateHinge2 (dWorldID, dJointGroupID)
 Create a new joint of the hinge2 type. More...
 
dJointID dJointCreateUniversal (dWorldID, dJointGroupID)
 Create a new joint of the universal type. More...
 
dJointID dJointCreatePR (dWorldID, dJointGroupID)
 Create a new joint of the PR (Prismatic and Rotoide) type. More...
 
dJointID dJointCreatePU (dWorldID, dJointGroupID)
 Create a new joint of the PU (Prismatic and Universal) type. More...
 
dJointID dJointCreatePiston (dWorldID, dJointGroupID)
 Create a new joint of the Piston type. More...
 
dJointID dJointCreateFixed (dWorldID, dJointGroupID)
 Create a new joint of the fixed type. More...
 
dJointID dJointCreateAMotor (dWorldID, dJointGroupID)
 Create a new joint of the A-motor type. More...
 
dJointID dJointCreateLMotor (dWorldID, dJointGroupID)
 Create a new joint of the L-motor type. More...
 
dJointID dJointCreatePlane2D (dWorldID, dJointGroupID)
 Create a new joint of the plane-2d type. More...
 
dJointID dJointCreateDBall (dWorldID, dJointGroupID)
 Create a new joint of the double ball type. More...
 
dJointID dJointCreateDHinge (dWorldID, dJointGroupID)
 Create a new joint of the double hinge type. More...
 
dJointID dJointCreateTransmission (dWorldID, dJointGroupID)
 Create a new joint of the Transmission type. More...
 
void dJointDestroy (dJointID)
 Destroy a joint.disconnects it from its attached bodies and removing it from the world. However, if the joint is a member of a group then this function has no effect - to destroy that joint the group must be emptied or destroyed.
 
dJointGroupID dJointGroupCreate (int max_size)
 Create a joint group. More...
 
void dJointGroupDestroy (dJointGroupID)
 Destroy a joint group.All joints in the joint group will be destroyed.
 
void dJointGroupEmpty (dJointGroupID)
 Empty a joint group.All joints in the joint group will be destroyed, but the joint group itself will not be destroyed.
 
int dJointGetNumBodies (dJointID)
 Return the number of bodies attached to the joint.
 
void dJointAttach (dJointID, dBodyID body1, dBodyID body2)
 Attach the joint to some new bodies.If the joint is already attached, it will be detached from the old bodies first. To attach this joint to only one body, set body1 or body2 to zero - a zero body refers to the static environment. Setting both bodies to zero puts the joint into "limbo", i.e. it will have no effect on the simulation. More...
 
void dJointEnable (dJointID)
 Manually enable a joint. More...
 
void dJointDisable (dJointID)
 Manually disable a joint. More...
 
int dJointIsEnabled (dJointID)
 Check wether a joint is enabled. More...
 
void dJointSetData (dJointID, void *data)
 Set the user-data pointer.
 
void * dJointGetData (dJointID)
 Get the user-data pointer.
 
dJointType dJointGetType (dJointID)
 Get the type of the joint. More...
 
dBodyID dJointGetBody (dJointID, int index)
 Return the bodies that this joint connects. More...
 
void dJointSetFeedback (dJointID, dJointFeedback *)
 Sets the datastructure that is to receive the feedback. More...
 
dJointFeedbackdJointGetFeedback (dJointID)
 Gets the datastructure that is to receive the feedback.
 
void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z)
 Set the joint anchor point.The joint will try to keep this point on each body together. The input is specified in world coordinates.
 
void dJointSetBallAnchor2 (dJointID, dReal x, dReal y, dReal z)
 Set the joint anchor point.
 
void dJointSetBallParam (dJointID, int parameter, dReal value)
 Param setting for Ball joints.
 
void dJointSetHingeAnchor (dJointID, dReal x, dReal y, dReal z)
 Set hinge anchor parameter.
 
void dJointSetHingeAxis (dJointID, dReal x, dReal y, dReal z)
 Set hinge axis.
 
void dJointSetHingeAxisOffset (dJointID j, dReal x, dReal y, dReal z, dReal angle)
 Set the Hinge axis as if the 2 bodies were already at angle appart.This function initialize the Axis and the relative orientation of each body as if body1 was rotated around the axis by the angle value. Ex: More...
 
void dJointSetHingeParam (dJointID, int parameter, dReal value)
 set joint parameter
 
void dJointAddHingeTorque (dJointID joint, dReal torque)
 Applies the torque about the hinge axis. More...
 
void dJointSetSliderAxis (dJointID, dReal x, dReal y, dReal z)
 set the joint axis
 
void dJointSetSliderAxisDelta (dJointID, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az)
 
void dJointSetSliderParam (dJointID, int parameter, dReal value)
 set joint parameter
 
void dJointAddSliderForce (dJointID joint, dReal force)
 Applies the given force in the slider's direction. More...
 
void dJointSetHinge2Anchor (dJointID, dReal x, dReal y, dReal z)
 set anchor
 
void dJointSetHinge2Axis1 (dJointID, dReal x, dReal y, dReal z)
 set axis
 
void dJointSetHinge2Axis2 (dJointID, dReal x, dReal y, dReal z)
 set axis
 
void dJointSetHinge2Param (dJointID, int parameter, dReal value)
 set joint parameter
 
void dJointAddHinge2Torques (dJointID joint, dReal torque1, dReal torque2)
 Applies torque1 about the hinge2's axis 1, torque2 about the hinge2's axis 2. More...
 
void dJointSetUniversalAnchor (dJointID, dReal x, dReal y, dReal z)
 set anchor
 
void dJointSetUniversalAxis1 (dJointID, dReal x, dReal y, dReal z)
 set axis
 
void dJointSetUniversalAxis1Offset (dJointID, dReal x, dReal y, dReal z, dReal offset1, dReal offset2)
 Set the Universal axis1 as if the 2 bodies were already at offset1 and offset2 appart with respect to axis1 and axis2.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. Ex: More...
 
void dJointSetUniversalAxis2 (dJointID, dReal x, dReal y, dReal z)
 set axis
 
void dJointSetUniversalAxis2Offset (dJointID, dReal x, dReal y, dReal z, dReal offset1, dReal offset2)
 Set the Universal axis2 as if the 2 bodies were already at offset1 and offset2 appart with respect to axis1 and axis2.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. Ex: More...
 
void dJointSetUniversalParam (dJointID, int parameter, dReal value)
 set joint parameter
 
void dJointAddUniversalTorques (dJointID joint, dReal torque1, dReal torque2)
 Applies torque1 about the universal's axis 1, torque2 about the universal's axis 2. More...
 
void dJointSetPRAnchor (dJointID, dReal x, dReal y, dReal z)
 set anchor
 
void dJointSetPRAxis1 (dJointID, dReal x, dReal y, dReal z)
 set the axis for the prismatic articulation
 
void dJointSetPRAxis2 (dJointID, dReal x, dReal y, dReal z)
 set the axis for the rotoide articulation
 
void dJointSetPRParam (dJointID, int parameter, dReal value)
 set joint parameter More...
 
void dJointAddPRTorque (dJointID j, dReal torque)
 Applies the torque about the rotoide axis of the PR joint. More...
 
void dJointSetPUAnchor (dJointID, dReal x, dReal y, dReal z)
 set anchor
 
ODE_API_DEPRECATED void dJointSetPUAnchorDelta (dJointID, dReal x, dReal y, dReal z, dReal dx, dReal dy, dReal dz)
 set anchor
 
void dJointSetPUAnchorOffset (dJointID, dReal x, dReal y, dReal z, dReal dx, dReal dy, dReal dz)
 Set the PU anchor as if the 2 bodies were already at [dx, dy, dz] appart.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 position - [dx,dy,dy] when the axis is set). Ex: More...
 
void dJointSetPUAxis1 (dJointID, dReal x, dReal y, dReal z)
 set the axis for the first axis or the universal articulation
 
void dJointSetPUAxis2 (dJointID, dReal x, dReal y, dReal z)
 set the axis for the second axis or the universal articulation
 
void dJointSetPUAxis3 (dJointID, dReal x, dReal y, dReal z)
 set the axis for the prismatic articulation
 
void dJointSetPUAxisP (dJointID id, dReal x, dReal y, dReal z)
 set the axis for the prismatic articulation More...
 
void dJointSetPUParam (dJointID, int parameter, dReal value)
 set joint parameter More...
 
void dJointAddPUTorque (dJointID j, dReal torque)
 Applies the torque about the rotoide axis of the PU joint. More...
 
void dJointSetPistonAnchor (dJointID, dReal x, dReal y, dReal z)
 set the joint anchor
 
void dJointSetPistonAnchorOffset (dJointID j, dReal x, dReal y, dReal z, dReal dx, dReal dy, dReal dz)
 Set the Piston anchor as if the 2 bodies were already at [dx,dy, dz] appart.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 position - [dx,dy,dy] when the axis is set). Ex: More...
 
void dJointSetPistonAxis (dJointID, dReal x, dReal y, dReal z)
 set the joint axis
 
ODE_API_DEPRECATED void dJointSetPistonAxisDelta (dJointID j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az)
 
void dJointSetPistonParam (dJointID, int parameter, dReal value)
 set joint parameter
 
void dJointAddPistonForce (dJointID joint, dReal force)
 Applies the given force in the slider's direction. More...
 
void dJointSetFixed (dJointID)
 Call this on the fixed joint after it has been attached to remember the current desired relative offset and desired relative rotation between the bodies.
 
void dJointSetAMotorNumAxes (dJointID, int num)
 set the nr of axes More...
 
void dJointSetAMotorAxis (dJointID, int anum, int rel, dReal x, dReal y, dReal z)
 set axis
 
void dJointSetAMotorAngle (dJointID, int anum, dReal angle)
 Tell the AMotor what the current angle is along axis anum. More...
 
void dJointSetAMotorParam (dJointID, int parameter, dReal value)
 set joint parameter
 
void dJointSetAMotorMode (dJointID, int mode)
 set mode
 
void dJointAddAMotorTorques (dJointID, dReal torque1, dReal torque2, dReal torque3)
 Applies torque0 about the AMotor's axis 0, torque1 about the AMotor's axis 1, and torque2 about the AMotor's axis 2. More...
 
void dJointSetLMotorNumAxes (dJointID, int num)
 Set the number of axes that will be controlled by the LMotor. More...
 
void dJointSetLMotorAxis (dJointID, int anum, int rel, dReal x, dReal y, dReal z)
 Set the AMotor axes. More...
 
void dJointSetLMotorParam (dJointID, int parameter, dReal value)
 set joint parameter
 
void dJointSetPlane2DXParam (dJointID, int parameter, dReal value)
 
void dJointSetPlane2DYParam (dJointID, int parameter, dReal value)
 
void dJointSetPlane2DAngleParam (dJointID, int parameter, dReal value)
 
dReal dJointGetBallParam (dJointID, int parameter)
 get joint parameter
 
void dJointGetHingeAnchor (dJointID, dVector3 result)
 Get the hinge anchor point, in world coordinates. More...
 
void dJointGetHingeAnchor2 (dJointID, dVector3 result)
 Get the joint anchor point, in world coordinates. More...
 
void dJointGetHingeAxis (dJointID, dVector3 result)
 get axis
 
dReal dJointGetHingeParam (dJointID, int parameter)
 get joint parameter
 
dReal dJointGetHingeAngle (dJointID)
 Get the hinge angle. More...
 
dReal dJointGetHingeAngleRate (dJointID)
 Get the hinge angle time derivative.
 
dReal dJointGetSliderPosition (dJointID)
 Get the slider linear position (i.e. the slider's extension) More...
 
dReal dJointGetSliderPositionRate (dJointID)
 Get the slider linear position's time derivative.
 
void dJointGetSliderAxis (dJointID, dVector3 result)
 Get the slider axis.
 
dReal dJointGetSliderParam (dJointID, int parameter)
 get joint parameter
 
void dJointGetHinge2Anchor (dJointID, dVector3 result)
 Get the joint anchor point, in world coordinates. More...
 
void dJointGetHinge2Anchor2 (dJointID, dVector3 result)
 Get the joint anchor point, in world coordinates. This returns the point on body 2. If the joint is perfectly satisfied, this will return the same value as dJointGetHinge2Anchor. If not, this value will be slightly different. This can be used, for example, to see how far the joint has come apart.
 
void dJointGetHinge2Axis1 (dJointID, dVector3 result)
 Get joint axis.
 
void dJointGetHinge2Axis2 (dJointID, dVector3 result)
 Get joint axis.
 
dReal dJointGetHinge2Param (dJointID, int parameter)
 get joint parameter
 
dReal dJointGetHinge2Angle1 (dJointID)
 Get angle.
 
dReal dJointGetHinge2Angle2 (dJointID)
 Get angle.
 
dReal dJointGetHinge2Angle1Rate (dJointID)
 Get time derivative of angle.
 
dReal dJointGetHinge2Angle2Rate (dJointID)
 Get time derivative of angle.
 
void dJointGetUniversalAnchor (dJointID, dVector3 result)
 Get the joint anchor point, in world coordinates. More...
 
void dJointGetUniversalAnchor2 (dJointID, dVector3 result)
 Get the joint anchor point, in world coordinates. More...
 
void dJointGetUniversalAxis1 (dJointID, dVector3 result)
 Get axis.
 
void dJointGetUniversalAxis2 (dJointID, dVector3 result)
 Get axis.
 
dReal dJointGetUniversalParam (dJointID, int parameter)
 get joint parameter
 
void dJointGetUniversalAngles (dJointID, dReal *angle1, dReal *angle2)
 Get both angles at the same time. More...
 
dReal dJointGetUniversalAngle1 (dJointID)
 Get angle.
 
dReal dJointGetUniversalAngle2 (dJointID)
 Get angle.
 
dReal dJointGetUniversalAngle1Rate (dJointID)
 Get time derivative of angle.
 
dReal dJointGetUniversalAngle2Rate (dJointID)
 Get time derivative of angle.
 
void dJointGetPRAnchor (dJointID, dVector3 result)
 Get the joint anchor point, in world coordinates. More...
 
dReal dJointGetPRPosition (dJointID)
 Get the PR linear position (i.e. the prismatic's extension) More...
 
dReal dJointGetPRPositionRate (dJointID)
 Get the PR linear position's time derivative.
 
dReal dJointGetPRAngle (dJointID)
 Get the PR angular position (i.e. the twist between the 2 bodies) More...
 
dReal dJointGetPRAngleRate (dJointID)
 Get the PR angular position's time derivative.
 
void dJointGetPRAxis1 (dJointID, dVector3 result)
 Get the prismatic axis.
 
void dJointGetPRAxis2 (dJointID, dVector3 result)
 Get the Rotoide axis.
 
dReal dJointGetPRParam (dJointID, int parameter)
 get joint parameter
 
void dJointGetPUAnchor (dJointID, dVector3 result)
 Get the joint anchor point, in world coordinates. More...
 
dReal dJointGetPUPosition (dJointID)
 Get the PU linear position (i.e. the prismatic's extension) More...
 
dReal dJointGetPUPositionRate (dJointID)
 Get the PR linear position's time derivative.
 
void dJointGetPUAxis1 (dJointID, dVector3 result)
 Get the first axis of the universal component of the joint.
 
void dJointGetPUAxis2 (dJointID, dVector3 result)
 Get the second axis of the Universal component of the joint.
 
void dJointGetPUAxis3 (dJointID, dVector3 result)
 Get the prismatic axis.
 
void dJointGetPUAxisP (dJointID id, dVector3 result)
 Get the prismatic axis. More...
 
void dJointGetPUAngles (dJointID, dReal *angle1, dReal *angle2)
 Get both angles at the same time. More...
 
dReal dJointGetPUAngle1 (dJointID)
 Get angle.
 
dReal dJointGetPUAngle1Rate (dJointID)
 
More...
 
dReal dJointGetPUAngle2 (dJointID)
 Get angle.
 
dReal dJointGetPUAngle2Rate (dJointID)
 
More...
 
dReal dJointGetPUParam (dJointID, int parameter)
 get joint parameter
 
dReal dJointGetPistonPosition (dJointID)
 Get the Piston linear position (i.e. the piston's extension) More...
 
dReal dJointGetPistonPositionRate (dJointID)
 Get the piston linear position's time derivative.
 
dReal dJointGetPistonAngle (dJointID)
 Get the Piston angular position (i.e. the twist between the 2 bodies) More...
 
dReal dJointGetPistonAngleRate (dJointID)
 Get the piston angular position's time derivative.
 
void dJointGetPistonAnchor (dJointID, dVector3 result)
 Get the joint anchor. More...
 
void dJointGetPistonAnchor2 (dJointID, dVector3 result)
 Get the joint anchor w.r.t. body 2. More...
 
void dJointGetPistonAxis (dJointID, dVector3 result)
 Get the prismatic axis (This is also the rotoide axis.
 
dReal dJointGetPistonParam (dJointID, int parameter)
 get joint parameter
 
int dJointGetAMotorNumAxes (dJointID)
 Get the number of angular axes that will be controlled by the AMotor. More...
 
void dJointGetAMotorAxis (dJointID, int anum, dVector3 result)
 Get the AMotor axes. More...
 
int dJointGetAMotorAxisRel (dJointID, int anum)
 Get axis. More...
 
dReal dJointGetAMotorAngle (dJointID, int anum)
 Get the current angle for axis. More...
 
dReal dJointGetAMotorAngleRate (dJointID, int anum)
 Get the current angle rate for axis anum. More...
 
dReal dJointGetAMotorParam (dJointID, int parameter)
 get joint parameter
 
int dJointGetAMotorMode (dJointID)
 Get the angular motor mode. More...
 
int dJointGetLMotorNumAxes (dJointID)
 Get nr of axes.
 
void dJointGetLMotorAxis (dJointID, int anum, dVector3 result)
 Get axis.
 
dReal dJointGetLMotorParam (dJointID, int parameter)
 get joint parameter
 
dReal dJointGetFixedParam (dJointID, int parameter)
 get joint parameter
 
void dJointGetTransmissionContactPoint1 (dJointID, dVector3 result)
 get the contact point of the first wheel of the Transmission joint.
 
void dJointGetTransmissionContactPoint2 (dJointID, dVector3 result)
 get contact point of the second wheel of the Transmission joint.
 
void dJointSetTransmissionAxis1 (dJointID, dReal x, dReal y, dReal z)
 set the first axis for the Transmission joint More...
 
void dJointGetTransmissionAxis1 (dJointID, dVector3 result)
 get first axis for the Transmission joint More...
 
void dJointSetTransmissionAxis2 (dJointID, dReal x, dReal y, dReal z)
 set second axis for the Transmission joint More...
 
void dJointGetTransmissionAxis2 (dJointID, dVector3 result)
 get second axis for the Transmission joint More...
 
void dJointSetTransmissionAnchor1 (dJointID, dReal x, dReal y, dReal z)
 set the first anchor for the Transmission joint More...
 
void dJointGetTransmissionAnchor1 (dJointID, dVector3 result)
 get the first anchor of the Transmission joint
 
void dJointSetTransmissionAnchor2 (dJointID, dReal x, dReal y, dReal z)
 set the second anchor for the Transmission joint More...
 
void dJointGetTransmissionAnchor2 (dJointID, dVector3 result)
 get the second anchor for the Transmission joint
 
void dJointSetTransmissionParam (dJointID, int parameter, dReal value)
 set a Transmission joint parameter
 
dReal dJointGetTransmissionParam (dJointID, int parameter)
 get a Transmission joint parameter
 
void dJointSetTransmissionMode (dJointID j, int mode)
 set the Transmission joint mode More...
 
int dJointGetTransmissionMode (dJointID j)
 get the Transmission joint mode
 
void dJointSetTransmissionRatio (dJointID j, dReal ratio)
 set the Transmission ratio More...
 
dReal dJointGetTransmissionRatio (dJointID j)
 get the Transmission joint ratio
 
void dJointSetTransmissionAxis (dJointID j, dReal x, dReal y, dReal z)
 set the common axis for both wheels of the Transmission joint More...
 
void dJointGetTransmissionAxis (dJointID j, dVector3 result)
 get the common axis for both wheels of the Transmission joint
 
dReal dJointGetTransmissionAngle1 (dJointID j)
 get the phase, that is the traversed angle for the first wheel of the Transmission joint
 
dReal dJointGetTransmissionAngle2 (dJointID j)
 get the phase, that is the traversed angle for the second wheel of the Transmission joint
 
dReal dJointGetTransmissionRadius1 (dJointID j)
 get the radius of the first wheel of the Transmission joint
 
dReal dJointGetTransmissionRadius2 (dJointID j)
 get the radius of the second wheel of the Transmission joint
 
void dJointSetTransmissionRadius1 (dJointID j, dReal radius)
 set the radius of the first wheel of the Transmission joint More...
 
void dJointSetTransmissionRadius2 (dJointID j, dReal radius)
 set the radius of the second wheel of the Transmission joint More...
 
dReal dJointGetTransmissionBacklash (dJointID j)
 get the backlash of the Transmission joint
 
void dJointSetTransmissionBacklash (dJointID j, dReal backlash)
 set the backlash of the Transmission joint More...
 
void dJointSetDBallAnchor1 (dJointID, dReal x, dReal y, dReal z)
 set anchor1 for double ball joint
 
void dJointSetDBallAnchor2 (dJointID, dReal x, dReal y, dReal z)
 set anchor2 for double ball joint
 
void dJointGetDBallAnchor1 (dJointID, dVector3 result)
 get anchor1 from double ball joint
 
void dJointGetDBallAnchor2 (dJointID, dVector3 result)
 get anchor2 from double ball joint
 
dReal dJointGetDBallDistance (dJointID)
 get the set distance from double ball joint
 
void dJointSetDBallParam (dJointID, int parameter, dReal value)
 set double ball joint parameter
 
dReal dJointGetDBallParam (dJointID, int parameter)
 get double ball joint parameter
 
void dJointSetDHingeAxis (dJointID, dReal x, dReal y, dReal z)
 set axis for double hinge joint
 
void dJointGetDHingeAxis (dJointID, dVector3 result)
 get axis for double hinge joint
 
void dJointSetDHingeAnchor1 (dJointID, dReal x, dReal y, dReal z)
 set anchor1 for double hinge joint
 
void dJointSetDHingeAnchor2 (dJointID, dReal x, dReal y, dReal z)
 set anchor2 for double hinge joint
 
void dJointGetDHingeAnchor1 (dJointID, dVector3 result)
 get anchor1 from double hinge joint
 
void dJointGetDHingeAnchor2 (dJointID, dVector3 result)
 get anchor2 from double hinge joint
 
dReal dJointGetDHingeDistance (dJointID)
 get the set distance from double hinge joint
 
void dJointSetDHingeParam (dJointID, int parameter, dReal value)
 set double hinge joint parameter
 
dReal dJointGetDHingeParam (dJointID, int parameter)
 get double hinge joint parameter
 
dJointID dConnectingJoint (dBodyID, dBodyID)
 
int dConnectingJointList (dBodyID, dBodyID, dJointID *)
 
int dAreConnected (dBodyID, dBodyID)
 Utility function. More...
 
int dAreConnectedExcluding (dBodyID body1, dBodyID body2, int joint_type)
 Utility function. More...
 

Detailed Description

In real life a joint is something like a hinge, that is used to connect two objects. In ODE a joint is very similar: It is a relationship that is enforced between two bodies so that they can only have certain positions and orientations relative to each other. This relationship is called a constraint – the words joint and constraint are often used interchangeably.

A joint has a set of parameters that can be set. These include:

If a particular parameter is not implemented by a given joint, setting it will have no effect. These parameter names can be optionally followed by a digit (2 or 3) to indicate the second or third set of parameters, e.g. for the second axis in a hinge-2 joint, or the third axis in an AMotor joint.

Function Documentation

int dAreConnected ( dBodyID  ,
dBodyID   
)

Utility function.

Returns
1 if the two bodies are connected together by a joint, otherwise return 0.
int dAreConnectedExcluding ( dBodyID  body1,
dBodyID  body2,
int  joint_type 
)

Utility function.

Returns
1 if the two bodies are connected together by a joint that does not have type
  • {joint_type}, otherwise return 0.
Parameters
body1A body to check.
body2A body to check.
joint_typeis a dJointTypeXXX constant. This is useful for deciding whether to add contact joints between two bodies: if they are already connected by non-contact joints then it may not be appropriate to add contacts, however it is okay to add more contact between- bodies that already have contacts.
void dJointAddAMotorTorques ( dJointID  ,
dReal  torque1,
dReal  torque2,
dReal  torque3 
)

Applies torque0 about the AMotor's axis 0, torque1 about the AMotor's axis 1, and torque2 about the AMotor's axis 2.

Remarks
If the motor has fewer than three axes, the higher torques are ignored. This function is just a wrapper for dBodyAddTorque().
void dJointAddHinge2Torques ( dJointID  joint,
dReal  torque1,
dReal  torque2 
)

Applies torque1 about the hinge2's axis 1, torque2 about the hinge2's axis 2.

Remarks
This function is just a wrapper for dBodyAddTorque().
void dJointAddHingeTorque ( dJointID  joint,
dReal  torque 
)

Applies the torque about the hinge axis.

That is, it applies a torque with specified magnitude in the direction of the hinge axis, to body 1, and with the same magnitude but in opposite direction to body 2. This function is just a wrapper for dBodyAddTorque()}

void dJointAddPistonForce ( dJointID  joint,
dReal  force 
)

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().

void dJointAddPRTorque ( dJointID  j,
dReal  torque 
)

Applies the torque about the rotoide axis of the PR 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 opposite direction to body 2. This function is just a wrapper for dBodyAddTorque()}

void dJointAddPUTorque ( dJointID  j,
dReal  torque 
)

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 opposite direction to body 2. This function is just a wrapper for dBodyAddTorque()}

void dJointAddSliderForce ( dJointID  joint,
dReal  force 
)

Applies the given force in the slider's direction.

That is, it applies a force with specified magnitude, in the direction of slider's axis, to body1, and with the same magnitude but opposite direction to body2. This function is just a wrapper for dBodyAddForce().

void dJointAddUniversalTorques ( dJointID  joint,
dReal  torque1,
dReal  torque2 
)

Applies torque1 about the universal's axis 1, torque2 about the universal's axis 2.

Remarks
This function is just a wrapper for dBodyAddTorque().
void dJointAttach ( dJointID  ,
dBodyID  body1,
dBodyID  body2 
)

Attach the joint to some new bodies.If the joint is already attached, it will be detached from the old bodies first. To attach this joint to only one body, set body1 or body2 to zero - a zero body refers to the static environment. Setting both bodies to zero puts the joint into "limbo", i.e. it will have no effect on the simulation.

Remarks
Some joints, like hinge-2 need to be attached to two bodies to work.
dJointID dJointCreateAMotor ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the A-motor type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreateBall ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the ball type.

Remarks
The joint is initially in "limbo" (i.e. it has no effect on the simulation) because it does not connect to any bodies.
Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreateContact ( dWorldID  ,
dJointGroupID  ,
const dContact  
)

Create a new joint of the contact type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreateDBall ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the double ball type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreateDHinge ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the double hinge type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreateFixed ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the fixed type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreateHinge ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the hinge type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreateHinge2 ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the hinge2 type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreateLMotor ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the L-motor type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreatePiston ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the Piston type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreatePlane2D ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the plane-2d type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreatePR ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the PR (Prismatic and Rotoide) type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreatePU ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the PU (Prismatic and Universal) type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreateSlider ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the slider type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreateTransmission ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the Transmission type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
dJointID dJointCreateUniversal ( dWorldID  ,
dJointGroupID   
)

Create a new joint of the universal type.

Parameters
dJointGroupIDset to 0 to allocate the joint normally. If it is nonzero the joint is allocated in the given joint group.
void dJointDisable ( dJointID  )

Manually disable a joint.

Remarks
A disabled joint will not affect the simulation, but will maintain the anchors and axes so it can be enabled later.
void dJointEnable ( dJointID  )

Manually enable a joint.

Parameters
dJointIDidentification of joint.
dReal dJointGetAMotorAngle ( dJointID  ,
int  anum 
)

Get the current angle for axis.

Remarks
In dAMotorUser mode this is simply the value that was set with dJointSetAMotorAngle(). In dAMotorEuler mode this is the corresponding euler angle.
dReal dJointGetAMotorAngleRate ( dJointID  ,
int  anum 
)

Get the current angle rate for axis anum.

Remarks
In dAMotorUser mode this is always zero, as not enough information is available. In dAMotorEuler mode this is the corresponding euler angle rate.
void dJointGetAMotorAxis ( dJointID  ,
int  anum,
dVector3  result 
)

Get the AMotor axes.

Parameters
anumselects the axis to change (0,1 or 2).
relEach axis can have one of three ``relative orientation'' modes.
  • 0: The axis is anchored to the global frame.
  • 1: The axis is anchored to the first body.
  • 2: The axis is anchored to the second body.
int dJointGetAMotorAxisRel ( dJointID  ,
int  anum 
)

Get axis.

Remarks
The axis vector is always specified in global coordinates regardless of the setting of rel. There are two GetAMotorAxis functions, one to return the axis and one to return the relative mode.

For dAMotorEuler mode:

  • Only axes 0 and 2 need to be set. Axis 1 will be determined automatically at each time step.
  • Axes 0 and 2 must be perpendicular to each other.
  • Axis 0 must be anchored to the first body, axis 2 must be anchored to the second body.
int dJointGetAMotorMode ( dJointID  )

Get the angular motor mode.

Parameters
modemust be one of the following constants:
  • dAMotorUser The AMotor axes and joint angle settings are entirely controlled by the user. This is the default mode.
  • dAMotorEuler Euler angles are automatically computed. The axis a1 is also automatically computed. The AMotor axes must be set correctly when in this mode, as described below. When this mode is initially set the current relative orientations of the bodies will correspond to all euler angles at zero.
int dJointGetAMotorNumAxes ( dJointID  )

Get the number of angular axes that will be controlled by the AMotor.

Parameters
numcan range from 0 (which effectively deactivates the joint) to 3. This is automatically set to 3 in dAMotorEuler mode.
dBodyID dJointGetBody ( dJointID  ,
int  index 
)

Return the bodies that this joint connects.

Parameters
indexreturn the first (0) or second (1) body.
Remarks
If one of these returned body IDs is zero, the joint connects the other body to the static environment. If both body IDs are zero, the joint is in ``limbo'' and has no effect on the simulation.
void dJointGetHinge2Anchor ( dJointID  ,
dVector3  result 
)

Get the joint anchor point, in world coordinates.

Returns
the point on body 1. If the joint is perfectly satisfied, this will be the same as the point on body 2.
void dJointGetHingeAnchor ( dJointID  ,
dVector3  result 
)

Get the hinge anchor point, in world coordinates.

This returns the point on body 1. If the joint is perfectly satisfied, this will be the same as the point on body 2.

void dJointGetHingeAnchor2 ( dJointID  ,
dVector3  result 
)

Get the joint anchor point, in world coordinates.

Returns
The point on body 2. If the joint is perfectly satisfied, this will return the same value as dJointGetHingeAnchor(). If not, this value will be slightly different. This can be used, for example, to see how far the joint has come apart.
dReal dJointGetHingeAngle ( dJointID  )

Get the hinge angle.

The angle is measured between the two bodies, or between the body and the static environment. The angle will be between -pi..pi. Give the relative rotation with respect to the Hinge axis of Body 1 with respect to Body 2. When the hinge anchor or axis is set, the current position of the attached bodies is examined and that position will be the zero angle.

void dJointGetPistonAnchor ( dJointID  ,
dVector3  result 
)

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 perpendicular to the prismatic axis.

void dJointGetPistonAnchor2 ( dJointID  ,
dVector3  result 
)

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 the 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 with dJointGetPistonAnchor(), to see how far the joint has come apart.

dReal dJointGetPistonAngle ( dJointID  )

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.

dReal dJointGetPistonPosition ( dJointID  )

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.

void dJointGetPRAnchor ( dJointID  ,
dVector3  result 
)

Get the joint anchor point, in world coordinates.

Returns
the point on body 1. If the joint is perfectly satisfied, this will be the same as the point on body 2.
dReal dJointGetPRAngle ( dJointID  )

Get the PR 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.

dReal dJointGetPRPosition ( dJointID  )

Get the PR 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 + anchor2)]

void dJointGetPUAnchor ( dJointID  ,
dVector3  result 
)

Get the joint anchor point, in world coordinates.

Returns
the point on body 1. If the joint is perfectly satisfied, this will be the same as the point on body 2.
dReal dJointGetPUAngle1Rate ( dJointID  )

Get time derivative of angle1

dReal dJointGetPUAngle2Rate ( dJointID  )

Get time derivative of angle2

void dJointGetPUAngles ( dJointID  ,
dReal *  angle1,
dReal *  angle2 
)

Get both angles at the same time.

Parameters
jointThe Prismatic universal joint for which we want to calculate the angles
angle1The angle between the body1 and the axis 1
angle2The angle between the body2 and the axis 2
Note
This function combine dJointGetPUAngle1 and dJointGetPUAngle2 together and try to avoid redundant calculation
void dJointGetPUAxisP ( dJointID  id,
dVector3  result 
)

Get the prismatic axis.

Note
This function was added for convenience it is the same as dJointGetPUAxis3
dReal dJointGetPUPosition ( dJointID  )

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 + anchor2)]

dReal dJointGetSliderPosition ( dJointID  )

Get the slider linear position (i.e. the slider'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 distance, with respect to the zero position, along the slider axis of body 1 with respect to body 2. (A NULL body is replaced by the world).

void dJointGetTransmissionAxis1 ( dJointID  ,
dVector3  result 
)

get first axis for the Transmission joint

Remarks
In parallel-axes and chain mode the common axis with respect to the first body is returned. If the joint constraint is satisfied it should be the same as the axis return with dJointGetTransmissionAxis2 or dJointGetTransmissionAxis.
void dJointGetTransmissionAxis2 ( dJointID  ,
dVector3  result 
)

get second axis for the Transmission joint

Remarks
In parallel-axes and chain mode the common axis with respect to the second body is returned. If the joint constraint is satisfied it should be the same as the axis return with dJointGetTransmissionAxis1 or dJointGetTransmissionAxis.
dJointType dJointGetType ( dJointID  )

Get the type of the joint.

Returns
the type, being one of these:
  • dJointTypeBall
  • dJointTypeHinge
  • dJointTypeSlider
  • dJointTypeContact
  • dJointTypeUniversal
  • dJointTypeHinge2
  • dJointTypeFixed
  • dJointTypeNull
  • dJointTypeAMotor
  • dJointTypeLMotor
  • dJointTypePlane2D
  • dJointTypePR
  • dJointTypePU
  • dJointTypePiston
void dJointGetUniversalAnchor ( dJointID  ,
dVector3  result 
)

Get the joint anchor point, in world coordinates.

Returns
the point on body 1. If the joint is perfectly satisfied, this will be the same as the point on body 2.
void dJointGetUniversalAnchor2 ( dJointID  ,
dVector3  result 
)

Get the joint anchor point, in world coordinates.

Returns
This returns the point on body 2.
Remarks
You can think of the ball and socket part of a universal joint as trying to keep the result of dJointGetBallAnchor() and dJointGetBallAnchor2() the same. If the joint is perfectly satisfied, this function will return the same value as dJointGetUniversalAnchor() to within roundoff errors. dJointGetUniversalAnchor2() can be used, along with dJointGetUniversalAnchor(), to see how far the joint has come apart.
void dJointGetUniversalAngles ( dJointID  ,
dReal *  angle1,
dReal *  angle2 
)

Get both angles at the same time.

Parameters
jointThe universal joint for which we want to calculate the angles
angle1The angle between the body1 and the axis 1
angle2The angle between the body2 and the axis 2
Note
This function combine getUniversalAngle1 and getUniversalAngle2 together and try to avoid redundant calculation
dJointGroupID dJointGroupCreate ( int  max_size)

Create a joint group.

Parameters
max_sizedeprecated. Set to 0.
int dJointIsEnabled ( dJointID  )

Check wether a joint is enabled.

Returns
1 if a joint is currently enabled or 0 if it is disabled.
void dJointSetAMotorAngle ( dJointID  ,
int  anum,
dReal  angle 
)

Tell the AMotor what the current angle is along axis anum.

This function should only be called in dAMotorUser mode, because in this mode the AMotor has no other way of knowing the joint angles. The angle information is needed if stops have been set along the axis, but it is not needed for axis motors.

void dJointSetAMotorNumAxes ( dJointID  ,
int  num 
)

set the nr of axes

Parameters
num0..3
void dJointSetFeedback ( dJointID  ,
dJointFeedback  
)

Sets the datastructure that is to receive the feedback.

The feedback can be used by the user, so that it is known how much force an individual joint exerts.

void dJointSetHingeAxisOffset ( dJointID  j,
dReal  x,
dReal  y,
dReal  z,
dReal  angle 
)

Set the Hinge axis as if the 2 bodies were already at angle appart.This function initialize the Axis and the relative orientation of each body as if body1 was rotated around the axis by the angle value. Ex:

dJointSetHingeAxis(jId, 1, 0, 0);
// If you request the position you will have: dJointGetHingeAngle(jId) == 0
dJointSetHingeAxisDelta(jId, 1, 0, 0, 0.23);
// If you request the position you will have: dJointGetHingeAngle(jId) == 0.23
Parameters
jThe Hinge joint ID for which the axis will be set
xThe X component of the axis in world frame
yThe Y component of the axis in world frame
zThe Z component of the axis in world frame
angleThe 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 of body1 and body2 as the zero angle position. This function set the current position as the if the 2 bodies where angle appart.
Warning
Calling dJointSetHingeAnchor or dJointSetHingeAxis will reset the "zero" angle position.
void dJointSetLMotorAxis ( dJointID  ,
int  anum,
int  rel,
dReal  x,
dReal  y,
dReal  z 
)

Set the AMotor axes.

Parameters
anumselects the axis to change (0,1 or 2).
relEach axis can have one of three ``relative orientation'' modes
  • 0: The axis is anchored to the global frame.
  • 1: The axis is anchored to the first body.
  • 2: The axis is anchored to the second body.
Remarks
The axis vector is always specified in global coordinates regardless of the setting of rel.
void dJointSetLMotorNumAxes ( dJointID  ,
int  num 
)

Set the number of axes that will be controlled by the LMotor.

Parameters
numcan range from 0 (which effectively deactivates the joint) to 3.
void dJointSetPistonAnchorOffset ( dJointID  j,
dReal  x,
dReal  y,
dReal  z,
dReal  dx,
dReal  dy,
dReal  dz 
)

Set the Piston anchor as if the 2 bodies were already at [dx,dy, dz] appart.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 position - [dx,dy,dy] when the axis is set). Ex:

dReal offset = 3;
dVector3 axis;
dJointGetPistonAxis(jId, axis);
dJointSetPistonAnchor(jId, 0, 0, 0);
// If you request the position you will have: dJointGetPistonPosition(jId) == 0
dJointSetPistonAnchorOffset(jId, 0, 0, 0, axis[X]*offset, axis[Y]*offset, axis[Z]*offset);
// If you request the position you will have: dJointGetPistonPosition(jId) == offset
Parameters
jThe Piston joint for which the anchor point will be set
xThe X position of the anchor point in world frame
yThe Y position of the anchor point in world frame
zThe Z position of the anchor point in world frame
dxA delta to be substracted to the X position as if the anchor was set when body1 was at current_position[X] - dx
dxA delta to be substracted to the Y position as if the anchor was set when body1 was at current_position[Y] - dy
dxA delta to be substracted to the Z position as if the anchor was set when body1 was at current_position[Z] - dz
ODE_API_DEPRECATED void dJointSetPistonAxisDelta ( dJointID  j,
dReal  x,
dReal  y,
dReal  z,
dReal  ax,
dReal  ay,
dReal  az 
)

This function set prismatic axis of the joint and also set the position of the joint.

Parameters
jThe joint affected by this function
xThe x component of the axis
yThe y component of the axis
zThe z component of the axis
dxThe Initial position of the prismatic join in the x direction
dyThe Initial position of the prismatic join in the y direction
dzThe Initial position of the prismatic join in the z direction
void dJointSetPRParam ( dJointID  ,
int  parameter,
dReal  value 
)

set joint parameter

Note
parameterX where X equal 2 refer to parameter for the rotoide articulation
void dJointSetPUAnchorOffset ( dJointID  ,
dReal  x,
dReal  y,
dReal  z,
dReal  dx,
dReal  dy,
dReal  dz 
)

Set the PU anchor as if the 2 bodies were already at [dx, dy, dz] appart.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 position - [dx,dy,dy] when the axis is set). Ex:

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
Parameters
jThe PU joint for which the anchor point will be set
xThe X position of the anchor point in world frame
yThe Y position of the anchor point in world frame
zThe Z position of the anchor point in world frame
dxA delta to be substracted to the X position as if the anchor was set when body1 was at current_position[X] - dx
dxA delta to be substracted to the Y position as if the anchor was set when body1 was at current_position[Y] - dy
dxA delta to be substracted to the Z position as if the anchor was set when body1 was at current_position[Z] - dz
void dJointSetPUAxisP ( dJointID  id,
dReal  x,
dReal  y,
dReal  z 
)

set the axis for the prismatic articulation

Note
This function was added for convenience it is the same as dJointSetPUAxis3
void dJointSetPUParam ( dJointID  ,
int  parameter,
dReal  value 
)

set joint parameter

Note
parameterX where X equal 2 refer to parameter for second axis of the universal articulation
parameterX where X equal 3 refer to parameter for prismatic articulation
void dJointSetTransmissionAnchor1 ( dJointID  ,
dReal  x,
dReal  y,
dReal  z 
)

set the first anchor for the Transmission joint

Remarks
This is the point of attachment of the wheel on the first body. It is given in global coordinates.
void dJointSetTransmissionAnchor2 ( dJointID  ,
dReal  x,
dReal  y,
dReal  z 
)

set the second anchor for the Transmission joint

Remarks
This is the point of attachment of the wheel on the second body. It is given in global coordinates.
void dJointSetTransmissionAxis ( dJointID  j,
dReal  x,
dReal  y,
dReal  z 
)

set the common axis for both wheels of the Transmission joint

Remarks
This sets the common axis of revolution for both wheels and should only be used in parallel-axes or chain mode. For intersecting-axes mode where each wheel axis needs to be specified individually dJointSetTransmissionAxis1 and dJointSetTransmissionAxis2 should be used. The axis is given in global coordinates
void dJointSetTransmissionAxis1 ( dJointID  ,
dReal  x,
dReal  y,
dReal  z 
)

set the first axis for the Transmission joint

Remarks
This is the axis around which the first body is allowed to revolve and is attached to it. It is given in global coordinates and can only be set explicitly in intersecting-axes mode. For the parallel-axes and chain modes which share one common axis of revolution for both gears dJointSetTransmissionAxis should be used.
void dJointSetTransmissionAxis2 ( dJointID  ,
dReal  x,
dReal  y,
dReal  z 
)

set second axis for the Transmission joint

Remarks
This is the axis around which the second body is allowed to revolve and is attached to it. It is given in global coordinates and can only be set explicitly in intersecting-axes mode. For the parallel-axes and chain modes which share one common axis of revolution for both gears dJointSetTransmissionAxis should be used.
void dJointSetTransmissionBacklash ( dJointID  j,
dReal  backlash 
)

set the backlash of the Transmission joint

Remarks
Backlash is the clearance in the mesh of the wheels of the transmission and is defined as the maximum distance that the geometric contact point can travel without any actual contact or transfer of power between the wheels. This can be converted in degrees of revolution for each wheel by dividing by the wheel's radius. To further illustrate this consider the situation where a wheel of radius r_1 is driving another wheel of radius r_2 and there is an amount of backlash equal to b in their mesh. If the driving wheel were to instantaneously stop there would be no contact and hence the driven wheel would continue to turn for another b / r_2 radians until all the backlash in the mesh was take up and contact restored with the relationship of driving and driven wheel reversed. The backlash is therefore given in untis of length.
void dJointSetTransmissionMode ( dJointID  j,
int  mode 
)

set the Transmission joint mode

Remarks
The mode can be one of dTransmissionParallelAxes, dTransmissionIntersectingAxes and dTransmissionChainDrive simulating a set of parallel-axes gears, intersecting-axes beveled gears or chain and sprockets respectively.
void dJointSetTransmissionRadius1 ( dJointID  j,
dReal  radius 
)

set the radius of the first wheel of the Transmission joint

Remarks
The wheel radii can only be set explicitly in chain mode. In the other modes they're defined implicitly by the initial configuration and ratio of the wheels.
void dJointSetTransmissionRadius2 ( dJointID  j,
dReal  radius 
)

set the radius of the second wheel of the Transmission joint

Remarks
The wheel radii can only be set explicitly in chain mode. In the other modes they're defined implicitly by the initial configuration and ratio of the wheels.
void dJointSetTransmissionRatio ( dJointID  j,
dReal  ratio 
)

set the Transmission ratio

Remarks
This is the ratio of the angular speed of the first gear to that of the second gear. It can only be set explicitly in parallel-axes mode. In intersecting-axes mode the ratio is defined implicitly by the initial configuration of the wheels and in chain mode it is defined implicitly be the wheel radii.
void dJointSetUniversalAxis1Offset ( dJointID  ,
dReal  x,
dReal  y,
dReal  z,
dReal  offset1,
dReal  offset2 
)

Set the Universal axis1 as if the 2 bodies were already at offset1 and offset2 appart with respect to axis1 and axis2.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. Ex:

 dJointSetHuniversalAxis1(jId, 1, 0, 0);
 // If you request the position you will have: dJointGetUniversalAngle1(jId) == 0
 // If you request the position you will have: dJointGetUniversalAngle2(jId) == 0
 dJointSetHuniversalAxis1Offset(jId, 1, 0, 0, 0.2, 0.17);
 // If you request the position you will have: dJointGetUniversalAngle1(jId) == 0.2
 // If you request the position you will have: dJointGetUniversalAngle2(jId) == 0.17
 
Parameters
jThe Hinge joint ID for which the axis will be set
xThe X component of the axis in world frame
yThe Y component of the axis in world frame
zThe Z component of the axis in world frame
angleThe 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 of body1 and body2 as the zero angle position. This function set the current position as the if the 2 bodies where offsets appart.
Any previous offsets are erased.
Warning
Calling dJointSetUniversalAnchor, dJointSetUnivesalAxis1, dJointSetUniversalAxis2, dJointSetUniversalAxis2Offset will reset the "zero" angle position.
void dJointSetUniversalAxis2Offset ( dJointID  ,
dReal  x,
dReal  y,
dReal  z,
dReal  offset1,
dReal  offset2 
)

Set the Universal axis2 as if the 2 bodies were already at offset1 and offset2 appart with respect to axis1 and axis2.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. Ex:

dJointSetHuniversalAxis2(jId, 0, 1, 0);
// If you request the position you will have: dJointGetUniversalAngle1(jId) == 0
// If you request the position you will have: dJointGetUniversalAngle2(jId) == 0
dJointSetHuniversalAxis2Offset(jId, 0, 1, 0, 0.2, 0.17);
// If you request the position you will have: dJointGetUniversalAngle1(jId) == 0.2
// If you request the position you will have: dJointGetUniversalAngle2(jId) == 0.17
Parameters
jThe Hinge joint ID for which the axis will be set
xThe X component of the axis in world frame
yThe Y component of the axis in world frame
zThe Z component of the axis in world frame
angleThe 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 of body1 and body2 as the zero angle position. This function set the current position as the if the 2 bodies where offsets appart.
Any previous offsets are erased.
Warning
Calling dJointSetUniversalAnchor, dJointSetUnivesalAxis1, dJointSetUniversalAxis2, dJointSetUniversalAxis2Offset will reset the "zero" angle position.