JV-ODE Function Reference
Official ODE Functions
World Functions
Space Functions
Rigid Body Functions
Geom Functions
Joint Functions
Mass Functions
Collision Functions

External ODE User Library Functions
JV-ODE Constants
Unique JV-ODE Functions
Rigid Body Functions
Geom Functions
Joint Functions
Mass Functions
Collision Functions
Internal Collision Functions
Misc Functions

JV-ODE Vector Functions
World Functions
Space Functions
Rigid Body Functions
Geom Functions
Joint Functions
Mass Functions
Collision Functions

Official ODE Functions

The functions listed in this section are covered in the official ODE documentation which can be found at the www.ode.org and ODE Wiki websites. The usage of these functions is identical in JV-ODE, however some of the functions listed here return vectors in the original ODE. The use of these vector functions differs slightly in JV-ODE and is explained further in the JV-ODE Vector Functions section of this document.
World Functions

dInitODE()
dInitODE2(initflags)
dAllocateODEDataForThread(allocateflags)
dCleanupODEAllDataForThread()
dWorldCreate()
dWorldDestroy(world)
dWorldSetGravity(world,x#,y#,z#)
dWorldGetGravity(world) - JV-ODE Vector Function
dWorldSetERP(world,erp#)
dWorldGetERP(world)
dWorldSetCFM(world,cfm#)
dWorldGetCFM(world)
dWorldSetAutoDisableFlag(world,doautodisable)
dWorldGetAutoDisableFlag(world)
dWorldSetAutoDisableLinearThreshold(world,lthreshold#)
dWorldGetAutoDisableLinearThreshold(world)
dWorldSetAutoDisableAngularThreshold(world,athreshold#)
dWorldGetAutoDisableAngularThreshold(world)
dWorldSetAutoDisableSteps(world,steps)
dWorldGetAutoDisableSteps(world)
dWorldSetAutoDisableTime(world,time#)
dWorldGetAutoDisableTime(world)
dWorldImpulseToForce(world,stepsize#,ix#,iy#,iz#) - JV-ODE Vector Function
dCloseODE()
dWorldStep(world,stepsize#)
dWorldQuickStep(world,stepsize#)
dWorldSetQuickStepNumIterations(world,num)
dWorldGetQuickStepNumIterations(world)
dWorldSetContactMaxCorrectingVel(world,vel#)
dWorldGetContactMaxCorrectingVel(world)
dWorldSetContactSurfaceLayer(world,depth#)
dWorldGetContactSurfaceLayer(world)
dWorldStepFast1(world,stepsize#,maxiterations)
dWorldSetAutoEnableDepthSF1(world,autoenabledepth)
dWorldGetAutoEnableDepthSF1(world)
dWorldSetQuickStepW(world,overrelaxation#)
dWorldGetQuickStepW(world)
dWorldGetLinearDamping(world)
dWorldGetAngularDamping(world)
dWorldSetLinearDamping(world,scale#)
dWorldSetAngularDamping(world,scale#)
dWorldSetDamping(world,linearscale#,angularscale#)
dWorldGetLinearDampingThreshold(world)
dWorldGetAngularDampingThreshold(world)
dWorldSetLinearDampingThreshold(world,threshold#)
dWorldSetAngularDampingThreshold(world,threshold#)
dWorldGetMaxAngularSpeed(world)
dWorldSetMaxAngularSpeed(world,maxspeed#)

Space Functions

dSimpleSpaceCreate(space)
dHashSpaceCreate(space)
dQuadTreeSpaceCreate(space,cx#,cy#,cz#,ex#,ey#,ez#,depth)
dSpaceDestroy(space)
dHashSpaceSetLevels(space,minlevel,maxlevel)
dHashSpaceGetLevels(space) - JV-ODE Vector Function
dSpaceSetCleanup(space,mode)
dSpaceGetCleanup(space)
dSpaceAdd(space,geom)
dSpaceRemove(space,geom)
dSpaceQuery(space,geom)
dSpaceGetNumGeoms(space)
dSpaceGetGeom(space,index)
dSpaceSetSublevel(space,sublevel)
dSpaceGetSublevel(space)
dSpaceGetClass(space)
dSweepAndPruneSpaceCreate(space,axisorder)

Rigid Body Functions

dBodyCreate(world)
dBodyDestroy(body)
dBodySetPosition(body,x#,y#,z#)
dBodySetRotation(body,pitch#,yaw#,roll#)
dBodySetQuaternion(body,qw#,qx#,qy#,qz#)
dBodySetLinearVel(body,x#,y#,z#)
dBodySetAngularVel(body,x#,y#,z#)
dBodyGetPosition(body) - JV-ODE Vector Function
dBodyGetRotation(body) - JV-ODE Vector Function
dBodyGetQuaternion(body) - JV-ODE Vector Function
dBodyGetLinearVel(body) - JV-ODE Vector Function
dBodyGetAngularVel(body) - JV-ODE Vector Function
dBodySetMass(body,mass)
dBodyGetMass(body) - Not implemented - Unique JV-ODE Function alternative
dBodyAddForce(body,fx#,fy#,fz#)
dBodyAddTorque(body,fx#,fy#,fz#)
dBodyAddRelForce(body,fx#,fy#,fz#)
dBodyAddRelTorque(body,fx#,fy#,fz#)
dBodyAddForceAtPos(body,fx#,fy#,fz#,px#,py#,pz#)
dBodyAddForceAtRelPos(body,fx#,fy#,fz#,px#,py#,pz#)
dBodyAddRelForceAtPos(body,fx#,fy#,fz#,px#,py#,pz#)
dBodyAddRelForceAtRelPos(body,fx#,fy#,fz#,px#,py#,pz#)
dBodyGetForce(body) - JV-ODE Vector Function
dBodyGetTorque(body) - JV-ODE Vector Function
dBodySetForce(body,x#,y#,z#)
dBodySetTorque(body,x#,y#,z#)
dBodyGetRelPointPos(body,px#,py#,pz#) - JV-ODE Vector Function
dBodyGetRelPointVel(body,px#,py#,pz#) - JV-ODE Vector Function
dBodyGetPointVel(body,px#,py#,pz#) - JV-ODE Vector Function
dBodyGetPosRelPoint(body,px#,py#,pz#) - JV-ODE Vector Function
dBodyVectorToWorld(body,px#,py#,pz#) - JV-ODE Vector Function
dBodyVectorFromWorld(body,px#,py#,pz#) - JV-ODE Vector Function
dBodyEnable(body)
dBodyDisable(body)
dBodyIsEnabled(body)
dBodySetAutoDisableFlag(body,doautodisable)
dBodyGetAutoDisableFlag(body)
dBodySetAutoDisableLinearThreshold(body,lthreshold#)
dBodyGetAutoDisableLinearThreshold(body)
dBodySetAutoDisableAngularThreshold(body,athreshold#)
dBodyGetAutoDisableAngularThreshold(body)
dBodySetAutoDisableSteps(body,steps)
dBodyGetAutoDisableSteps(body)
dBodySetAutoDisableTime(body,time#)
dBodyGetAutoDisableTime(body)
dBodySetAutoDisableAverageSamplesCount(body,averagesamplescount)
dBodyGetAutoDisableAverageSamplesCount(body)
dBodySetAutoDisableDefaults(body)
dBodySetData(body,data)
dBodyGetData(body)
dBodySetFiniteRotationMode(body,mode)
dBodyGetFiniteRotationMode(body)
dBodySetFiniteRotationAxis(body,x#,y#,z#)
dBodyGetFiniteRotationAxis(body) - JV-ODE Vector Function
dBodyGetNumJoints(body)
dBodyGetJoint(body,index)
dBodyGetWorld(body)
dBodySetGravityMode(body,mode)
dBodyGetGravityMode(body)
dBodyGetLinearDamping(body)
dBodyGetAngularDamping(body)
dBodySetLinearDamping(body,scale#)
dBodySetAngularDamping(body,scale#)
dBodySetDamping(body,linearscale#,angularscale#)
dBodyGetLinearDampingThreshold(body)
dBodyGetAngularDampingThreshold(body)
dBodySetLinearDampingThreshold(body,threshold#)
dBodySetAngularDampingThreshold(body,threshold#)
dBodySetDampingDefaults(body)
dBodyGetMaxAngularSpeed(body)
dBodySetMaxAngularSpeed(body,maxspeed#)
dBodyGetFirstGeom(body)
dBodyGetNextGeom(geom)

Geom Functions

dGeomDestroy(geom)
dGeomSetData(geom,data)
dGeomGetData(geom)
dGeomSetBody(geom,body)
dGeomGetBody(geom)
dGeomSetPosition(geom,x#,y#,z#)
dGeomSetRotation(geom,pitch#,yaw#,roll#)
dGeomSetQuaternion(geom,qw#,qx#,qy#,qz#)
dGeomGetPosition(geom) - JV-ODE Vector Function
dGeomGetRotation(geom) - JV-ODE Vector Function
dGeomGetQuaternion(geom) - JV-ODE Vector Function
dGeomGetAABB(geom) - Not implemented - Unique JV-ODE Function alternative
dGeomIsSpace(geom)
dGeomGetSpace(geom)
dGeomGetClass(geom)
dGeomSetCategoryBits(geom,bits)
dGeomSetCollideBits(geom,bits)
dGeomGetCategoryBits(geom)
dGeomGetCollideBits(geom)
dGeomEnable(geom)
dGeomDisable(geom)
dGeomIsEnabled(geom)
dCreateSphere(space,radius#)
dGeomSphereSetRadius(sphere,radius#)
dGeomSphereGetRadius(sphere)
dGeomSpherePointDepth(sphere,x#,y#,z#)
dCreateBox(space,lx#,ly#,lz#)
dGeomBoxSetLengths(box,lx#,ly#,lz#)
dGeomBoxGetLengths(box) - JV-ODE Vector Function
dGeomBoxPointDepth(box,x#,y#,z#)
dCreatePlane(space,a#,b#,c#,d#)
dGeomPlaneSetParams(plane,a#,b#,c#,d#)
dGeomPlaneGetParams(plane) - JV-ODE Vector Function
dGeomPlanePointDepth(plane,x#,y#,z#)
dCreateCCylinder(space,radius#,length#)
dGeomCCylinderSetParams(ccylinder,radius#,length#)
dGeomCCylinderGetParams(ccylinder) - JV-ODE Vector Function
dGeomCCylinderPointDepth(plane,x#,y#,z#)
dCreateRay(space,length#)
dGeomRaySetLength(ray,length#)
dGeomRayGetLength(ray)
dGeomRaySet(ray,px#,py#,pz#,dx#,dy#,dz#)
dGeomRayGet(ray) - Not implemented - Unique JV-ODE Function alternative
dGeomTriMeshDataCreate()
dGeomTriMeshDataDestroy(trimeshdata)
dGeomTriMeshDataBuildSingle(trimeshdata,vertices*,vtxstride,vtxcount,indices*,idxcount,tristride)
dGeomTriMeshDataBuildSingle1(trimeshdata,vertices*,vtxstride,vtxcount,indices*,idxcount,tristride,normals*)
dGeomTriMeshDataBuildSimple(trimeshdata,vertices*,vtxcount,indices*,idxcount)
dCreateTriMesh(space,trimeshdata)
dCreateGeomTransform(space)
dGeomTransformSetGeom(geoma,geomb)
dGeomTransformGetGeom(geom)
dGeomTransformSetCleanup(geom,mode) - Note: Mode 1 is no longer supported
dGeomTransformGetCleanup(geom) - Note: Mode 1 is no longer supported
dGeomTransformSetInfo(geom,mode)
dGeomTransformGetInfo(geom)
dGeomSetOffsetPosition(geom,x#,y#,z#)
dGeomSetOffsetRotation(geom,pitch#,yaw#,roll#)
dGeomSetOffsetQuaternion(geom,qw#,qx#,qy#,qz#)
dGeomSetOffsetWorldPosition(geom,x#,y#,z#)
dGeomSetOffsetWorldRotation(geom,pitch#,yaw#,roll#)
dGeomSetOffsetWorldQuaternion(geom,qw#,qx#,qy#,qz#)
dGeomClearOffset(geom)
dGeomIsOffset(geom)
dGeomGetOffsetPosition(geom) - JV-ODE Vector Function
dGeomGetOffsetRotation(geom) - JV-ODE Vector Function
dGeomGetOffsetQuaternion(geom) - JV-ODE Vector Function
dCreateCapsule(space,radius#,length#)
dGeomCapsuleSetParams(capsule,radius#,length#)
dGeomCapsuleGetParams(capsule) - JV-ODE Vector Function
dGeomCapsulePointDepth(capsule,x#,y#,z#)
dCreateHeightfield(space,heightdata,bplaceable)
dGeomHeightfieldDataCreate()
dGeomHeightfieldDataDestroy(heightdata)
dGeomHeightfieldDataBuildSingle(heightdata,pheightdata*,bcopyheightdata,width#,depth#,...
        ...widthsamples,depthsamples,scale#,offset#,thickness#,bwrap)
dGeomHeightfieldDataSetBounds(heightdata,minheight#,maxheight#)
dGeomHeightfieldSetHeightfieldData(geom,heightdata)
dGeomHeightfieldGetHeightfieldData(geom)
dCreateConvex(space,planes*,planecount,points*,pointcount,polygons*)
dGeomSetConvex(geom,planes*,planecount,points*,pointcount,polygons*)

Joint Functions

dJointCreateBall(world,group)
dJointSetBallAnchor(joint,x#,y#,z#)
dJointSetBallAnchor2(joint,x#,y#,z#)
dJointSetBallParam(joint,param,value#)
dJointGetBallAnchor(joint) - JV-ODE Vector Function
dJointGetBallAnchor2(joint) - JV-ODE Vector Function
dJointGetBallParam(joint,param)
dJointCreateHinge(world,group)
dJointSetHingeAnchor(joint,x#,y#,z#)
dJointSetHingeAnchorDelta(joint,x#,y#,z#,ax#,ay#,az#)
dJointSetHingeAxis(joint,x#,y#,z#)
dJointSetHingeAxisOffset(joint,x#,y#,z#,angle#)
dJointSetHingeParam(joint,param,value#)
dJointAddHingeTorque(joint,torque#)
dJointGetHingeAnchor(joint) - JV-ODE Vector Function
dJointGetHingeAnchor2(joint) - JV-ODE Vector Function
dJointGetHingeAxis(joint) - JV-ODE Vector Function
dJointGetHingeAngle(joint)
dJointGetHingeAngleRate(joint)
dJointGetHingeParam(joint,param)
dJointCreateSlider(world,group)
dJointSetSliderAxis(joint,x#,y#,z#)
dJointSetSliderAxisDelta(joint,x#,y#,z#,ax#,ay#,az#)
dJointSetSliderParam(joint,param,value#)
dJointAddSliderForce(joint,force#)
dJointGetSliderAxis(joint) - JV-ODE Vector Function
dJointGetSliderPosition(joint)
dJointGetSliderPositionRate(joint)
dJointGetSliderParam(joint,param)
dJointCreateUniversal(world,group)
dJointSetUniversalAnchor(joint,x#,y#,z#)
dJointSetUniversalAxis1(joint,x#,y#,z#)
dJointSetUniversalAxis2(joint,x#,y#,z#)
dJointSetUniversalParam(joint,param,value#)
dJointAddUniversalTorques(joint,torque1#,torque2#)
dJointGetUniversalAnchor(joint) - JV-ODE Vector Function
dJointGetUniversalAnchor2(joint) - JV-ODE Vector Function
dJointGetUniversalAxis1(joint) - JV-ODE Vector Function
dJointGetUniversalAxis2(joint) - JV-ODE Vector Function
dJointGetUniversalAngles(joint) - JV-ODE Vector Function
dJointGetUniversalAngle1(joint)
dJointGetUniversalAngle2(joint)
dJointGetUniversalAngle1Rate(joint)
dJointGetUniversalAngle2Rate(joint)
dJointGetUniversalParam(joint,param)
dJointCreateHinge2(world,group)
dJointSetHinge2Anchor(joint,x#,y#,z#)
dJointSetHinge2Axis1(joint,x#,y#,z#)
dJointSetHinge2Axis2(joint,x#,y#,z#)
dJointSetHinge2Param(joint,param,value#)
dJointAddHinge2Torques(joint,torque1#,torque2#)
dJointGetHinge2Anchor(joint) - JV-ODE Vector Function
dJointGetHinge2Anchor2(joint) - JV-ODE Vector Function
dJointGetHinge2Axis1(joint) - JV-ODE Vector Function
dJointGetHinge2Axis2(joint) - JV-ODE Vector Function
dJointGetHinge2Angle1(joint)
dJointGetHinge2Angle1Rate(joint)
dJointGetHinge2Angle2Rate(joint)
dJointGetHinge2Param(joint,param)
dJointCreateFixed(world,group)
dJointSetFixed(joint)
dJointSetFixedParam(joint,param,value#)
dJointGetFixedParam(joint,param)
dJointCreateAMotor(world,group)
dJointSetAMotorMode(joint,mode)
dJointSetAMotorNumAxes(joint,num)
dJointSetAMotorAxis(joint,num,rel,x#,y#,z#)
dJointSetAMotorAngle(joint,num,angle#)
dJointSetAMotorParam(joint,param,value#)
dJointAddAMotorTorques(joint,torque0#,torque1#,torque2#)
dJointGetAMotorMode(joint)
dJointGetAMotorNumAxes(joint)
dJointGetAMotorAxis(joint,num) - JV-ODE Vector Function
dJointGetAMotorAxisRel(joint,num)
dJointGetAMotorAngle(joint,num)
dJointGetAMotorAngleRate(joint,num)
dJointGetAMotorParam(joint,param)
dJointDestroy(joint)
dJointGroupCreate(maxsize)
dJointGroupDestroy(group)
dJointGroupEmpty(group)
dJointAttach(joint,body1,body2)
dJointSetData(joint,data)
dJointGetData(joint)
dJointGetType(joint)
dJointGetBody(joint,index)
dJointSetFeedback(joint,feedback)
dJointGetFeedback(joint) - Not implemented - Unique JV-ODE Function alternative
dAreConnected(body1,body2)
dAreConnectedExcluding(body1,body2,jointtype)
dConnectingJoint(body1,body2)
dJointCreateLMotor(world,group)
dJointSetLMotorNumAxes(joint,num)
dJointSetLMotorAxis(joint,anum,rel,x#,y#,z#)
dJointSetLMotorParam(joint,parameter,value#)
dJointGetLMotorNumAxes(joint)
dJointGetLMotorAxis(joint,anum) - JV-ODE Vector Function
dJointGetLMotorParam(joint,parameter)
dJointCreatePlane2D(world,group)
dJointSetPlane2DXParam(joint,parameter,value#)
dJointSetPlane2DYParam(joint,parameter,value#)
dJointSetPlane2DAngleParam(joint,parameter,value#)
dJointCreatePR(world,group)
dJointSetPRAnchor(joint,x#,y#,z#)
dJointSetPRAxis1(joint,x#,y#,z#)
dJointSetPRAxis2(joint,x#,y#,z#)
dJointSetPRParam(joint,parameter,value#)
dJointAddPRTorque(joint,torque#)
dJointGetPRAnchor(joint) - JV-ODE Vector Function
dJointGetPRPosition(joint)
dJointGetPRPositionRate(joint)
dJointGetPRAxis1(joint) - JV-ODE Vector Function
dJointGetPRAxis2(joint) - JV-ODE Vector Function
dJointGetPRParam(joint,parameter)
dJointGetNumBodies(joint)
dJointCreatePU(world,group)
dJointSetPUAnchor(joint,x#,y#,z#)
dJointSetPUAnchorDelta(joint,x#,y#,z#,dx#,dy#,dz#)
dJointSetPUAxis1(joint,x#,y#,z#)
dJointSetPUAxis2(joint,x#,y#,z#)
dJointSetPUAxis3(joint,x#,y#,z#)
dJointSetPUAxisP(joint,x#,y#,z#)
dJointSetPUParam(joint,parameter,value#)
dJointGetPUPosition(joint)
dJointGetPUPositionRate(joint)
dJointGetPUAnchor(joint) - JV-ODE Vector Function
dJointGetPUAxis1(joint) - JV-ODE Vector Function
dJointGetPUAxis2(joint) - JV-ODE Vector Function
dJointGetPUAxis3(joint) - JV-ODE Vector Function
dJointGetPUAxisP(joint) - JV-ODE Vector Function
dJointGetPUAngles(joint) - JV-ODE Vector Function
dJointGetPUAngle1(joint)
dJointGetPUAngle2(joint)
dJointGetPUAngle1Rate(joint)
dJointGetPUAngle2Rate(joint)
dJointGetPUParam(joint,parameter)
dJointCreatePiston(world,group)
dJointSetPistonAnchor(joint,x#,y#,z#)
dJointSetPistonAnchorOffset(joint,x#,y#,z#,dx#,dy#,dz#)
dJointSetPistonAxis(joint,x#,y#,z#)
dJointSetPistonParam(joint,parameter,value#)
dJointGetPistonAnchor(joint) - JV-ODE Vector Function
dJointGetPistonAnchor2(joint) - JV-ODE Vector Function
dJointGetPistonAxis(joint) - JV-ODE Vector Function
dJointGetPistonPosition(joint)
dJointGetPistonPositionRate(joint)
dJointGetPistonAngle(joint)
dJointGetPistonAngleRate(joint)
dJointAddPistonForce(joint,force#)
dJointGetPistonParam(joint,parameter)

Mass Functions

dMassSetZero(mass)
dMassSetParameters(mass,themass#,cgx#,cgy#,cgz#,I11#,I22#,I33#,I12#,I13#,I23#)
dMassSetSphere(mass,density#,radius#)
dMassSetSphereTotal(mass,totalmass#,radius#)
dMassSetCappedCylinder(mass,density#,direction,radius#,length#)
dMassSetCappedCylinderTotal(mass,totalmass#,direction,radius#,length#)
dMassSetCylinder(mass,density#,direction,radius#,length#)
dMassSetCylinderTotal(mass,totalmass#,direction,radius#,length#)
dMassSetBox(mass,density#,lx#,ly#,lz#)
dMassSetBoxTotal(mass,totalmass#,lx#,ly#,lz#)
dMassSetTriMesh(mass,density#,geom)
dMassSetTriMeshTotal(mass,totalmass#,geom)
dMassAdjust(mass,newmass#)
dMassTranslate(mass,x#,y#,z#)
dMassRotate(mass) - Not implemented - Unique JV-ODE Function alternative
dMassAdd(massa,massb)
dMassSetCapsule(mass,density#,direction,radius#,length#)
dMassSetCapsuleTotal(mass,totalmass#,direction,radius#,length#)

Collision Functions

dSpaceCollide() - Not implemented - Unique JV-ODE Function alternative
dSpaceCollide2() - Not implemented - Unique JV-ODE Function alternative

External ODE User Library Functions

The functions listed in this section are not part of the official ODE library and are not currently documented. Care should be taken when using these functions as they may have reliability issues. For more detailed information about the functions listed here, click the desired function name below.
dCreateCylinder(space,radius#,length#)
dGeomCylinderSetParams(cylinder,radius#,length#)
dGeomCylinderGetParams(cylinder) - JV-ODE Vector Function

JV-ODE Constants

The following constants are defined in JV-ODE.

Geometry Classes

dSphereClass
dBoxClass
dCapsuleClass
dCylinderClass
dPlaneClass
dRayClass
dGeomTransformClass
dTriMeshClass
dFirstSpaceClass
dSimpleSpaceClass
dHashSpaceClass
dQuadTreeSpaceClass
dLastSpaceClass
dFirstUserClass
dLastUserClass
dGeomNumClasses

Joint Types

dJointTypeNone
dJointTypeBall
dJointTypeHinge
dJointTypeSlider
dJointTypeContact
dJointTypeUniversal
dJointTypeHinge2
dJointTypeFixed
dJointTypeNull
dJointTypeAMotor
dJointTypeLMotor
dJointTypePlane2D
dJointTypePR
dJointTypePU
dJointTypePiston

Motor Modes

dAMotorUser
dAMotorEuler

Joint Parameters

dParamLoStop
dParamHiStop
dParamVel
dParamFMax
dParamFudgeFactor
dParamBounce
dParamCFM
dParamStopERP
dParamStopCFM
dParamSuspensionERP
dParamSuspensionCFM
dParamLoStop2
dParamHiStop2
dParamVel2
dParamFMax2
dParamFudgeFactor2
dParamBounce2
dParamCFM2
dParamStopERP2
dParamStopCFM2
dParamSuspensionERP2
dParamSuspensionCFM2
dParamLoStop3
dParamHiStop3
dParamVel3
dParamFMax3
dParamFudgeFactor3
dParamBounce3
dParamCFM3
dParamStopERP3
dParamStopCFM3
dParamSuspensionERP3
dParamSuspensionCFM3

Contact Modes

dContactMu2
dContactFDir1
dContactBounce
dContactSoftERP
dContactSoftCFM
dContactMotion1
dContactMotion2
dContactMotionN
dContactSlip1
dContactSlip2
dContactApprox0
dContactApprox1_1
dContactApprox1_2
dContactApprox1

Misc

dInfinity
dMaxUserClasses

Unique JV-ODE Functions

The functions listed in this section are unique to JV-ODE and have been added to give the user more control over the physics simulation. Some of the functions here provide an alternative to the official ODE functions where it has not been possible to implement the original functions directly in JV-ODE. For more detailed information about the functions listed here, click the desired function name below.
Rigid Body Functions

dBodySetAxisAngle(body,angle#,rx#,ry#,rz#)
dBodyGetPositionX(body)
dBodyGetPositionY(body)
dBodyGetPositionZ(body)
dBodyGetAxisAngle(body) - JV-ODE Vector Function
dBodyGetPitch(body)
dBodyGetYaw(body)
dBodyGetRoll(body)
dBodyGetLinearVelX(body)
dBodyGetLinearVelY(body)
dBodyGetLinearVelZ(body)
dBodyGetAngularVelX(body)
dBodyGetAngularVelY(body)
dBodyGetAngularVelZ(body)
dBodyGetMass(body)

Geom Functions

dGeomSetAxisAngle(geom,angle#,rx#,ry#,rz#)
dGeomGetPositionX(geom)
dGeomGetPositionY(geom)
dGeomGetPositionZ(geom)
dGeomGetAxisAngle(geom) - JV-ODE Vector Function
dGeomGetPitch(geom)
dGeomGetYaw(geom)
dGeomGetRoll(geom)
dGeomGetAABBMin(geom) - JV-ODE Vector Function
dGeomGetAABBMax(geom) - JV-ODE Vector Function
dGeomRayGetStart(ray) - JV-ODE Vector Function
dGeomRayGetDir(ray) - JV-ODE Vector Function
dGeomSetOffsetAxisAngle(geom,angle#,rx#,ry#,rz#)
dGeomSetOffsetWorldAxisAngle(geom,angle#,rx#,ry#,rz#)
dGeomGetOffsetAxisAngle(geom) - JV-ODE Vector Function

Joint Functions

dJointFeedbackEnable(joint)
dJointFeedbackDisable(joint)
dJointFeedbackIsEnabled(joint)
dJointGetFeedbackForce1(joint) - JV-ODE Vector Function
dJointGetFeedbackTorque1(joint) - JV-ODE Vector Function
dJointGetFeedbackForce2(joint) - JV-ODE Vector Function
dJointGetFeedbackTorque2(joint) - JV-ODE Vector Function

Mass Functions

dMassCreate()
dMassDestroy(mass)
dMassRotate(mass,pitch#,yaw#,roll#)
dMassRotateQuaternion(mass,qw#,qx#,qy#,qz#)
dMassRotateAxisAngle(mass,angle#,rx#,ry#,rz#)
dMassCenter(mass) - JV-ODE Vector Function

Collision Functions

dContactSetMaxContacts(max)
dContactGetMaxContacts()
dContactSetMode(mode)
dContactGetMode()
dContactSetMu(mu#)
dContactGetMu()
dContactSetMu2(mu#)
dContactGetMu2()
dContactSetFDir1(fdir1x#,fdir1y#,fdir1z#)
dContactGetFDir1() - JV-ODE Vector Function
dContactSetBounce(bounce#)
dContactGetBounce()
dContactSetBounceVel(vel#)
dContactGetBounceVel()
dContactSetSoftERP(erp#)
dContactGetSoftERP()
dContactSetSoftCFM(cfm#)
dContactGetSoftCFM()
dContactSetMotion1(motion#)
dContactGetMotion1()
dContactSetMotion2(motion#)
dContactGetMotion2()
dContactSetSlip1(slip#)
dContactGetSlip1()
dContactSetSlip2(slip#)
dContactGetSlip2()

dGeomContactSetMode(geom,mode)
dGeomContactGetMode(geom)
dGeomContactSetMu(geom,mu#)
dGeomContactGetMu(geom)
dGeomContactSetMu2(geom,mu#)
dGeomContactGetMu2(geom)
dGeomContactSetFDir1(geom,fdir1x#,fdir1y#,fdir1z#)
dGeomContactGetFDir1(geom) - JV-ODE Vector Function
dGeomContactSetBounce(geom,bounce#)
dGeomContactGetBounce(geom)
dGeomContactSetBounceVel(geom,vel#)
dGeomContactGetBounceVel(geom)
dGeomContactSetSoftERP(geom,erp#)
dGeomContactGetSoftERP(geom)
dGeomContactSetSoftCFM(geom,cfm#)
dGeomContactGetSoftCFM(geom)
dGeomContactSetMotion1(geom,motion#)
dGeomContactGetMotion1(geom)
dGeomContactSetMotion2(geom,motion#)
dGeomContactGetMotion2(geom)
dGeomContactSetSlip1(geom,slip#)
dGeomContactGetSlip1(geom)
dGeomContactSetSlip2(geom,slip#)
dGeomContactGetSlip2(geom)
dGeomContactSetDefaults(geom)

dGeom1CountCollisions(geom)
dGeom1CollisionGeom(geom,index)
dGeom1CollisionX(geom,index)
dGeom1CollisionY(geom,index)
dGeom1CollisionZ(geom,index)
dGeom1CollisionNX(geom,index)
dGeom1CollisionNY(geom,index)
dGeom1CollisionNZ(geom,index)
dGeom1CollisionDepth(geom,index)
dGeom2CountCollisions(geom)
dGeom2CollisionGeom(geom,index)
dGeom2CollisionX(geom,index)
dGeom2CollisionY(geom,index)
dGeom2CollisionZ(geom,index)
dGeom2CollisionNX(geom,index)
dGeom2CollisionNY(geom,index)
dGeom2CollisionNZ(geom,index)
dGeom2CollisionDepth(geom,index)

dSpaceCollide(space,world,group)
dSpaceCollide2(geom1,geom2,world,group)

Internal Collision Functions

dSetInternalSpaceCollideMode(mode)
dGetInternalSpaceCollideMode()
dSetInternalContactSurfaceMode(mode)
dGetInternalContactSurfaceMode()

Misc Functions

dVectorW()
dVectorX()
dVectorY()
dVectorZ()

dGetVersion()
dRegisterODE(key1,key2,key3,key4)

JV-ODE Vector Functions

The functions listed in this section are used where ODE normally returns a vector. A vector can be thought of as an array of variables, which are returned when calling certain ODE functions. When an ODE function is called and returns a vector, JV-ODE fills the vector results into 2 to 4 JV-ODE vector functions. The JV-ODE vector functions can then be called to return the results of the ODE function. For more information about the functions listed here, click the desired function name below.
World Functions

dWorldGetGravity(world)
dWorldImpulseToForce(world,stepsize#,ix#,iy#,iz#)

Space Functions

dHashSpaceGetLevels(space)

Rigid Body Functions

dBodyGetPosition(body)
dBodyGetRotation(body)
dBodyGetQuaternion(body)
dBodyGetAxisAngle(body)
dBodyGetLinearVel(body)
dBodyGetAngularVel(body)
dBodyGetForce(body)
dBodyGetTorque(body)
dBodyGetRelPointPos(body,px#,py#,pz#)
dBodyGetRelPointVel(body,px#,py#,pz#)
dBodyGetPointVel(body,px#,py#,pz#)
dBodyGetPosRelPoint(body,px#,py#,pz#)
dBodyVectorToWorld(body,px#,py#,pz#)
dBodyVectorFromWorld(body,px#,py#,pz#)
dBodyGetFiniteRotationAxis(body)

Geom Functions

dGeomGetPosition(geom)
dGeomGetRotation(geom)
dGeomGetQuaternion(geom)
dGeomGetAxisAngle(geom)
dGeomGetAABBMin(geom)
dGeomGetAABBMax(geom)
dGeomBoxGetLengths(box)
dGeomPlaneGetParams(plane)
dGeomCylinderGetParams(cylinder)
dGeomCCylinderGetParams(ccylinder)
dGeomRayGetStart(ray)
dGeomRayGetDir(ray)
dGeomGetOffsetPosition(geom)
dGeomGetOffsetRotation(geom)
dGeomGetOffsetQuaternion(geom)
dGeomCapsuleGetParams(capsule)
dGeomGetOffsetAxisAngle(geom)

Joint Functions

dJointGetFeedbackForce1(joint)
dJointGetFeedbackTorque1(joint)
dJointGetFeedbackForce2(joint)
dJointGetFeedbackTorque2(joint)
dJointGetBallAnchor(joint)
dJointGetBallAnchor2(joint)
dJointGetHingeAnchor(joint)
dJointGetHingeAnchor2(joint)
dJointGetHingeAxis(joint)
dJointGetSliderAxis(joint)
dJointGetUniversalAnchor(joint)
dJointGetUniversalAnchor2(joint)
dJointGetUniversalAxis1(joint)
dJointGetUniversalAxis2(joint)
dJointGetUniversalAngles(joint)
dJointGetHinge2Anchor(joint)
dJointGetHinge2Anchor2(joint)
dJointGetHinge2Axis1(joint)
dJointGetHinge2Axis2(joint)
dJointGetAMotorAxis(joint,num)
dJointGetLMotorAxis(joint,anum)
dJointGetPRAnchor(joint)
dJointGetPRAxis1(joint)
dJointGetPRAxis2(joint)
dJointGetPUAnchor(joint)
dJointGetPUAxis1(joint)
dJointGetPUAxis2(joint)
dJointGetPUAxis3(joint)
dJointGetPUAxisP(joint)
dJointGetPUAngles(joint)
dJointGetPistonAnchor(joint)
dJointGetPistonAnchor2(joint)
dJointGetPistonAxis(joint)

Mass Functions

dMassCenter(mass)

Collision Functions

dContactGetFDir1()
dGeomContactGetFDir1(geom)

External ODE User Library Functions

Function

dCreateCylinder(space,radius#,length#)
Parameters

Space = Space ID (Integer)
Radius = Cylinder Radius (Float)
Length = Cylinder Length (Float)
Description

Creates a flat ended cylinder geom of the specified dimensions in the specified space and returns its geom ID.
Returns

Cylinder Geom ID (Integer)

Function

dGeomCylinderSetParams(cylinder,radius#,length#)
Parameters

Cylinder = Cylinder Geom ID (Integer)
Radius = Cylinder Radius (Float)
Length = Cylinder Length (Float)
Description

Modifies the dimensions of an existing Cylinder geom.
Returns

None

Function

dGeomCylinderGetParams(cylinder) - JV-ODE Vector Function
Parameters

Cylinder = Cylinder Geom ID (Integer)
Description

Returns the current dimensions of an existing Cylinder geom.
Returns

None - Vector result returned via JV-ODE Vector Functions

Unique JV-ODE Functions

Rigid Body Functions
Function

dBodySetAxisAngle(body,angle#,rx#,ry#,rz#)
Parameters

Body = Body ID (Integer)
Angle = Rotation Angle (Float)
RX = Rotation Axis X (Float)
RY = Rotation Axis Y (Float)
RZ = Rotation Axis Z (Float)
Description

Sets the rotation of the specified body using the Axis Angle rotation system.
Returns

None

Function

dBodyGetPositionX(body)
Parameters

Body = Body ID (Integer)
Description

Returns the current X coordinate of the specified body. This function provides an alternative to the original dBodyGetPosition(body) function of the ODE library which returns a vector result.
Returns

X Position (Float)

Function

dBodyGetPositionY(body)
Parameters

Body = Body ID (Integer)
Description

Returns the current Y coordinate of the specified body. This function provides an alternative to the original dBodyGetPosition(body) function of the ODE library which returns a vector result.
Returns

Y Position (Float)

Function

dBodyGetPositionZ(body)
Parameters

Body = Body ID (Integer)
Description

Returns the current Z coordinate of the specified body. This function provides an alternative to the original dBodyGetPosition(body) function of the ODE library which returns a vector result.
Returns

Z Position (Float)

Function

dBodyGetAxisAngle(body) - JV-ODE Vector Function
Parameters

Body = Body ID (Integer)
Description

Returns the current Axis Angle rotation of the specified body.
Returns

None - Vector result returned via JV-ODE Vector Functions

Function

dBodyGetPitch(body)
Parameters

Body = Body ID (Integer)
Description

Returns the current pitch angle of the specified body.
Returns

Pitch Angle (Float)

Function

dBodyGetYaw(body)
Parameters

Body = Body ID (Integer)
Description

Returns the current yaw angle of the specified body.
Returns

Yaw Angle (Float)

Function

dBodyGetRoll(body)
Parameters

Body = Body ID (Integer)
Description

Returns the current roll angle of the specified body.
Returns

Roll Angle (Float)

Function

dBodyGetLinearVelX(body)
Parameters

Body = Body ID (Integer)
Description

Returns the current linear velocity X element of the specified body. This function provides an alternative to the original dBodyGetLinearVel(body) function of the ODE library which returns a vector result.
Returns

Linear Velocity X (Float)

Function

dBodyGetLinearVelY(body)
Parameters

Body = Body ID (Integer)
Description

Returns the current linear velocity Y element of the specified body. This function provides an alternative to the original dBodyGetLinearVel(body) function of the ODE library which returns a vector result.
Returns

Linear Velocity Y (Float)

Function

dBodyGetLinearVelZ(body)
Parameters

Body = Body ID (Integer)
Description

Returns the current linear velocity Z element of the specified body. This function provides an alternative to the original dBodyGetLinearVel(body) function of the ODE library which returns a vector result.
Returns

Linear Velocity Z (Float)

Function

dBodyGetAngularVelX(body)
Parameters

Body = Body ID (Integer)
Description

Returns the current angular velocity X element of the specified body. This function provides an alternative to the original dBodyGetAngularVel(body) function of the ODE library which returns a vector result.
Returns

Angular Velocity X (Float)

Function

dBodyGetAngularVelY(body)
Parameters

Body = Body ID (Integer)
Description

Returns the current angular velocity Y element of the specified body. This function provides an alternative to the original dBodyGetAngularVel(body) function of the ODE library which returns a vector result.
Returns

Angular Velocity Y (Float)

Function

dBodyGetAngularVelZ(body)
Parameters

Body = Body ID (Integer)
Description

Returns the current angular velocity Z element of the specified body. This function provides an alternative to the original dBodyGetAngularVel(body) function of the ODE library which returns a vector result.
Returns

Angular Velocity Z (Float)

Function

dBodyGetMass(body)
Parameters

Body = Body ID (Integer)
Description

Returns the current mass value of the specified body. This function replaces the
dBodyGetMass(body) function described in the official ODE documentation.
Returns

Mass (Float)
Geom Functions
Function

dGeomSetAxisAngle(geom,angle#,rx#,ry#,rz#)
Parameters

Geom = Geom ID (Integer)
Angle = Rotation Angle (Float)
RX = Rotation Axis X (Float)
RY = Rotation Axis Y (Float)
RZ = Rotation Axis Z (Float)
Description

Sets the rotation of the specified geom using the Axis Angle rotation system.
Returns

None

Function

dGeomGetPositionX(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current X coordinate of the specified geom.
Returns

X Position (Float)

Function

dGeomGetPositionY(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current Y coordinate of the specified geom.
Returns

Y Position (Float)

Function

dGeomGetPositionZ(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current Z coordinate of the specified geom.
Returns

Z Position (Float)

Function

dGeomGetAxisAngle(geom) - JV-ODE Vector Function
Parameters

Geom = Geom ID (Integer)
Description

Returns the current Axis Angle rotation of the specified geom.
Returns

None - Vector result returned via JV-ODE Vector Functions

Function

dGeomGetPitch(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current pitch angle of the specified geom.
Returns

Pitch Angle (Float)

Function

dGeomGetYaw(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current yaw angle of the specified geom.
Returns

Yaw Angle (Float)

Function

dGeomGetRoll(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current roll angle of the specified geom.
Returns

Roll Angle (Float)

Function

dGeomGetAABBMin(geom) - JV-ODE Vector Function
Parameters

Geom = Geom ID (Integer)
Description

Returns the minimum XYZ elements of an axis aligned bounding box that surrounds the specified geom. The function must be used together with the dGeomGetAABBMax(geom) function to return all elements of the bounding box. These two functions replace the
dGeomGetAABB(geom) function described in the official ODE documentation.
Returns

None - Vector result returned via JV-ODE Vector Functions

Function

dGeomGetAABBMax(geom) - JV-ODE Vector Function
Parameters

Geom = Geom ID (Integer)
Description

Returns the maximum XYZ elements of an axis aligned bounding box that surrounds the specified geom. The function must be used together with the dGeomGetAABBMin(geom) function to return all elements of the bounding box. These two functions replace the
dGeomGetAABB(geom) function described in the official ODE documentation.
Returns

None - Vector result returned via JV-ODE Vector Functions

Function

dGeomRayGetStart(ray) - JV-ODE Vector Function
Parameters

Ray = Ray Geom ID (Integer)
Description

Returns the XYZ starting position elements of the specified ray geom. The function should be used together with the dGeomRayGetDir(geom) function. These two functions replace the
dGeomRayGet(geom) function described in the official ODE documentation.
Returns

None - Vector result returned via JV-ODE Vector Functions

Function

dGeomRayGetDir(ray) - JV-ODE Vector Function
Parameters

Ray = Ray Geom ID (Integer)
Description

Returns the XYZ direction elements of the specified ray geom. The function should be used together with the dGeomRayGetStart(geom) function. These two functions replace the
dGeomRayGet(geom) function described in the official ODE documentation.
Returns

None - Vector result returned via JV-ODE Vector Functions

Function

dGeomSetOffsetAxisAngle(geom,angle#,rx#,ry#,rz#)
Parameters

Geom = Geom ID (Integer)
Angle = Rotation Angle (Float)
RX = Rotation Axis X (Float)
RY = Rotation Axis Y (Float)
RZ = Rotation Axis Z (Float)
Description

Sets the rotation of the specified offset geom using the Axis Angle rotation system.
Returns

None

Function

dGeomSetOffsetWorldAxisAngle(geom,angle#,rx#,ry#,rz#)
Parameters

Geom = Geom ID (Integer)
Angle = Rotation Angle (Float)
RX = Rotation Axis X (Float)
RY = Rotation Axis Y (Float)
RZ = Rotation Axis Z (Float)
Description

Sets the world rotation of the specified offset geom using the Axis Angle rotation system.
Returns

None

Function

dGeomGetOffsetAxisAngle(geom) - JV-ODE Vector Function
Parameters

Geom = Geom ID (Integer)
Description

Returns the current Axis Angle rotation of the specified offset geom.
Returns

None - Vector result returned via JV-ODE Vector Functions
Joint Functions
Function

dJointFeedbackEnable(joint)
Parameters

Joint = Joint ID (Integer)
Description

Enables force and torque vector feedback on the specified joint.
Returns

None

Function

dJointFeedbackDisable(joint)
Parameters

Joint = Joint ID (Integer)
Description

Disables force and torque vector feedback on the specified joint.
Returns

None

Function

dJointFeedbackIsEnabled(joint)
Parameters

Joint = Joint ID (Integer)
Description

Returns the current feedback status of the specified joint.
Returns

Feedback Status (Integer): 0 = Disabled 1 = Enabled

Function

dJointGetFeedbackForce1(joint) - JV-ODE Vector Function
Parameters

Joint = Joint ID (Integer)
Description

Returns the force 1 feedback vector of the specified joint. The function should be used together with the dJointGetFeedbackForce2(joint), dJointGetFeedbackTorque1(joint) and dJointGetFeedbackTorque2(joint) functions to retrieve all force and torque data. These four functions replace the
dJointGetFeedback(joint) function described in the official ODE documentation.
Returns

None - Vector result returned via JV-ODE Vector Functions

Function

dJointGetFeedbackTorque1(joint) - JV-ODE Vector Function
Parameters

Joint = Joint ID (Integer)
Description

Returns the torque 1 feedback vector of the specified joint. The function should be used together with the dJointGetFeedbackTorque2(joint), dJointGetFeedbackForce1(joint) and dJointGetFeedbackForce2(joint) functions to retrieve all force and torque data. These four functions replace the
dJointGetFeedback(joint) function described in the official ODE documentation.
Returns

None - Vector result returned via JV-ODE Vector Functions

Function

dJointGetFeedbackForce2(joint) - JV-ODE Vector Function
Parameters

Joint = Joint ID (Integer)
Description

Returns the force 2 feedback vector of the specified joint. The function should be used together with the dJointGetFeedbackForce1(joint), dJointGetFeedbackTorque1(joint) and dJointGetFeedbackTorque2(joint) functions to retrieve all force and torque data. These four functions replace the
dJointGetFeedback(joint) function described in the official ODE documentation.
Returns

None - Vector result returned via JV-ODE Vector Functions

Function

dJointGetFeedbackTorque2(joint) - JV-ODE Vector Function
Parameters

Joint = Joint ID (Integer)
Description

Returns the torque 2 feedback vector of the specified joint. The function should be used together with the dJointGetFeedbackTorque1(joint), dJointGetFeedbackForce1(joint) and dJointGetFeedbackForce2(joint) functions to retrieve all force and torque data. These four functions replace the
dJointGetFeedback(joint) function described in the official ODE documentation.
Returns

None - Vector result returned via JV-ODE Vector Functions
Mass Functions
Function

dMassCreate()
Parameters

None
Description

Creates a mass structure for use with the ODE mass functions and returns its mass ID. You must create a mass structure before using any of the mass functions.
Returns

Mass ID (Integer)

Function

dMassDestroy(mass)
Parameters

Mass = Mass ID (Integer)
Description

Destroys a mass structure that has been created using the dMassCreate() function. Once the mass structure has been applied to the rigid body and you no longer need to access it, you can destroy it and free the memory it had previously occupied. The mass applied to the rigid body will still remain intact after destroying the mass structure used to create it.
Returns

None

Function

dMassRotate(mass,pitch#,yaw#,roll#)
Parameters

Mass = Mass ID (Integer)
Pitch = Pitch (Float)
Yaw = Yaw (Float)
Roll = Roll (Float)
Description

Rotates the mass structure around the rigid body by the specified amount using Euler rotation. This function replaces the
dMassRotate(mass) function described in the official ODE documentation.
Returns

None

Function

dMassRotateQuaternion(mass,qw#,qx#,qy#,qz#)
Parameters

Mass = Mass ID (Integer)
QW = Quaternion W (Float)
QX = Quaternion X (Float)
QY = Quaternion Y (Float)
QZ = Quaternion Z (Float)
Description

Rotates the mass structure around the rigid body by the specified amount using Quaternion rotation. This function replaces the
dMassRotate(mass) function described in the official ODE documentation.
Returns

None

Function

dMassRotateAxisAngle(mass,angle#,rx#,ry#,rz#)
Parameters

Mass = Mass ID (Integer)
Angle = Rotation Angle (Float)
RX = Rotation Axis X (Float)
RY = Rotation Axis Y (Float)
RZ = Rotation Axis Z (Float)
Description

Rotates the mass structure around the rigid body by the specified amount using Axis Angle rotation. This function replaces the
dMassRotate(mass) function described in the official ODE documentation.
Returns

None

Function

dMassCenter(mass) - JV-ODE Vector Function
Parameters

Mass = Mass ID (Integer)
Description

Returns the centre of gravity XYZ positions of the mass structure in the body frame.
Returns

None - Vector result returned via JV-ODE Vector Functions
Collision Functions
Function

dContactSetMaxContacts(max)
Parameters

Max = Maximum Contacts (Integer) - Default: 128
Description

Sets the maximum number of contacts processed when ODE is performing collision detection between two geoms. Any excess contacts will be ignored, thus speeding up the collision detection during each time step. However, setting the maximum contacts too low can result in inaccurate collision responses.
Returns

None

Function

dContactGetMaxContacts()
Parameters

None
Description

Returns the current maximum contacts value.
Returns

Maximum Contacts (Integer)

Function

dContactSetMode(mode)
Parameters

Mode = Contact Flags (Integer Multiplier)
Description

Sets the global contact mode. Contact joints are created using this contact mode during a collision. If set, a geom contact mode will override the global contact mode. The contact joint and contact flags are described in more detail in the Joints section of the official ODE documentation.
Returns

None
Example

dContactSetMode(dContactBounce+dContactSlip1+dContactSoftERP)

Function

dContactGetMode()
Parameters

None
Description

Returns the current global contact mode.
Returns

Contact Flags (Integer Multiplier)

Function

dContactSetMu(mu#)
Parameters

Mu = Friction Direction 1 Coefficient (Float)
Description

Sets the global contact friction direction 1 coefficient. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dContactGetMu()
Parameters

None
Description

Returns the current global contact direction 1 friction coefficient value. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Friction Direction 1 Coefficient (Float)

Function

dContactSetMu2(mu#)
Parameters

Mu = Friction Direction 2 Coefficient (Float)
Description

Sets the global contact friction direction 2 coefficient. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dContactGetMu2()
Parameters

None
Description

Returns the current global contact direction 2 friction coefficient value. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Friction Direction 2 Coefficient (Float)

Function

dContactSetFDir1(fdir1x#,fdir1y#,fdir1z#)
Parameters

FDir1X = Friction Vector X Axis (Float)
FDir1Y = Friction Vector Y Axis (Float)
FDir1Z = Friction Vector Z Axis (Float)
Description

Sets the global contact first friction direction vector. The FDir1 functions allow fine control over the quantity of friction applied on each individual axis. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dContactGetFDir1() - JV-ODE Vector Function
Parameters

None
Description

Returns the current global contact first friction direction vector values. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None - Vector result returned via JV-ODE Vector Functions

Function

dContactSetBounce(bounce#)
Parameters

Bounce = Bounce Restitution (Float)
Description

Sets the global contact bounce restitution. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dContactGetBounce()
Parameters

None
Description

Returns the current global contact bounce restitution value. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Bounce Restitution (Float)

Function

dContactSetBounceVel(vel#)
Parameters

Vel = Minimum Incoming Bounce Velocity (Float)
Description

Sets the global contact minimum incoming bounce velocity. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dContactGetBounceVel()
Parameters

None
Description

Returns the current global contact minimum incoming bounce velocity value. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Minimum Incoming Bounce Velocity (Float)

Function

dContactSetSoftERP(erp#)
Parameters

Erp = Error Reduction Parameter (Float)
Description

Sets the global contact error reduction parameter. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dContactGetSoftERP()
Parameters

None
Description

Returns the current global contact error reduction parameter value. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Error Reduction Parameter (Float)

Function

dContactSetSoftCFM(cfm#)
Parameters

Cfm = Constraint Force Mixing (Float)
Description

Sets the global contact constraint force mixing. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dContactGetSoftCFM()
Parameters

None
Description

Returns the current global contact constraint force mixing value. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Constraint Force Mixing (Float)

Function

dContactSetMotion1(motion#)
Parameters

Motion = Friction Direction 1 Surface Velocity (Float)
Description

Sets the global contact friction direction 1 surface velocity. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dContactGetMotion1()
Parameters

None
Description

Returns the current global contact friction direction 1 surface velocity value. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Friction Direction 1 Surface Velocity (Float)

Function

dContactSetMotion2(motion#)
Parameters

Motion = Friction Direction 2 Surface Velocity (Float)
Description

Sets the global contact friction direction 2 surface velocity. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dContactGetMotion2()
Parameters

None
Description

Returns the current global contact friction direction 2 surface velocity value. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Friction Direction 2 Surface Velocity (Float)

Function

dContactSetSlip1(slip#)
Parameters

Slip = Friction Direction 1 Force Dependent Slip (Float)
Description

Sets the global contact friction direction 1 force dependent slip. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dContactGetSlip1()
Parameters

None
Description

Returns the current global contact friction direction 1 force dependent slip value. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Friction Direction 1 Force Dependent Slip (Float)

Function

dContactSetSlip2(slip#)
Parameters

Slip = Friction Direction 2 Force Dependent Slip (Float)
Description

Sets the global contact friction direction 2 force dependent slip. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dContactGetSlip2()
Parameters

None
Description

Returns the current global contact friction direction 2 force dependent slip value. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Friction Direction 2 Force Dependent Slip (Float)

Function

dGeomContactSetMode(geom,mode)
Parameters

Geom = Geom ID (Integer)
Mode = Contact Flags (Integer Multiplier)
Description

Sets the contact mode of the specified geom. Contact joints are created using this geom contact mode during a collision. If set, a geom contact mode will override the global contact mode. The contact joint and contact flags are described in more detail in the Joints section of the official ODE documentation.
Returns

None
Example

dGeomContactSetMode(geom,dContactBounce+dContactSlip1+dContactSoftERP)

Function

dGeomContactGetMode(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current contact mode of the specified geom.
Returns

Contact Flags (Integer Multiplier)

Function

dGeomContactSetMu(geom,mu#)
Parameters

Geom = Geom ID (Integer)
Mu = Friction Direction 1 Coefficient (Float)
Description

Sets the contact friction direction 1 coefficient of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dGeomContactGetMu(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current contact direction 1 friction coefficient value of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Friction Direction 1 Coefficient (Float)

Function

dGeomContactSetMu2(geom,mu#)
Parameters

Geom = Geom ID (Integer)
Mu = Friction Direction 2 Coefficient (Float)
Description

Sets the contact friction direction 2 coefficient of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dGeomContactGetMu2(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current contact direction 2 friction coefficient value of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Friction Direction 2 Coefficient (Float)

Function

dGeomContactSetFDir1(geom,fdir1x#,fdir1y#,fdir1z#)
Parameters

Geom = Geom ID (Integer)
FDir1X = Friction Vector X Axis (Float)
FDir1Y = Friction Vector Y Axis (Float)
FDir1Z = Friction Vector Z Axis (Float)
Description

Sets the contact first friction direction vector of the specified geom. The FDir1 functions allow fine control over the quantity of friction applied on each individual axis. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dGeomContactGetFDir1(geom) - JV-ODE Vector Function
Parameters

Geom = Geom ID (Integer)
Description

Returns the current contact first friction direction vector values of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None - Vector result returned via JV-ODE Vector Functions

Function

dGeomContactSetBounce(geom,bounce#)
Parameters

Geom = Geom ID (Integer)
Bounce = Bounce Restitution (Float)
Description

Sets the contact bounce restitution of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dGeomContactGetBounce(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current contact bounce restitution value of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Bounce Restitution (Float)

Function

dGeomContactSetBounceVel(geom,vel#)
Parameters

Geom = Geom ID (Integer)
Vel = Minimum Incoming Bounce Velocity (Float)
Description

Sets the contact minimum incoming bounce velocity of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dGeomContactGetBounceVel(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current contact minimum incoming bounce velocity value of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Minimum Incoming Bounce Velocity (Float)

Function

dGeomContactSetSoftERP(geom,erp#)
Parameters

Geom = Geom ID (Integer)
Erp = Error Reduction Parameter (Float)
Description

Sets the contact error reduction parameter of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dGeomContactGetSoftERP(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current contact error reduction parameter value of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Error Reduction Parameter (Float)

Function

dGeomContactSetSoftCFM(geom,cfm#)
Parameters

Geom = Geom ID (Integer)
Cfm = Constraint Force Mixing (Float)
Description

Sets the contact constraint force mixing of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dGeomContactGetSoftCFM(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current contact constraint force mixing value of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Constraint Force Mixing (Float)

Function

dGeomContactSetMotion1(geom,motion#)
Parameters

Geom = Geom ID (Integer)
Motion = Friction Direction 1 Surface Velocity (Float)
Description

Sets the contact friction direction 1 surface velocity of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dGeomContactGetMotion1(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current contact friction direction 1 surface velocity value of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Friction Direction 1 Surface Velocity (Float)

Function

dGeomContactSetMotion2(geom,motion#)
Parameters

Geom = Geom ID (Integer)
Motion = Friction Direction 2 Surface Velocity (Float)
Description

Sets the contact friction direction 2 surface velocity of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dGeomContactGetMotion2(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current contact friction direction 2 surface velocity value of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Friction Direction 2 Surface Velocity (Float)

Function

dGeomContactSetSlip1(geom,slip#)
Parameters

Geom = Geom ID (Integer)
Slip = Friction Direction 1 Force Dependent Slip (Float)
Description

Sets the contact friction direction 1 force dependent slip of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dGeomContactGetSlip1(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current contact friction direction 1 force dependent slip value of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Friction Direction 1 Force Dependent Slip (Float)

Function

dGeomContactSetSlip2(geom,slip#)
Parameters

Geom = Geom ID (Integer)
Slip = Friction Direction 2 Force Dependent Slip (Float)
Description

Sets the contact friction direction 2 force dependent slip of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

None

Function

dGeomContactGetSlip2(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the current contact friction direction 2 force dependent slip value of the specified geom. The contact joint settings are described in more detail in the Joints section of the official ODE documentation.
Returns

Friction Direction 2 Force Dependent Slip (Float)

Function

dGeomContactSetDefaults(geom)
Parameters

Geom = Geom ID (Integer)
Description

Sets all geom contact settings of the specified geom to the default values.
Returns

None

Function

dGeom1CountCollisions(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the number of collisions detected on the specified geom during the previous call to the dSpaceCollide() function. The dGeom1* detailed collision functions return data from collisions between the specified geom and geoms of larger dimensions. To return all possible detailed collision data, this function should be used together with the dGeom2CountCollisions(geom) function.
Returns

Collision Count (Integer)
Example

Dim GeomObjectID(100)
Dim XPos#(100)
Dim YPos#(100)
Dim ZPos#(100)

If dGeom1CountCollisions(geom)>0
    For count=1 to dGeom1CountCollisions(geom)
        GeomObjectID(count)=dGeom1CollisionGeom(geom,count)
        XPos#(count)=dGeom1CollisionX(geom,count)
        YPos#(count)=dGeom1CollisionY(geom,count)
        ZPos#(count)=dGeom1CollisionZ(geom,count)
    Next
    End If

Function

dGeom1CollisionGeom(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the geom ID of an object which has collided with the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each object individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom2CollisionGeom(geom,index) function.
Returns

Geom ID (Integer)
Example

If dGeom1CountCollisions(geom)>0
    GeomObjectID=dGeom1CollisionGeom(geom,1)
    End If

Function

dGeom1CollisionX(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the X coordinate of the collision detected on the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each position individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom2CollisionX(geom,index) function.
Returns

X Position (Float)
Example

If dGeom1CountCollisions(geom)>0
    XPos#=dGeom1CollisionX(geom,1)
    End If

Function

dGeom1CollisionY(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the Y coordinate of the collision detected on the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each position individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom2CollisionY(geom,index) function.
Returns

Y Position (Float)
Example

If dGeom1CountCollisions(geom)>0
    YPos#=dGeom1CollisionY(geom,1)
    End If

Function

dGeom1CollisionZ(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the Z coordinate of the collision detected on the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each position individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom2CollisionZ(geom,index) function.
Returns

Z Position (Float)
Example

If dGeom1CountCollisions(geom)>0
    ZPos#=dGeom1CollisionZ(geom,1)
    End If

Function

dGeom1CollisionNX(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the X component of the collision normal for the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each component individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom2CollisionNX(geom,index) function.
Returns

NX Component (Float)
Example

If dGeom1CountCollisions(geom)>0
    NXComp#=dGeom1CollisionNX(geom,1)
    End If

Function

dGeom1CollisionNY(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the Y component of the collision normal for the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each component individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom2CollisionNY(geom,index) function.
Returns

NY Component (Float)
Example

If dGeom1CountCollisions(geom)>0
    NYComp#=dGeom1CollisionNY(geom,1)
    End If

Function

dGeom1CollisionNZ(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the Z component of the collision normal for the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each component individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom2CollisionNZ(geom,index) function.
Returns

NZ Component (Float)
Example

If dGeom1CountCollisions(geom)>0
    NZComp#=dGeom1CollisionNZ(geom,1)
    End If

Function

dGeom1CollisionDepth(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the depth of the collision on the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each depth individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom2CollisionDepth(geom,index) function.
Returns

Collision Depth (Float)
Example

If dGeom1CountCollisions(geom)>0
    CDepth#=dGeom1CollisionDepth(geom,1)
    End If

Function

dGeom2CountCollisions(geom)
Parameters

Geom = Geom ID (Integer)
Description

Returns the number of collisions detected on the specified geom during the previous call to the dSpaceCollide() function. The dGeom2* detailed collision functions return data from collisions between the specified geom and geoms of smaller dimensions. To return all possible detailed collision data, this function should be used together with the dGeom1CountCollisions(geom) function.
Returns

Collision Count (Integer)
Example

Dim GeomObjectID(100)
Dim XPos#(100)
Dim YPos#(100)
Dim ZPos#(100)

If dGeom2CountCollisions(geom)>0
    For count=1 to dGeom2CountCollisions(geom)
        GeomObjectID(count)=dGeom2CollisionGeom(geom,count)
        XPos#(count)=dGeom2CollisionX(geom,count)
        YPos#(count)=dGeom2CollisionY(geom,count)
        ZPos#(count)=dGeom2CollisionZ(geom,count)
    Next
    End If

Function

dGeom2CollisionGeom(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the geom ID of an object which has collided with the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each object individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom1CollisionGeom(geom,index) function.
Returns

Geom ID (Integer)
Example

If dGeom2CountCollisions(geom)>0
    GeomObjectID=dGeom2CollisionGeom(geom,1)
    End If

Function

dGeom2CollisionX(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the X coordinate of the collision detected on the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each position individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom1CollisionX(geom,index) function.
Returns

X Position (Float)
Example

If dGeom2CountCollisions(geom)>0
    XPos#=dGeom2CollisionX(geom,1)
    End If

Function

dGeom2CollisionY(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the Y coordinate of the collision detected on the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each position individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom1CollisionY(geom,index) function.
Returns

Y Position (Float)
Example

If dGeom2CountCollisions(geom)>0
    YPos#=dGeom2CollisionY(geom,1)
    End If

Function

dGeom2CollisionZ(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the Z coordinate of the collision detected on the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each position individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom1CollisionZ(geom,index) function.
Returns

Z Position (Float)
Example

If dGeom2CountCollisions(geom)>0
    ZPos#=dGeom2CollisionZ(geom,1)
    End If

Function

dGeom2CollisionNX(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the X component of the collision normal for the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each component individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom1CollisionNX(geom,index) function.
Returns

NX Component (Float)
Example

If dGeom2CountCollisions(geom)>0
    NXComp#=dGeom2CollisionNX(geom,1)
    End If

Function

dGeom2CollisionNY(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the Y component of the collision normal for the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each component individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom1CollisionNY(geom,index) function.
Returns

NY Component (Float)
Example

If dGeom2CountCollisions(geom)>0
    NYComp#=dGeom2CollisionNY(geom,1)
    End If

Function

dGeom2CollisionNZ(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the Z component of the collision normal for the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each component individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom1CollisionNZ(geom,index) function.
Returns

NZ Component (Float)
Example

If dGeom2CountCollisions(geom)>0
    NZComp#=dGeom2CollisionNZ(geom,1)
    End If

Function

dGeom2CollisionDepth(geom,index)
Parameters

Geom = Geom ID (Integer)
Index = Collision Index (Integer) - Index Range: 1 to Collision Count
Description

Returns the depth of the collision on the specified geom. If more than one collision has occurred with the specified geom, the index can be used to identify each depth individually. You must ensure at least one collision has occurred with the specified geom before using this function, failing to do so will result in an error. To return all possible detailed collision data, this function should be used together with the dGeom1CollisionDepth(geom,index) function.
Returns

Collision Depth (Float)
Example

If dGeom2CountCollisions(geom)>0
    CDepth#=dGeom2CollisionDepth(geom,1)
    End If

Function

dSpaceCollide(space,world,group)
Parameters

Space = Space ID (Integer)
World = World ID (Integer)
Group = Joint Contact Group ID (Integer)
Description

Performs collision detection of all geoms in the top level simulation space, including any sub-spaces. This function should be called prior to stepping the simulation with dWorldQuickStep() or dWorldStep(). More information about this function can be found in the Collision Detection section of the official ODE documentation. The parameters of the ODE version of this function are different to the JV-ODE version, however it works in an identical manner.
Returns

None

Function

dSpaceCollide2(geom1,geom2,world,group)
Parameters

Geom1 = Geom ID (Integer) / Space ID (Integer)
Geom2 = Geom ID (Integer) / Space ID (Integer)
World = World ID (Integer)
Group = Joint Contact Group ID (Integer)
Description

Performs collision detection between two geoms or spaces. This function should be called prior to stepping the simulation with dWorldQuickStep() or dWorldStep(). More information about this function can be found in the Collision Detection section of the official ODE documentation. The parameters of the ODE version of this function are different to the JV-ODE version, however it works in an identical manner.
Returns

None
Internal Collision Functions
Function

dSetInternalSpaceCollideMode(mode)
Parameters

Mode = Collide Mode (Integer): 0 = Disabled 1 = Enabled - Default: 1
Description

Sets the internal space collide mode used in multiple space simulations. Disabling the internal space collide mode will prevent collision detection between any geoms that occupy the same sub-space. Geom collisions in the top level space remain unaffected and will collide normally with all sub-space geoms.

For example, if a terrain is created using several overlapping static TriMeshes, a significant slowdown in the simulation will be experienced. The reason for the slowdown is due to the TriMeshes colliding with each other and generating a large number of collision contacts. The same applies if the TriMeshes are in contact with a ground plane. It takes ODE a long time to process all of these collision contacts, hence the slowdown experienced. The solution is to place all of the static TriMeshes (and the ground plane if used) into their own sub-space and to disable the internal space collide mode, then no collision contacts will be generated between them and the performance of the simulation will be unhindered. All geoms located in other sub-spaces or in the top level space will still collide normally with the static TriMeshes.
Returns

None

Function

dGetInternalSpaceCollideMode()
Parameters

None
Description

Returns the current internal space collide mode used in multiple space simulations.
Returns

Collide Mode (Integer): 0 = Disabled 1 = Enabled

Function

dSetInternalContactSurfaceMode(mode)
Parameters

Mode = Contact Surface Mode (Integer): 0 = Mean 1 = Maximum 2 = Minimum - Default: 0
Description

Sets the contact surface mode used when contact joints are created during a collision.

When two geoms collide with the surface contact mode set to Mean (0), their surface contact properties are combined and then averaged. For example:

TotalGeomBounce=(Geom1Bounce+Geom2Bounce)/2

When two geoms collide with the surface contact mode set to Maximum (1), their surface contact properties are compared and only the highest property is used, the lowest property is discarded. For example:

TotalGeomBounce=*Geom1Bounce Or *Geom2Bounce (* = whichever is higher)

When two geoms collide with the surface contact mode set to Minimum (2), their surface contact properties are compared and only the lowest property is used, the highest property is discarded. For example:

TotalGeomBounce=*Geom1Bounce Or *Geom2Bounce (* = whichever is lower)
Returns

None

Function

dGetInternalContactSurfaceMode()
Parameters

None
Description

Returns the current internal contact surface mode.
Returns

Contact Surface Mode (Integer): 0 = Mean 1 = Maximum 2 = Minimum
Misc Functions
Function

dVectorW()
Parameters

None
Description

Returns the current W vector filled by the JV-ODE Vector Functions.
Returns

JV-ODE W Vector Element (Float)

Function

dVectorX()
Parameters

None
Description

Returns the current X vector filled by the JV-ODE Vector Functions.
Returns

JV-ODE X Vector Element (Float)

Function

dVectorY()
Parameters

None
Description

Returns the current Y vector filled by the JV-ODE Vector Functions.
Returns

JV-ODE Y Vector Element (Float)

Function

dVectorZ()
Parameters

None
Description

Returns the current Z vector filled by the JV-ODE Vector Functions.
Returns

JV-ODE Z Vector Element (Float)

Function

dGetVersion()
Parameters

None
Description

Returns the JV-ODE DLL Version number.
Returns

JV-ODE DLL Version (Float)

Function

dRegisterODE(key1,key2,key3,key4)
Parameters

Key1 = JV-ODE Registration Key 1 (Integer)
Key2 = JV-ODE Registration Key 2 (Integer)
Key3 = JV-ODE Registration Key 3 (Integer)
Key4 = JV-ODE Registration Key 4 (Integer)
Description

Initialises the JV-ODE DLL. The function is called from within the 'JV-ODE.bb' include file, it isn't necessary for the user to call this function elsewhere in their program. The JV-ODE registration keys and all other contents of the 'JV-ODE.bb' include file must always be kept strictly confidential. If the JV-ODE DLL is not initialised, an error will occur.
Returns

None

JV-ODE Vector Functions

World Functions
Function

dWorldGetGravity(world)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dWorldGetGravity(world)
GravityX#=dVectorX()
GravityY#=dVectorY()
GravityZ#=dVectorZ()

Function

dWorldImpulseToForce(world,stepsize#,ix#,iy#,iz#)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dWorldImpulseToForce(world,stepsize#,ix#,iy#,iz#)
VectorForceX#=dVectorX()
VectorForceY#=dVectorY()
VectorForceZ#=dVectorZ()
Space Functions
Function

dHashSpaceGetLevels(space)
Vectors Used

dVectorX()
dVectorY()
Example

dHashSpaceGetLevels(space)
MinLevel#=dVectorX()
MaxLevel#=dVectorY()
Rigid Body Functions
Function

dBodyGetPosition(body)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dBodyGetPosition(body)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dBodyGetRotation(body)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dBodyGetRotation(body)
Pitch#=dVectorX()
Yaw#=dVectorY()
Roll#=dVectorZ()

Function

dBodyGetQuaternion(body)
Vectors Used

dVectorW()
dVectorX()
dVectorY()
dVectorZ()
Example

dBodyGetQuaternion(body)
QuatW#=dVectorW()
QuatX#=dVectorX()
QuatY#=dVectorY()
QuatZ#=dVectorZ()

Function

dBodyGetAxisAngle(body)
Vectors Used

dVectorW()
dVectorX()
dVectorY()
dVectorZ()
Example

dBodyGetAxisAngle(body)
Angle#=dVectorW()
RX#=dVectorX()
RY#=dVectorY()
RZ#=dVectorZ()

Function

dBodyGetLinearVel(body)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dBodyGetLinearVel(body)
LVelX#=dVectorX()
LVelY#=dVectorY()
LVelZ#=dVectorZ()

Function

dBodyGetAngularVel(body)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dBodyGetAngularVel(body)
AVelX#=dVectorX()
AVelY#=dVectorY()
AVelZ#=dVectorZ()

Function

dBodyGetForce(body)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dBodyGetForce(body)
ForceX#=dVectorX()
ForceY#=dVectorY()
ForceZ#=dVectorZ()

Function

dBodyGetTorque(body)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dBodyGetTorque(body)
TorqueX#=dVectorX()
TorqueY#=dVectorY()
TorqueZ#=dVectorZ()

Function

dBodyGetRelPointPos(body,px#,py#,pz#)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dBodyGetRelPointPos(body,px#,py#,pz#)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dBodyGetRelPointVel(body,px#,py#,pz#)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dBodyGetRelPointVel(body,px#,py#,pz#)
VelX#=dVectorX()
VelY#=dVectorY()
VelZ#=dVectorZ()

Function

dBodyGetPointVel(body,px#,py#,pz#)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dBodyGetPointVel(body,px#,py#,pz#)
VelX#=dVectorX()
VelY#=dVectorY()
VelZ#=dVectorZ()

Function

dBodyGetPosRelPoint(body,px#,py#,pz#)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dBodyGetPosRelPoint(body,px#,py#,pz#)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dBodyVectorToWorld(body,px#,py#,pz#)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dBodyVectorToWorld(body,px#,py#,pz#)
VecX#=dVectorX()
VecY#=dVectorY()
VecZ#=dVectorZ()

Function

dBodyVectorFromWorld(body,px#,py#,pz#)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dBodyVectorFromWorld(body,px#,py#,pz#)
VecX#=dVectorX()
VecY#=dVectorY()
VecZ#=dVectorZ()

Function

dBodyGetFiniteRotationAxis(body)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dBodyGetFiniteRotationAxis(body)
RotAX#=dVectorX()
RotAY#=dVectorY()
RotAZ#=dVectorZ()
Geom Functions
Function

dGeomGetPosition(geom)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dGeomGetPosition(geom)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dGeomGetRotation(geom)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dGeomGetRotation(geom)
Pitch#=dVectorX()
Yaw#=dVectorY()
Roll#=dVectorZ()

Function

dGeomGetQuaternion(geom)
Vectors Used

dVectorW()
dVectorX()
dVectorY()
dVectorZ()
Example

dGeomGetQuaternion(geom)
QuatW#=dVectorW()
QuatX#=dVectorX()
QuatY#=dVectorY()
QuatZ#=dVectorZ()

Function

dGeomGetAxisAngle(geom)
Vectors Used

dVectorW()
dVectorX()
dVectorY()
dVectorZ()
Example

dGeomGetAxisAngle(geom)
Angle#=dVectorW()
RX#=dVectorX()
RY#=dVectorY()
RZ#=dVectorZ()

Function

dGeomGetAABBMin(geom)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dGeomGetAABBMin(geom)
MinX#=dVectorX()
MinY#=dVectorY()
MinZ#=dVectorZ()

Function

dGeomGetAABBMax(geom)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dGeomGetAABBMax(geom)
MaxX#=dVectorX()
MaxY#=dVectorY()
MaxZ#=dVectorZ()

Function

dGeomBoxGetLengths(box)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dGeomBoxGetLengths(box)
LenX#=dVectorX()
LenY#=dVectorY()
LenZ#=dVectorZ()

Function

dGeomPlaneGetParams(plane)
Vectors Used

dVectorW()
dVectorX()
dVectorY()
dVectorZ()
Example

dGeomPlaneGetParams(plane)
PlaneA#=dVectorW()
PlaneB#=dVectorX()
PlaneC#=dVectorY()
PlaneD#=dVectorZ()

Function

dGeomCylinderGetParams(cylinder)
Vectors Used

dVectorX()
dVectorY()
Example

dGeomCylinderGetParams(cylinder)
Radius#=dVectorX()
Length#=dVectorY()

Function

dGeomCCylinderGetParams(ccylinder)
Vectors Used

dVectorX()
dVectorY()
Example

dGeomCCylinderGetParams(ccylinder)
Radius#=dVectorX()
Length#=dVectorY()

Function

dGeomRayGetStart(ray)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dGeomRayGetStart(ray)
StartXPos#=dVectorX()
StartYPos#=dVectorY()
StartZPos#=dVectorZ()

Function

dGeomRayGetDir(ray)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dGeomRayGetDir(ray)
DirX#=dVectorX()
DirY#=dVectorY()
DirZ#=dVectorZ()

Function

dGeomGetOffsetPosition(geom)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dGeomGetOffsetPosition(geom)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dGeomGetOffsetRotation(geom)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dGeomGetOffsetRotation(geom)
Pitch#=dVectorX()
Yaw#=dVectorY()
Roll#=dVectorZ()

Function

dGeomGetOffsetQuaternion(geom)
Vectors Used

dVectorW()
dVectorX()
dVectorY()
dVectorZ()
Example

dGeomGetOffsetQuaternion(geom)
QuatW#=dVectorW()
QuatX#=dVectorX()
QuatY#=dVectorY()
QuatZ#=dVectorZ()

Function

dGeomCapsuleGetParams(capsule)
Vectors Used

dVectorX()
dVectorY()
Example

dGeomCapsuleGetParams(capsule)
Radius#=dVectorX()
Length#=dVectorY()

Function

dGeomGetOffsetAxisAngle(geom)
Vectors Used

dVectorW()
dVectorX()
dVectorY()
dVectorZ()
Example

dGeomGetOffsetAxisAngle(geom)
Angle#=dVectorW()
RX#=dVectorX()
RY#=dVectorY()
RZ#=dVectorZ()
Joint Functions
Function

dJointGetFeedbackForce1(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetFeedbackForce1(joint)
Force1X#=dVectorX()
Force1Y#=dVectorY()
Force1Z#=dVectorZ()

Function

dJointGetFeedbackTorque1(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetFeedbackTorque1(joint)
Torque1X#=dVectorX()
Torque1Y#=dVectorY()
Torque1Z#=dVectorZ()

Function

dJointGetFeedbackForce2(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetFeedbackForce2(joint)
Force2X#=dVectorX()
Force2Y#=dVectorY()
Force2Z#=dVectorZ()

Function

dJointGetFeedbackTorque2(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetFeedbackTorque2(joint)
Torque2X#=dVectorX()
Torque2Y#=dVectorY()
Torque2Z#=dVectorZ()

Function

dJointGetBallAnchor(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetBallAnchor(joint)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dJointGetBallAnchor2(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetBallAnchor2(joint)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dJointGetHingeAnchor(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetHingeAnchor(joint)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dJointGetHingeAnchor2(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetHingeAnchor2(joint)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dJointGetHingeAxis(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetHingeAxis(joint)
AxisX#=dVectorX()
AxisY#=dVectorY()
AxisZ#=dVectorZ()

Function

dJointGetSliderAxis(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetSliderAxis(joint)
AxisX#=dVectorX()
AxisY#=dVectorY()
AxisZ#=dVectorZ()

Function

dJointGetUniversalAnchor(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetUniversalAnchor(joint)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dJointGetUniversalAnchor2(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetUniversalAnchor2(joint)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dJointGetUniversalAxis1(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetUniversalAxis1(joint)
Axis1X#=dVectorX()
Axis1Y#=dVectorY()
Axis1Z#=dVectorZ()

Function

dJointGetUniversalAxis2(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetUniversalAxis2(joint)
Axis2X#=dVectorX()
Axis2Y#=dVectorY()
Axis2Z#=dVectorZ()

Function

dJointGetUniversalAngles(joint)
Vectors Used

dVectorX()
dVectorY()
Example

dJointGetUniversalAngles(joint)
Angle1#=dVectorX()
Angle2#=dVectorY()

Function

dJointGetHinge2Anchor(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetHinge2Anchor(joint)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dJointGetHinge2Anchor2(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetHinge2Anchor2(joint)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dJointGetHinge2Axis1(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetHinge2Axis1(joint)
Axis1X#=dVectorX()
Axis1Y#=dVectorY()
Axis1Z#=dVectorZ()

Function

dJointGetHinge2Axis2(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetHinge2Axis2(joint)
Axis2X#=dVectorX()
Axis2Y#=dVectorY()
Axis2Z#=dVectorZ()

Function

dJointGetAMotorAxis(joint,num)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetAMotorAxis(joint,num)
AxisX#=dVectorX()
AxisY#=dVectorY()
AxisZ#=dVectorZ()

Function

dJointGetLMotorAxis(joint,anum)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetLMotorAxis(joint,anum)
AxisX#=dVectorX()
AxisY#=dVectorY()
AxisZ#=dVectorZ()

Function

dJointGetPRAnchor(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetPRAnchor(joint)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dJointGetPRAxis1(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetPRAxis1(joint)
AxisX#=dVectorX()
AxisY#=dVectorY()
AxisZ#=dVectorZ()

Function

dJointGetPRAxis2(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetPRAxis2(joint)
AxisX#=dVectorX()
AxisY#=dVectorY()
AxisZ#=dVectorZ()

Function

dJointGetPUAnchor(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetPUAnchor(joint)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dJointGetPUAxis1(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetPUAxis1(joint)
AxisX#=dVectorX()
AxisY#=dVectorY()
AxisZ#=dVectorZ()

Function

dJointGetPUAxis2(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetPUAxis2(joint)
AxisX#=dVectorX()
AxisY#=dVectorY()
AxisZ#=dVectorZ()

Function

dJointGetPUAxis3(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetPUAxis3(joint)
AxisX#=dVectorX()
AxisY#=dVectorY()
AxisZ#=dVectorZ()

Function

dJointGetPUAxisP(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetPUAxisP(joint)
AxisX#=dVectorX()
AxisY#=dVectorY()
AxisZ#=dVectorZ()

Function

dJointGetPUAngles(joint)
Vectors Used

dVectorX()
dVectorY()
Example

dJointGetPUAngles(joint)
Angle1#=dVectorX()
Angle2#=dVectorY()

Function

dJointGetPistonAnchor(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetPistonAnchor(joint)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dJointGetPistonAnchor2(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetPistonAnchor2(joint)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()

Function

dJointGetPistonAxis(joint)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dJointGetPistonAxis(joint)
AxisX#=dVectorX()
AxisY#=dVectorY()
AxisZ#=dVectorZ()
Mass Functions
Function

dMassCenter(mass)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dMassCenter(mass)
XPos#=dVectorX()
YPos#=dVectorY()
ZPos#=dVectorZ()
Collision Functions
Function

dContactGetFDir1()
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dContactGetFDir1()
FDir1X#=dVectorX()
FDir1Y#=dVectorY()
FDir1Z#=dVectorZ()

Function

dGeomContactGetFDir1(geom)
Vectors Used

dVectorX()
dVectorY()
dVectorZ()
Example

dGeomContactGetFDir1(geom)
FDir1X#=dVectorX()
FDir1Y#=dVectorY()
FDir1Z#=dVectorZ()
Copyright © 2008 - Jim Williams