org.ode4j.cpp.internal
Class ApiCppBody
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
- Direct Known Subclasses:
- ApiCppWorld
public abstract class ApiCppBody
- extends ApiCppJoint
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 void |
dBodyAddForce(DBody b,
double fx,
double fy,
double fz)
|
static void |
dBodyAddForceAtPos(DBody b,
double fx,
double fy,
double fz,
double px,
double py,
double pz)
|
static void |
dBodyAddForceAtRelPos(DBody b,
double fx,
double fy,
double fz,
double px,
double py,
double pz)
|
static void |
dBodyAddRelForce(DBody b,
double fx,
double fy,
double fz)
|
static void |
dBodyAddRelForceAtPos(DBody b,
double fx,
double fy,
double fz,
double px,
double py,
double pz)
|
static void |
dBodyAddRelForceAtRelPos(DBody b,
double fx,
double fy,
double fz,
double px,
double py,
double pz)
|
static void |
dBodyAddRelTorque(DBody b,
double fx,
double fy,
double fz)
|
static void |
dBodyAddTorque(DBody b,
double fx,
double fy,
double fz)
|
static void |
dBodyCopyPosition(DBody body,
DVector3 pos)
|
static void |
dBodyCopyQuaternion(DBody body,
DQuaternion quat)
|
static void |
dBodyCopyRotation(DBody b,
DMatrix3 R)
|
static DBody |
dBodyCreate(DWorld w)
|
static void |
dBodyDestroy(DBody b)
|
static void |
dBodyDisable(DBody body)
|
static void |
dBodyEnable(DBody body)
|
static double |
dBodyGetAngularDamping(DBody b)
|
static double |
dBodyGetAngularDampingThreshold(DBody b)
|
static DVector3C |
dBodyGetAngularVel(DBody b)
|
static double |
dBodyGetAutoDisableAngularThreshold(DBody b)
|
static int |
dBodyGetAutoDisableAverageSamplesCount(DBody b)
|
static boolean |
dBodyGetAutoDisableFlag(DBody b)
|
static double |
dBodyGetAutoDisableLinearThreshold(DBody b)
|
static int |
dBodyGetAutoDisableSteps(DBody b)
|
static double |
dBodyGetAutoDisableTime(DBody b)
|
static java.lang.Object |
dBodyGetData(DBody b)
|
void |
dBodyGetFiniteRotationAxis(DBody body,
DVector3 result)
|
static boolean |
dBodyGetFiniteRotationMode(DBody body)
|
static DVector3C |
dBodyGetForce(DBody b)
|
static boolean |
dBodyGetGravityMode(DBody b)
|
static boolean |
dBodyGetGyroscopicMode(DBody b)
|
DJoint |
dBodyGetJoint(DBody body,
int index)
|
static double |
dBodyGetLinearDamping(DBody b)
|
static double |
dBodyGetLinearDampingThreshold(DBody b)
|
static DVector3C |
dBodyGetLinearVel(DBody b)
|
static void |
dBodyGetMass(DBody b,
DMass mass)
|
static double |
dBodyGetMaxAngularSpeed(DBody b)
|
static int |
dBodyGetNumJoints(DBody b)
|
static void |
dBodyGetPointVel(DBody b,
double px,
double py,
double pz,
DVector3 result)
|
static DVector3C |
dBodyGetPosition(DBody b)
|
static void |
dBodyGetPosRelPoint(DBody b,
double px,
double py,
double pz,
DVector3 result)
|
static DQuaternionC |
dBodyGetQuaternion(DBody b)
|
static void |
dBodyGetRelPointPos(DBody b,
double px,
double py,
double pz,
DVector3 result)
|
static void |
dBodyGetRelPointVel(DBody b,
double px,
double py,
double pz,
DVector3 result)
|
static DMatrix3C |
dBodyGetRotation(DBody b)
|
static DVector3C |
dBodyGetTorque(DBody b)
|
static DWorld |
dBodyGetWorld(DBody b)
|
static boolean |
dBodyIsEnabled(DBody body)
|
static boolean |
dBodyIsKinematic(DBody body)
|
static void |
dBodySetAngularDamping(DBody b,
double scale)
|
static void |
dBodySetAngularDampingThreshold(DBody b,
double threshold)
|
static void |
dBodySetAngularVel(DBody b,
double x,
double y,
double z)
|
static void |
dBodySetAutoDisableAngularThreshold(DBody b,
double angular_average_threshold)
|
static void |
dBodySetAutoDisableAverageSamplesCount(DBody b,
int average_samples_count)
|
static void |
dBodySetAutoDisableDefaults(DBody b)
|
static void |
dBodySetAutoDisableFlag(DBody b,
boolean do_auto_disable)
|
static void |
dBodySetAutoDisableLinearThreshold(DBody b,
double linear_average_threshold)
|
static void |
dBodySetAutoDisableSteps(DBody b,
int steps)
|
static void |
dBodySetAutoDisableTime(DBody b,
double time)
|
static void |
dBodySetDamping(DBody b,
double linear_scale,
double angular_scale)
|
static void |
dBodySetDampingDefaults(DBody b)
|
static void |
dBodySetData(DBody b,
java.lang.Object data)
|
static void |
dBodySetDynamic(DBody body)
|
static void |
dBodySetFiniteRotationAxis(DBody body,
double x,
double y,
double z)
|
static void |
dBodySetFiniteRotationMode(DBody b,
boolean mode)
|
static void |
dBodySetForce(DBody b,
double x,
double y,
double z)
|
static void |
dBodySetGravityMode(DBody b,
boolean mode)
|
static void |
dBodySetGyroscopicMode(DBody b,
boolean enabled)
|
static void |
dBodySetKinematic(DBody body)
|
static void |
dBodySetLinearDamping(DBody b,
double scale)
|
static void |
dBodySetLinearDampingThreshold(DBody b,
double threshold)
|
static void |
dBodySetLinearVel(DBody b,
double x,
double y,
double z)
|
static void |
dBodySetMass(DBody b,
DMassC mass)
|
static void |
dBodySetMaxAngularSpeed(DBody b,
double max_speed)
|
static void |
dBodySetPosition(DBody b,
double x,
double y,
double z)
|
static void |
dBodySetQuaternion(DBody b,
DQuaternion q)
|
static void |
dBodySetRotation(DBody b,
DMatrix3 R)
|
static void |
dBodySetTorque(DBody b,
double x,
double y,
double z)
|
static void |
dBodyVectorFromWorld(DBody b,
double px,
double py,
double pz,
DVector3 result)
|
static void |
dBodyVectorToWorld(DBody b,
double px,
double py,
double pz,
DVector3 result)
|
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 |
ApiCppBody
public ApiCppBody()
dBodyGetAutoDisableLinearThreshold
public static double dBodyGetAutoDisableLinearThreshold(DBody b)
- Returns:
- the threshold
- Brief:
- Get auto disable linear average threshold.
dBodySetAutoDisableLinearThreshold
public static void dBodySetAutoDisableLinearThreshold(DBody b,
double linear_average_threshold)
- Parameters:
linear_average_threshold
- the threshold- Brief:
- Set auto disable linear average threshold.
dBodyGetAutoDisableAngularThreshold
public static double dBodyGetAutoDisableAngularThreshold(DBody b)
- Returns:
- the threshold
- Brief:
- Get auto disable angular average threshold.
dBodySetAutoDisableAngularThreshold
public static void dBodySetAutoDisableAngularThreshold(DBody b,
double angular_average_threshold)
- Parameters:
angular_average_threshold
- the threshold- Brief:
- Set auto disable angular average threshold.
dBodyGetAutoDisableAverageSamplesCount
public static int dBodyGetAutoDisableAverageSamplesCount(DBody b)
- Returns:
- the nr of steps/size.
- Brief:
- Get auto disable average size (samples count).
dBodySetAutoDisableAverageSamplesCount
public static void dBodySetAutoDisableAverageSamplesCount(DBody b,
int average_samples_count)
- Parameters:
average_samples_count
- the nr of samples to review.- Brief:
- Set auto disable average buffer size (average steps).
dBodyGetAutoDisableSteps
public static int dBodyGetAutoDisableSteps(DBody b)
- Returns:
- the nr of steps
- Brief:
- Get auto steps a body must be thought of as idle to disable
dBodySetAutoDisableSteps
public static void dBodySetAutoDisableSteps(DBody b,
int steps)
- Parameters:
steps
- the nr of steps.- Brief:
- Set auto disable steps.
dBodyGetAutoDisableTime
public static double dBodyGetAutoDisableTime(DBody b)
- Returns:
- nr of seconds
- Brief:
- Get auto disable time.
dBodySetAutoDisableTime
public static void dBodySetAutoDisableTime(DBody b,
double time)
- Parameters:
time
- nr of seconds.- Brief:
- Set auto disable time.
dBodyGetAutoDisableFlag
public static boolean dBodyGetAutoDisableFlag(DBody b)
- Returns:
- 0 or 1
- Brief:
- Get auto disable flag.
dBodySetAutoDisableFlag
public static void dBodySetAutoDisableFlag(DBody b,
boolean do_auto_disable)
- Parameters:
do_auto_disable
- 0 or 1- Brief:
- Set auto disable flag.
dBodySetAutoDisableDefaults
public static void dBodySetAutoDisableDefaults(DBody b)
- Brief:
- Set auto disable defaults.
- Remark:
- Set the values for the body to those set as default for the world.
dBodyGetWorld
public static DWorld dBodyGetWorld(DBody b)
- Brief:
- Retrieves the world attached to te given body.
- Remark:
dBodyCreate
public static DBody dBodyCreate(DWorld w)
- Brief:
- Create a body in given world.
- Remark:
- Default mass parameters are at position (0,0,0).
dBodyDestroy
public static void dBodyDestroy(DBody b)
- Brief:
- Destroy a body.
- Remark:
- All joints that are attached to this body will be put into limbo:
i.e. unattached and not affecting the simulation, but they will NOT be
deleted.
dBodySetData
public static void dBodySetData(DBody b,
java.lang.Object data)
- Parameters:
data
- arbitraty pointer- Brief:
- Set the body's user-data pointer.
dBodyGetData
public static java.lang.Object dBodyGetData(DBody b)
- Returns:
- a pointer to the user's data.
- Brief:
- Get the body's user-data pointer.
dBodySetPosition
public static void dBodySetPosition(DBody b,
double x,
double y,
double z)
- Brief:
- Set position of a body.
- Remark:
- After setting, the outcome of the simulation is undefined
if the new configuration is inconsistent with the joints/constraints
that are present.
dBodySetRotation
public static void dBodySetRotation(DBody b,
DMatrix3 R)
- Brief:
- Set the orientation of a body.
- Remark:
- After setting, the outcome of the simulation is undefined
if the new configuration is inconsistent with the joints/constraints
that are present.
dBodySetQuaternion
public static void dBodySetQuaternion(DBody b,
DQuaternion q)
- Brief:
- Set the orientation of a body.
- Remark:
- After setting, the outcome of the simulation is undefined
if the new configuration is inconsistent with the joints/constraints
that are present.
dBodySetLinearVel
public static void dBodySetLinearVel(DBody b,
double x,
double y,
double z)
- Brief:
- Set the linear velocity of a body.
dBodySetAngularVel
public static void dBodySetAngularVel(DBody b,
double x,
double y,
double z)
- Brief:
- Set the angular velocity of a body.
dBodyGetPosition
public static DVector3C dBodyGetPosition(DBody b)
- See Also:
dBodyCopyPosition(DBody, DVector3)
- Brief:
- Get the position of a body.
- Remark:
- When getting, the returned values are pointers to internal data structures,
so the vectors are valid until any changes are made to the rigid body
system structure.
dBodyCopyPosition
public static void dBodyCopyPosition(DBody body,
DVector3 pos)
- Parameters:
body
- the body to querypos
- a copy of the body position- See Also:
dBodyGetPosition(DBody)
- Brief:
- Copy the position of a body into a vector.
dBodyGetRotation
public static DMatrix3C dBodyGetRotation(DBody b)
- Returns:
- pointer to a 4x3 rotation matrix.
- Brief:
- Get the rotation of a body.
dBodyCopyRotation
public static void dBodyCopyRotation(DBody b,
DMatrix3 R)
- Parameters:
b
- the body to queryR
- a copy of the rotation matrix- See Also:
dBodyGetRotation(DBody)
- Brief:
- Copy the rotation of a body.
dBodyGetQuaternion
public static DQuaternionC dBodyGetQuaternion(DBody b)
- Returns:
- pointer to 4 scalars that represent the quaternion.
- Brief:
- Get the rotation of a body.
dBodyCopyQuaternion
public static void dBodyCopyQuaternion(DBody body,
DQuaternion quat)
- Parameters:
body
- the body to queryquat
- a copy of the orientation quaternion- See Also:
dBodyGetQuaternion(DBody)
- Brief:
- Copy the orientation of a body into a quaternion.
dBodyGetLinearVel
public static DVector3C dBodyGetLinearVel(DBody b)
- Brief:
- Get the linear velocity of a body.
dBodyGetAngularVel
public static DVector3C dBodyGetAngularVel(DBody b)
- Brief:
- Get the angular velocity of a body.
dBodySetMass
public static void dBodySetMass(DBody b,
DMassC mass)
- Brief:
- Set the mass of a body.
dBodyGetMass
public static void dBodyGetMass(DBody b,
DMass mass)
- Brief:
- Get the mass of a body.
dBodyAddForce
public static void dBodyAddForce(DBody b,
double fx,
double fy,
double fz)
- Brief:
- Add force at centre of mass of body in absolute coordinates.
dBodyAddTorque
public static void dBodyAddTorque(DBody b,
double fx,
double fy,
double fz)
- Brief:
- Add torque at centre of mass of body in absolute coordinates.
dBodyAddRelForce
public static void dBodyAddRelForce(DBody b,
double fx,
double fy,
double fz)
- Brief:
- Add force at centre of mass of body in coordinates relative to body.
dBodyAddRelTorque
public static void dBodyAddRelTorque(DBody b,
double fx,
double fy,
double fz)
- Brief:
- Add torque at centre of mass of body in coordinates relative to body.
dBodyAddForceAtPos
public static void dBodyAddForceAtPos(DBody b,
double fx,
double fy,
double fz,
double px,
double py,
double pz)
- Brief:
- Add force at specified point in body in global coordinates.
dBodyAddForceAtRelPos
public static void dBodyAddForceAtRelPos(DBody b,
double fx,
double fy,
double fz,
double px,
double py,
double pz)
- Brief:
- Add force at specified point in body in local coordinates.
dBodyAddRelForceAtPos
public static void dBodyAddRelForceAtPos(DBody b,
double fx,
double fy,
double fz,
double px,
double py,
double pz)
- Brief:
- Add force at specified point in body in global coordinates.
dBodyAddRelForceAtRelPos
public static void dBodyAddRelForceAtRelPos(DBody b,
double fx,
double fy,
double fz,
double px,
double py,
double pz)
- Brief:
- Add force at specified point in body in local coordinates.
dBodyGetForce
public static DVector3C dBodyGetForce(DBody b)
- Returns:
- points to an array of 3 reals.
- Brief:
- Return the current accumulated force vector.
- Remark:
- The returned values are pointers to internal data structures, so
the vectors are only valid until any changes are made to the rigid
body system.
dBodyGetTorque
public static DVector3C dBodyGetTorque(DBody b)
- Returns:
- points to an array of 3 reals.
- Brief:
- Return the current accumulated torque vector.
- Remark:
- The returned values are pointers to internal data structures, so
the vectors are only valid until any changes are made to the rigid
body system.
dBodySetForce
public static void dBodySetForce(DBody b,
double x,
double y,
double z)
- Brief:
- Set the body force accumulation vector.
- Remark:
- This is mostly useful to zero the force and torque for deactivated bodies
before they are reactivated, in the case where the force-adding functions
were called on them while they were deactivated.
dBodySetTorque
public static void dBodySetTorque(DBody b,
double x,
double y,
double z)
- Brief:
- Set the body torque accumulation vector.
- Remark:
- This is mostly useful to zero the force and torque for deactivated bodies
before they are reactivated, in the case where the force-adding functions
were called on them while they were deactivated.
dBodyGetRelPointPos
public static void dBodyGetRelPointPos(DBody b,
double px,
double py,
double pz,
DVector3 result)
- Parameters:
result
- will contain the result.- Brief:
- Get world position of a relative point on body.
dBodyGetRelPointVel
public static void dBodyGetRelPointVel(DBody b,
double px,
double py,
double pz,
DVector3 result)
- Parameters:
result
- will contain the result.- Brief:
- Get velocity vector in global coords of a relative point on body.
dBodyGetPointVel
public static void dBodyGetPointVel(DBody b,
double px,
double py,
double pz,
DVector3 result)
- Parameters:
result
- will contain the result.- Brief:
- Get velocity vector in global coords of a globally
specified point on a body.
dBodyGetPosRelPoint
public static void dBodyGetPosRelPoint(DBody b,
double px,
double py,
double pz,
DVector3 result)
- Parameters:
result
- will contain the result.- Brief:
- takes a point in global coordinates and returns
the point's position in body-relative coordinates.
- Remark:
- This is the inverse of dBodyGetRelPointPos()
dBodyVectorToWorld
public static void dBodyVectorToWorld(DBody b,
double px,
double py,
double pz,
DVector3 result)
- Parameters:
result
- will contain the result.- Brief:
- Convert from local to world coordinates.
dBodyVectorFromWorld
public static void dBodyVectorFromWorld(DBody b,
double px,
double py,
double pz,
DVector3 result)
- Parameters:
result
- will contain the result.- Brief:
- Convert from world to local coordinates.
dBodySetFiniteRotationMode
public static void dBodySetFiniteRotationMode(DBody b,
boolean mode)
- Parameters:
mode
- can be 0 or 1:
\li 0: An ``infinitesimal'' orientation update is used.
This is fast to compute, but it can occasionally cause inaccuracies
for bodies that are rotating at high speed, especially when those
bodies are joined to other bodies.
This is the default for every new body that is created.
\li 1: A ``finite'' orientation update is used.
This is more costly to compute, but will be more accurate for high
speed rotations.- Brief:
- controls the way a body's orientation is updated at each timestep.
- Remark:
- Note however that high speed rotations can result in many types of
error in a simulation, and the finite mode will only fix one of those
sources of error.
dBodySetFiniteRotationAxis
public static void dBodySetFiniteRotationAxis(DBody body,
double x,
double y,
double z)
- Brief:
- sets the finite rotation axis for a body.
- Remark:
- This is axis only has meaning when the finite rotation mode is set
If this axis is zero (0,0,0), full finite rotations are performed on
the body.
If this axis is nonzero, the body is rotated by performing a partial finite
rotation along the axis direction followed by an infinitesimal rotation
along an orthogonal direction., This can be useful to alleviate certain sources of error caused by quickly
spinning bodies. For example, if a car wheel is rotating at high speed
you can call this function with the wheel's hinge axis as the argument to
try and improve its behavior.
dBodyGetFiniteRotationMode
public static boolean dBodyGetFiniteRotationMode(DBody body)
- Returns:
- the mode 0 (infitesimal) or 1 (finite).
- Brief:
- Get the way a body's orientation is updated each timestep.
dBodyGetFiniteRotationAxis
public void dBodyGetFiniteRotationAxis(DBody body,
DVector3 result)
- Parameters:
result
- will contain the axis.- Brief:
- Get the finite rotation axis.
dBodyGetNumJoints
public static int dBodyGetNumJoints(DBody b)
- Returns:
- nr of joints
- Brief:
- Get the number of joints that are attached to this body.
dBodyGetJoint
public DJoint dBodyGetJoint(DBody body,
int index)
- Parameters:
index
- valid range is 0 to n-1 where n is the value returned by
dBodyGetNumJoints().- Brief:
- Return a joint attached to this body, given by index.
dBodySetDynamic
public static void dBodySetDynamic(DBody body)
- Parameters:
body
- identification of body.- Brief:
- Set rigid body to dynamic state (default).
dBodySetKinematic
public static void dBodySetKinematic(DBody body)
- Parameters:
body
- identification of body.- Brief:
- Set rigid body to kinematic state.
When in kinematic state the body isn't simulated as a dynamic
body (it's "unstoppable", doesn't respond to forces),
but can still affect dynamic bodies (e.g. in joints).
Kinematic bodies can be controlled by position and velocity.
- Note:
- A kinematic body has infinite mass. If you set its mass
to something else, it loses the kinematic state and behaves
as a normal dynamic body.
dBodyIsKinematic
public static boolean dBodyIsKinematic(DBody body)
- Returns:
- 1 if a body is kinematic or 0 if it is dynamic.
- Brief:
- Check wether a body is in kinematic state.
dBodyEnable
public static void dBodyEnable(DBody body)
- Parameters:
body
- identification of body.- Brief:
- Manually enable a body.
dBodyDisable
public static void dBodyDisable(DBody body)
- Brief:
- Manually disable a body.
- Remark:
- A disabled body that is connected through a joint to an enabled body will
be automatically re-enabled at the next simulation step.
dBodyIsEnabled
public static boolean dBodyIsEnabled(DBody body)
- Returns:
- 1 if a body is currently enabled or 0 if it is disabled.
- Brief:
- Check wether a body is enabled.
dBodySetGravityMode
public static void dBodySetGravityMode(DBody b,
boolean mode)
- Parameters:
mode
- when nonzero gravity affects this body.- Brief:
- Set whether the body is influenced by the world's gravity or not.
- Remark:
- Newly created bodies are always influenced by the world's gravity.
dBodyGetGravityMode
public static boolean dBodyGetGravityMode(DBody b)
- Returns:
- nonzero means gravity affects this body.
- Brief:
- Get whether the body is influenced by the world's gravity or not.
dBodySetDampingDefaults
public static void dBodySetDampingDefaults(DBody b)
- Brief:
- Resets the damping settings to the current world's settings.
dBodyGetLinearDamping
public static double dBodyGetLinearDamping(DBody b)
- Brief:
- Get the body's linear damping scale.
dBodySetLinearDamping
public static void dBodySetLinearDamping(DBody b,
double scale)
- Parameters:
scale
- The linear damping scale. Should be in the interval [0, 1].- See Also:
dBodySetDampingDefaults(DBody)
- Brief:
- Set the body's linear damping scale.
- Remark:
- From now on the body will not use the world's linear damping
scale until dBodySetDampingDefaults() is called.
dBodyGetAngularDamping
public static double dBodyGetAngularDamping(DBody b)
- Brief:
- Get the body's angular damping scale.
- Remark:
- If the body's angular damping scale was not set, this function
returns the world's angular damping scale.
dBodySetAngularDamping
public static void dBodySetAngularDamping(DBody b,
double scale)
- Parameters:
scale
- The angular damping scale. Should be in the interval [0, 1].- See Also:
#dBodyResetAngularDamping()
- Brief:
- Set the body's angular damping scale.
- Remark:
- From now on the body will not use the world's angular damping
scale until dBodyResetAngularDamping() is called.
dBodySetDamping
public static void dBodySetDamping(DBody b,
double linear_scale,
double angular_scale)
- Parameters:
linear_scale
- The linear damping scale. Should be in the interval [0, 1].angular_scale
- The angular damping scale. Should be in the interval [0, 1].- See Also:
dBodySetLinearDamping(DBody, double)
,
dBodySetAngularDamping(DBody, double)
- Brief:
- Convenience function to set linear and angular scales at once.
dBodyGetLinearDampingThreshold
public static double dBodyGetLinearDampingThreshold(DBody b)
- Brief:
- Get the body's linear damping threshold.
dBodySetLinearDampingThreshold
public static void dBodySetLinearDampingThreshold(DBody b,
double threshold)
- Parameters:
threshold
- The linear threshold to be used. Damping
is only applied if the linear speed is above this limit.- Brief:
- Set the body's linear damping threshold.
dBodyGetAngularDampingThreshold
public static double dBodyGetAngularDampingThreshold(DBody b)
- Brief:
- Get the body's angular damping threshold.
dBodySetAngularDampingThreshold
public static void dBodySetAngularDampingThreshold(DBody b,
double threshold)
- Parameters:
threshold
- The angular threshold to be used. Damping is
only used if the angular speed is above this limit.- Brief:
- Set the body's angular damping threshold.
dBodyGetMaxAngularSpeed
public static double dBodyGetMaxAngularSpeed(DBody b)
- See Also:
ApiCppWorld.dWorldGetMaxAngularSpeed(DWorld)
- Brief:
- Get the body's maximum angular speed.
dBodySetMaxAngularSpeed
public static void dBodySetMaxAngularSpeed(DBody b,
double max_speed)
- See Also:
ApiCppWorld.dWorldSetMaxAngularSpeed(DWorld, double)
,
The default value is dInfinity, but it's a good idea to limit
it at less than 500 if the body has the gyroscopic term
enabled.
- Brief:
- Set the body's maximum angular speed.
dBodyGetGyroscopicMode
public static boolean dBodyGetGyroscopicMode(DBody b)
- Returns:
- nonzero if gyroscopic term computation is enabled (default),
zero otherwise.
- Brief:
- Get the body's gyroscopic state.
dBodySetGyroscopicMode
public static void dBodySetGyroscopicMode(DBody b,
boolean enabled)
- Parameters:
enabled
- nonzero (default) to enable gyroscopic term, 0
to disable.- Brief:
- Enable/disable the body's gyroscopic term.
Disabling the gyroscopic term of a body usually improves
stability. It also helps turning spining objects, like cars'
wheels.