org.ode4j.cpp.internal
Class ApiCppWorld
java.lang.Object
org.ode4j.cpp.internal.ApiCppTimer
org.ode4j.cpp.internal.ApiCppCollisionTrimesh
org.ode4j.cpp.internal.ApiCppCollisionSpace
org.ode4j.cpp.internal.ApiCppCollision
org.ode4j.cpp.internal.ApiCppExportDIF
org.ode4j.cpp.internal.ApiCppOdeInit
org.ode4j.cpp.internal.ApiCppMass
org.ode4j.cpp.internal.ApiCppOther
org.ode4j.cpp.internal.ApiCppJoint
org.ode4j.cpp.internal.ApiCppBody
org.ode4j.cpp.internal.ApiCppWorld
- Direct Known Subclasses:
- OdeCpp
public abstract class ApiCppWorld
- extends ApiCppBody
Fields inherited from class org.ode4j.cpp.internal.ApiCppJoint |
dAMotorEuler, dAMotorUser, dParamBounce, dParamBounce1, dParamBounce2, dParamBounce3, dParamCFM, dParamCFM1, dParamCFM2, dParamCFM3, dParamERP, dParamERP1, dParamERP2, dParamERP3, dParamFMax, dParamFMax1, dParamFMax2, dParamFMax3, dParamFudgeFactor, dParamFudgeFactor1, dParamFudgeFactor2, dParamFudgeFactor3, dParamGroup, dParamGroup1, dParamGroup2, dParamGroup3, dParamHiStop, dParamHiStop1, dParamHiStop2, dParamHiStop3, dParamLoStop, dParamLoStop1, dParamLoStop2, dParamLoStop3, dParamStopCFM, dParamStopCFM1, dParamStopCFM2, dParamStopCFM3, dParamStopERP, dParamStopERP1, dParamStopERP2, dParamStopERP3, dParamSuspensionCFM, dParamSuspensionCFM1, dParamSuspensionCFM2, dParamSuspensionCFM3, dParamSuspensionERP, dParamSuspensionERP1, dParamSuspensionERP2, dParamSuspensionERP3, dParamVel, dParamVel1, dParamVel2, dParamVel3 |
Method Summary |
static DWorld |
dWorldCreate()
|
static void |
dWorldDestroy(DWorld world)
|
static double |
dWorldGetAngularDamping(DWorld w)
|
static double |
dWorldGetAngularDampingThreshold(DWorld w)
|
static double |
dWorldGetAutoDisableAngularAverageThreshold(DWorld w)
|
static double |
dWorldGetAutoDisableAngularThreshold(DWorld w)
|
static int |
dWorldGetAutoDisableAverageSamplesCount(DWorld w)
|
static boolean |
dWorldGetAutoDisableFlag(DWorld w)
|
static double |
dWorldGetAutoDisableLinearAverageThreshold(DWorld w)
|
static double |
dWorldGetAutoDisableLinearThreshold(DWorld w)
|
static int |
dWorldGetAutoDisableSteps(DWorld w)
|
static double |
dWorldGetAutoDisableTime(DWorld w)
|
static double |
dWorldGetCFM(DWorld w)
|
static double |
dWorldGetContactMaxCorrectingVel(DWorld w)
|
static double |
dWorldGetContactSurfaceLayer(DWorld w)
|
static double |
dWorldGetERP(DWorld w)
|
static void |
dWorldGetGravity(DWorld w,
DVector3 gravity)
|
static double |
dWorldGetLinearDamping(DWorld w)
|
static double |
dWorldGetLinearDampingThreshold(DWorld w)
|
static double |
dWorldGetMaxAngularSpeed(DWorld w)
|
static int |
dWorldGetQuickStepNumIterations(DWorld w)
|
static double |
dWorldGetQuickStepW(DWorld w)
|
static void |
dWorldImpulseToForce(DWorld w,
double stepsize,
double ix,
double iy,
double iz,
DVector3 force)
|
static void |
dWorldQuickStep(DWorld w,
double stepsize)
|
static void |
dWorldSetAngularDamping(DWorld w,
double scale)
|
static void |
dWorldSetAngularDampingThreshold(DWorld w,
double threshold)
|
static void |
dWorldSetAutoDisableAngularAverageThreshold(DWorld w,
double angular_average_threshold)
|
static void |
dWorldSetAutoDisableAngularThreshold(DWorld w,
double angular_threshold)
|
static void |
dWorldSetAutoDisableAverageSamplesCount(DWorld w,
int average_samples_count)
|
static void |
dWorldSetAutoDisableFlag(DWorld w,
boolean do_auto_disable)
|
static void |
dWorldSetAutoDisableLinearAverageThreshold(DWorld w,
double linear_average_threshold)
|
static void |
dWorldSetAutoDisableLinearThreshold(DWorld w,
double linear_threshold)
|
static void |
dWorldSetAutoDisableSteps(DWorld w,
int steps)
|
static void |
dWorldSetAutoDisableTime(DWorld w,
double time)
|
static void |
dWorldSetCFM(DWorld w,
double cfm)
|
static void |
dWorldSetContactMaxCorrectingVel(DWorld w,
double vel)
|
static void |
dWorldSetContactSurfaceLayer(DWorld w,
double depth)
|
static void |
dWorldSetDamping(DWorld w,
double linear_scale,
double angular_scale)
|
static void |
dWorldSetERP(DWorld w,
double erp)
|
static void |
dWorldSetGravity(DWorld w,
double x,
double y,
double z)
|
static void |
dWorldSetLinearDamping(DWorld w,
double scale)
|
static void |
dWorldSetLinearDampingThreshold(DWorld w,
double threshold)
|
static void |
dWorldSetMaxAngularSpeed(DWorld w,
double max_speed)
|
static void |
dWorldSetQuickStepNumIterations(DWorld w,
int num)
|
static void |
dWorldSetQuickStepW(DWorld w,
double over_relaxation)
|
static void |
dWorldStep(DWorld w,
double stepsize)
|
Methods inherited from class org.ode4j.cpp.internal.ApiCppBody |
dBodyAddForce, dBodyAddForceAtPos, dBodyAddForceAtRelPos, dBodyAddRelForce, dBodyAddRelForceAtPos, dBodyAddRelForceAtRelPos, dBodyAddRelTorque, dBodyAddTorque, dBodyCopyPosition, dBodyCopyQuaternion, dBodyCopyRotation, dBodyCreate, dBodyDestroy, dBodyDisable, dBodyEnable, dBodyGetAngularDamping, dBodyGetAngularDampingThreshold, dBodyGetAngularVel, dBodyGetAutoDisableAngularThreshold, dBodyGetAutoDisableAverageSamplesCount, dBodyGetAutoDisableFlag, dBodyGetAutoDisableLinearThreshold, dBodyGetAutoDisableSteps, dBodyGetAutoDisableTime, dBodyGetData, dBodyGetFiniteRotationAxis, dBodyGetFiniteRotationMode, dBodyGetForce, dBodyGetGravityMode, dBodyGetGyroscopicMode, dBodyGetJoint, dBodyGetLinearDamping, dBodyGetLinearDampingThreshold, dBodyGetLinearVel, dBodyGetMass, dBodyGetMaxAngularSpeed, dBodyGetNumJoints, dBodyGetPointVel, dBodyGetPosition, dBodyGetPosRelPoint, dBodyGetQuaternion, dBodyGetRelPointPos, dBodyGetRelPointVel, dBodyGetRotation, dBodyGetTorque, dBodyGetWorld, dBodyIsEnabled, dBodyIsKinematic, dBodySetAngularDamping, dBodySetAngularDampingThreshold, dBodySetAngularVel, dBodySetAutoDisableAngularThreshold, dBodySetAutoDisableAverageSamplesCount, dBodySetAutoDisableDefaults, dBodySetAutoDisableFlag, dBodySetAutoDisableLinearThreshold, dBodySetAutoDisableSteps, dBodySetAutoDisableTime, dBodySetDamping, dBodySetDampingDefaults, dBodySetData, dBodySetDynamic, dBodySetFiniteRotationAxis, dBodySetFiniteRotationMode, dBodySetForce, dBodySetGravityMode, dBodySetGyroscopicMode, dBodySetKinematic, dBodySetLinearDamping, dBodySetLinearDampingThreshold, dBodySetLinearVel, dBodySetMass, dBodySetMaxAngularSpeed, dBodySetPosition, dBodySetQuaternion, dBodySetRotation, dBodySetTorque, dBodyVectorFromWorld, dBodyVectorToWorld |
Methods inherited from class org.ode4j.cpp.internal.ApiCppJoint |
dConnectingJoint, dJointAddAMotorTorques, dJointAddHinge2Torques, dJointAddHingeTorque, dJointAddPistonForce, dJointAddPRTorque, dJointAddSliderForce, dJointAddUniversalTorques, dJointAttach, dJointCreateAMotor, dJointCreateBall, dJointCreateContact, dJointCreateFeedback, dJointCreateFixed, dJointCreateHinge, dJointCreateHinge2, dJointCreateLMotor, dJointCreateNull, dJointCreatePiston, dJointCreatePlane2D, dJointCreatePR, dJointCreatePU, dJointCreateSlider, dJointCreateUniversal, dJointDisable, dJointEnable, dJointGetAMotorAngle, dJointGetAMotorAngleRate, dJointGetAMotorAxis, dJointGetAMotorAxisRel, dJointGetAMotorMode, dJointGetAMotorNumAxes, dJointGetAMotorParam, dJointGetBallAnchor, dJointGetBallAnchor2, dJointGetBallParam, dJointGetBody, dJointGetData, dJointGetFeedback, dJointGetFixedParam, dJointGetHinge2Anchor, dJointGetHinge2Anchor2, dJointGetHinge2Angle1, dJointGetHinge2Angle1Rate, dJointGetHinge2Angle2Rate, dJointGetHinge2Axis1, dJointGetHinge2Axis2, dJointGetHinge2Param, dJointGetHingeAnchor, dJointGetHingeAnchor2, dJointGetHingeAngle, dJointGetHingeAngleRate, dJointGetHingeAxis, dJointGetHingeParam, dJointGetLMotorAxis, dJointGetLMotorNumAxes, dJointGetLMotorParam, dJointGetNumBodies, dJointGetPistonAnchor, dJointGetPistonAnchor2, dJointGetPistonAngle, dJointGetPistonAngleRate, dJointGetPistonAxis, dJointGetPistonParam, dJointGetPistonPosition, dJointGetPistonPositionRate, dJointGetPRAnchor, dJointGetPRAngle, dJointGetPRAngleRate, dJointGetPRAxis1, dJointGetPRAxis2, dJointGetPRParam, dJointGetPRPosition, dJointGetPRPositionRate, dJointGetPUAnchor, dJointGetPUAngle1, dJointGetPUAngle1Rate, dJointGetPUAngle2, dJointGetPUAngle2Rate, dJointGetPUAngles, dJointGetPUAxis1, dJointGetPUAxis2, dJointGetPUAxis3, dJointGetPUAxisP, dJointGetPUParam, dJointGetPUPosition, dJointGetPUPositionRate, dJointGetSliderAxis, dJointGetSliderParam, dJointGetSliderPosition, dJointGetSliderPositionRate, dJointGetUniversalAnchor, dJointGetUniversalAnchor2, dJointGetUniversalAngle1, dJointGetUniversalAngle1Rate, dJointGetUniversalAngle2, dJointGetUniversalAngle2Rate, dJointGetUniversalAngles, dJointGetUniversalAxis1, dJointGetUniversalAxis2, dJointGetUniversalParam, dJointGroupCreate, dJointGroupDestroy, dJointGroupEmpty, dJointIsEnabled, dJointSetAMotorAngle, dJointSetAMotorAxis, dJointSetAMotorMode, dJointSetAMotorNumAxes, dJointSetAMotorParam, dJointSetBallAnchor, dJointSetBallAnchor2, dJointSetBallParam, dJointSetData, dJointSetFeedback, dJointSetFixed, dJointSetFixedParam, dJointSetHinge2Anchor, dJointSetHinge2Axis1, dJointSetHinge2Axis2, dJointSetHinge2Param, dJointSetHingeAnchor, dJointSetHingeAxis, dJointSetHingeAxisOffset, dJointSetHingeParam, dJointSetLMotorAxis, dJointSetLMotorNumAxes, dJointSetLMotorParam, dJointSetPistonAnchor, dJointSetPistonAnchorOffset, dJointSetPistonAxis, dJointSetPistonParam, dJointSetPlane2DAngleParam, dJointSetPlane2DXParam, dJointSetPlane2DYParam, dJointSetPRAnchor, dJointSetPRAxis1, dJointSetPRAxis2, dJointSetPRParam, dJointSetPUAnchor, dJointSetPUAnchorOffset, dJointSetPUAxis1, dJointSetPUAxis2, dJointSetPUAxis3, dJointSetPUAxisP, dJointSetPUParam, dJointSetSliderAxis, dJointSetSliderAxisDelta, dJointSetSliderParam, dJointSetUniversalAnchor, dJointSetUniversalAxis1, dJointSetUniversalAxis1Offset, dJointSetUniversalAxis2, dJointSetUniversalAxis2Offset, dJointSetUniversalParam |
Methods inherited from class org.ode4j.cpp.internal.ApiCppMass |
dMassAdd, dMassAdjust, dMassCheck, dMassCreate, dMassRotate, dMassSetBox, dMassSetBoxTotal, dMassSetCapsule, dMassSetCapsuleTotal, dMassSetCylinder, dMassSetCylinderTotal, dMassSetParameters, dMassSetSphere, dMassSetSphereTotal, dMassSetTrimesh, dMassSetTrimeshTotal, dMassSetZero, dMassTranslate |
Methods inherited from class org.ode4j.cpp.internal.ApiCppCollision |
dBoxBox, dBoxTouchesBox, dCollide, dCreateBox, dCreateCapsule, dCreateConvex, dCreateCylinder, dCreateGeomTransform, dCreateHeightfield, dCreatePlane, dCreateRay, dCreateSphere, dGeomBoxGetLengths, dGeomBoxPointDepth, dGeomBoxSetLengths, dGeomCapsuleGetParams, dGeomCapsulePointDepth, dGeomCapsuleSetParams, dGeomClearOffset, dGeomCopyOffsetPosition, dGeomCopyOffsetRotation, dGeomCopyPosition, dGeomCopyRotation, dGeomCylinderGetParams, dGeomCylinderSetParams, dGeomDestroy, dGeomDisable, dGeomEnable, dGeomGetAABB, dGeomGetBody, dGeomGetCategoryBits, dGeomGetClass, dGeomGetCollideBits, dGeomGetData, dGeomGetOffsetPosition, dGeomGetOffsetQuaternion, dGeomGetOffsetRotation, dGeomGetPosition, dGeomGetQuaternion, dGeomGetRotation, dGeomGetSpace, dGeomHeightfieldDataBuildByte, dGeomHeightfieldDataBuildCallback, dGeomHeightfieldDataCreate, dGeomHeightfieldDataDestroy, dGeomHeightfieldDataSetBounds, dGeomHeightfieldGetHeightfieldData, dGeomHeightfieldSetHeightfieldData, dGeomIsEnabled, dGeomIsOffset, dGeomIsSpace, dGeomPlaneGetParams, dGeomPlanePointDepth, dGeomPlaneSetParams, dGeomRayGet, dGeomRayGetClosestHit, dGeomRayGetLength, dGeomRayGetParams, dGeomRaySet, dGeomRaySetClosestHit, dGeomRaySetLength, dGeomRaySetParams, dGeomSetBody, dGeomSetCategoryBits, dGeomSetCollideBits, dGeomSetConvex, dGeomSetData, dGeomSetOffsetPosition, dGeomSetOffsetQuaternion, dGeomSetOffsetRotation, dGeomSetOffsetWorldPosition, dGeomSetOffsetWorldQuaternion, dGeomSetOffsetWorldRotation, dGeomSetPosition, dGeomSetQuaternion, dGeomSetRotation, dGeomSphereGetRadius, dGeomSpherePointDepth, dGeomSphereSetRadius, dGeomTransformGetGeom, dGeomTransformSetCleanup, dGeomTransformSetGeom, dSetColliderOverride, dSpaceCollide, dSpaceCollide2 |
Methods inherited from class org.ode4j.cpp.internal.ApiCppCollisionSpace |
dHashSpaceCreate, dHashSpaceGetLevels, dHashSpaceSetLevels, dQuadTreeSpaceCreate, dSimpleSpaceCreate, dSpaceAdd, dSpaceClean, dSpaceDestroy, dSpaceGetCleanup, dSpaceGetGeom, dSpaceGetManualCleanup, dSpaceGetNumGeoms, dSpaceGetSublevel, dSpaceQuery, dSpaceRemove, dSpaceSetCleanup, dSpaceSetManualCleanup, dSpaceSetSublevel, dSweepAndPruneSpaceCreate |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ApiCppWorld
public ApiCppWorld()
dWorldCreate
public static DWorld dWorldCreate()
- Returns:
- an identifier
- Brief:
- Create a new, empty world and return its ID number.
dWorldDestroy
public static void dWorldDestroy(DWorld world)
- Parameters:
world
- the identifier for the world the be destroyed.- Brief:
- Destroy a world and everything in it.
This includes all bodies, and all joints that are not part of a joint
group. Joints that are part of a joint group will be deactivated, and
can be destroyed by calling, for example, dJointGroupEmpty().
dWorldSetGravity
public static void dWorldSetGravity(DWorld w,
double x,
double y,
double z)
- Brief:
- Set the world's global gravity vector.
The units are m/s^2, so Earth's gravity vector would be (0,0,-9.81),
assuming that +z is up. The default is no gravity, i.e. (0,0,0).
dWorldGetGravity
public static void dWorldGetGravity(DWorld w,
DVector3 gravity)
- Brief:
- Get the gravity vector for a given world.
dWorldSetERP
public static void dWorldSetERP(DWorld w,
double erp)
- Parameters:
w
- the identifier of the world.erp
- Typical values are in the range 0.1--0.8. The default is 0.2.- Brief:
- Set the global ERP value, that controls how much error
correction is performed in each time step.
dWorldGetERP
public static double dWorldGetERP(DWorld w)
- Returns:
- ERP value
- Brief:
- Get the error reduction parameter.
dWorldSetCFM
public static void dWorldSetCFM(DWorld w,
double cfm)
- Parameters:
cfm
- Typical values are in the range @m{10^{-9}} -- 1.
The default is 10^-5 if single precision is being used, or 10^-10
if double precision is being used.- Brief:
- Set the global CFM (constraint force mixing) value.
dWorldGetCFM
public static double dWorldGetCFM(DWorld w)
- Returns:
- CFM value
- Brief:
- Get the constraint force mixing value.
dWorldStep
public static void dWorldStep(DWorld w,
double stepsize)
- Parameters:
stepsize
- The number of seconds that the simulation has to advance.- Brief:
- Step the world.
This uses a "big matrix" method that takes time on the order of m^3
and memory on the order of m^2, where m is the total number of constraint
rows. For large systems this will use a lot of memory and can be very slow,
but this is currently the most accurate method.
dWorldImpulseToForce
public static void dWorldImpulseToForce(DWorld w,
double stepsize,
double ix,
double iy,
double iz,
DVector3 force)
- Brief:
- Converts an impulse to a force.
- Remark:
- If you want to apply a linear or angular impulse to a rigid body,
instead of a force or a torque, then you can use this function to convert
the desired impulse into a force/torque vector before calling the
BodyAdd... function.
The current algorithm simply scales the impulse by 1/stepsize,
where stepsize is the step size for the next step that will be taken.
This function is given a dWorld because, in the future, the force
computation may depend on integrator parameters that are set as
properties of the world.
dWorldQuickStep
public static void dWorldQuickStep(DWorld w,
double stepsize)
- Brief:
- Step the world.
- Remark:
- This uses an iterative method that takes time on the order of m*N
and memory on the order of m, where m is the total number of constraint
rows N is the number of iterations.
For large systems this is a lot faster than dWorldStep(),
but it is less accurate., QuickStep is great for stacks of objects especially when the
auto-disable feature is used as well.
However, it has poor accuracy for near-singular systems.
Near-singular systems can occur when using high-friction contacts, motors,
or certain articulated structures. For example, a robot with multiple legs
sitting on the ground may be near-singular., There are ways to help overcome QuickStep's inaccuracy problems:
\li Increase CFM.
\li Reduce the number of contacts in your system (e.g. use the minimum
number of contacts for the feet of a robot or creature).
\li Don't use excessive friction in the contacts.
\li Use contact slip if appropriate
\li Avoid kinematic loops (however, kinematic loops are inevitable in
legged creatures).
\li Don't use excessive motor strength.
\liUse force-based motors instead of velocity-based motors.
Increasing the number of QuickStep iterations may help a little bit, but
it is not going to help much if your system is really near singular.
dWorldSetQuickStepNumIterations
public static void dWorldSetQuickStepNumIterations(DWorld w,
int num)
- Parameters:
num
- The default is 20 iterations.- Brief:
- Set the number of iterations that the QuickStep method performs per
step.
- Remark:
- More iterations will give a more accurate solution, but will take
longer to compute.
dWorldGetQuickStepNumIterations
public static int dWorldGetQuickStepNumIterations(DWorld w)
- Returns:
- nr of iterations
- Brief:
- Get the number of iterations that the QuickStep method performs per
step.
dWorldSetQuickStepW
public static void dWorldSetQuickStepW(DWorld w,
double over_relaxation)
- Parameters:
over_relaxation
- value to use by SOR- Brief:
- Set the SOR over-relaxation parameter
dWorldGetQuickStepW
public static double dWorldGetQuickStepW(DWorld w)
- Returns:
- the over-relaxation setting
- Brief:
- Get the SOR over-relaxation parameter
dWorldSetContactMaxCorrectingVel
public static void dWorldSetContactMaxCorrectingVel(DWorld w,
double vel)
- Parameters:
vel
- The default value is infinity (i.e. no limit).- Brief:
- Set the maximum correcting velocity that contacts are allowed
to generate.
- Remark:
- Reducing this value can help prevent "popping" of deeply embedded objects.
dWorldGetContactMaxCorrectingVel
public static double dWorldGetContactMaxCorrectingVel(DWorld w)
- Brief:
- Get the maximum correcting velocity that contacts are allowed
to generated.
dWorldSetContactSurfaceLayer
public static void dWorldSetContactSurfaceLayer(DWorld w,
double depth)
- Parameters:
depth
- The default value is zero.- Brief:
- Set the depth of the surface layer around all geometry objects.
- Remark:
- Contacts are allowed to sink into the surface layer up to the given
depth before coming to rest., Increasing this to some small value (e.g. 0.001) can help prevent
jittering problems due to contacts being repeatedly made and broken.
dWorldGetContactSurfaceLayer
public static double dWorldGetContactSurfaceLayer(DWorld w)
- Returns:
- the depth
- Brief:
- Get the depth of the surface layer around all geometry objects.
dWorldGetAutoDisableLinearThreshold
public static double dWorldGetAutoDisableLinearThreshold(DWorld w)
- Returns:
- the threshold
- Brief:
- Get auto disable linear threshold for newly created bodies.
dWorldSetAutoDisableLinearThreshold
public static void dWorldSetAutoDisableLinearThreshold(DWorld w,
double linear_threshold)
- Parameters:
linear_threshold
- default is 0.01- Brief:
- Set auto disable linear threshold for newly created bodies.
dWorldGetAutoDisableAngularThreshold
public static double dWorldGetAutoDisableAngularThreshold(DWorld w)
- Returns:
- the threshold
- Brief:
- Get auto disable angular threshold for newly created bodies.
dWorldSetAutoDisableAngularThreshold
public static void dWorldSetAutoDisableAngularThreshold(DWorld w,
double angular_threshold)
- Parameters:
angular_threshold
- default is 0.01- Brief:
- Set auto disable angular threshold for newly created bodies.
dWorldGetAutoDisableLinearAverageThreshold
public static double dWorldGetAutoDisableLinearAverageThreshold(DWorld w)
- Returns:
- the threshold
- Brief:
- Get auto disable linear average threshold for newly created bodies.
dWorldSetAutoDisableLinearAverageThreshold
public static void dWorldSetAutoDisableLinearAverageThreshold(DWorld w,
double linear_average_threshold)
- Parameters:
linear_average_threshold
- default is 0.01- Brief:
- Set auto disable linear average threshold for newly created bodies.
dWorldGetAutoDisableAngularAverageThreshold
public static double dWorldGetAutoDisableAngularAverageThreshold(DWorld w)
- Returns:
- the threshold
- Brief:
- Get auto disable angular average threshold for newly created bodies.
dWorldSetAutoDisableAngularAverageThreshold
public static void dWorldSetAutoDisableAngularAverageThreshold(DWorld w,
double angular_average_threshold)
- Parameters:
angular_average_threshold
- default is 0.01- Brief:
- Set auto disable angular average threshold for newly created bodies.
dWorldGetAutoDisableAverageSamplesCount
public static int dWorldGetAutoDisableAverageSamplesCount(DWorld w)
- Returns:
- number of samples used
- Brief:
- Get auto disable sample count for newly created bodies.
dWorldSetAutoDisableAverageSamplesCount
public static void dWorldSetAutoDisableAverageSamplesCount(DWorld w,
int average_samples_count)
- Parameters:
average_samples_count
- Default is 1, meaning only instantaneous velocity is used.
Set to zero to disable sampling and thus prevent any body from auto-disabling.- Brief:
- Set auto disable average sample count for newly created bodies.
dWorldGetAutoDisableSteps
public static int dWorldGetAutoDisableSteps(DWorld w)
- Returns:
- nr of steps
- Brief:
- Get auto disable steps for newly created bodies.
dWorldSetAutoDisableSteps
public static void dWorldSetAutoDisableSteps(DWorld w,
int steps)
- Parameters:
steps
- default is 10- Brief:
- Set auto disable steps for newly created bodies.
dWorldGetAutoDisableTime
public static double dWorldGetAutoDisableTime(DWorld w)
- Returns:
- nr of seconds
- Brief:
- Get auto disable time for newly created bodies.
dWorldSetAutoDisableTime
public static void dWorldSetAutoDisableTime(DWorld w,
double time)
- Parameters:
time
- default is 0 seconds- Brief:
- Set auto disable time for newly created bodies.
dWorldGetAutoDisableFlag
public static boolean dWorldGetAutoDisableFlag(DWorld w)
- Returns:
- 0 or 1
- Brief:
- Get auto disable flag for newly created bodies.
dWorldSetAutoDisableFlag
public static void dWorldSetAutoDisableFlag(DWorld w,
boolean do_auto_disable)
- Parameters:
do_auto_disable
- default is false.- Brief:
- Set auto disable flag for newly created bodies.
dWorldGetLinearDampingThreshold
public static double dWorldGetLinearDampingThreshold(DWorld w)
- Brief:
- Get the world's linear damping threshold.
dWorldSetLinearDampingThreshold
public static void dWorldSetLinearDampingThreshold(DWorld w,
double threshold)
- Parameters:
threshold
- The damping won't be applied if the linear speed is
below this threshold. Default is 0.01.- Brief:
- Set the world's linear damping threshold.
dWorldGetAngularDampingThreshold
public static double dWorldGetAngularDampingThreshold(DWorld w)
- Brief:
- Get the world's angular damping threshold.
dWorldSetAngularDampingThreshold
public static void dWorldSetAngularDampingThreshold(DWorld w,
double threshold)
- Parameters:
threshold
- The damping won't be applied if the angular speed is
below this threshold. Default is 0.01.- Brief:
- Set the world's angular damping threshold.
dWorldGetLinearDamping
public static double dWorldGetLinearDamping(DWorld w)
- Brief:
- Get the world's linear damping scale.
dWorldSetLinearDamping
public static void dWorldSetLinearDamping(DWorld w,
double scale)
- Parameters:
scale
- The linear damping scale that is to be applied to bodies.
Default is 0 (no damping). Should be in the interval [0, 1].- Brief:
- Set the world's linear damping scale.
dWorldGetAngularDamping
public static double dWorldGetAngularDamping(DWorld w)
- Brief:
- Get the world's angular damping scale.
dWorldSetAngularDamping
public static void dWorldSetAngularDamping(DWorld w,
double scale)
- Parameters:
scale
- The angular damping scale that is to be applied to bodies.
Default is 0 (no damping). Should be in the interval [0, 1].- Brief:
- Set the world's angular damping scale.
dWorldSetDamping
public static void dWorldSetDamping(DWorld w,
double linear_scale,
double angular_scale)
- Parameters:
linear_scale
- The linear damping scale that is to be applied to bodies.angular_scale
- The angular damping scale that is to be applied to bodies.- Brief:
- Convenience function to set body linear and angular scales.
dWorldGetMaxAngularSpeed
public static double dWorldGetMaxAngularSpeed(DWorld w)
- See Also:
ApiCppBody.dBodyGetMaxAngularSpeed(org.ode4j.ode.DBody)
- Brief:
- Get the default maximum angular speed.
dWorldSetMaxAngularSpeed
public static void dWorldSetMaxAngularSpeed(DWorld w,
double max_speed)
- See Also:
ApiCppBody.dBodySetMaxAngularSpeed(org.ode4j.ode.DBody, double)
- Brief:
- Set the default maximum angular speed for new bodies.