Modules | |
Automatic Enabling and Disabling | |
Damping | |
Functions | |
ODE_API dWorldID | dBodyGetWorld (dBodyID) |
Retrieves the world attached to te given body. | |
ODE_API dBodyID | dBodyCreate (dWorldID) |
Create a body in given world. | |
ODE_API void | dBodyDestroy (dBodyID) |
Destroy a body. | |
ODE_API void | dBodySetData (dBodyID, void *data) |
Set the body's user-data pointer. | |
ODE_API void * | dBodyGetData (dBodyID) |
Get the body's user-data pointer. | |
ODE_API void | dBodySetPosition (dBodyID, dReal x, dReal y, dReal z) |
Set position of a body. | |
ODE_API void | dBodySetRotation (dBodyID, const dMatrix3 R) |
Set the orientation of a body. | |
ODE_API void | dBodySetQuaternion (dBodyID, const dQuaternion q) |
Set the orientation of a body. | |
ODE_API void | dBodySetLinearVel (dBodyID, dReal x, dReal y, dReal z) |
Set the linear velocity of a body. | |
ODE_API void | dBodySetAngularVel (dBodyID, dReal x, dReal y, dReal z) |
Set the angular velocity of a body. | |
ODE_API const dReal * | dBodyGetPosition (dBodyID) |
Get the position of a body. | |
ODE_API void | dBodyCopyPosition (dBodyID body, dVector3 pos) |
Copy the position of a body into a vector. | |
ODE_API const dReal * | dBodyGetRotation (dBodyID) |
Get the rotation of a body. | |
ODE_API void | dBodyCopyRotation (dBodyID, dMatrix3 R) |
Copy the rotation of a body. | |
ODE_API const dReal * | dBodyGetQuaternion (dBodyID) |
Get the rotation of a body. | |
ODE_API void | dBodyCopyQuaternion (dBodyID body, dQuaternion quat) |
Copy the orientation of a body into a quaternion. | |
ODE_API const dReal * | dBodyGetLinearVel (dBodyID) |
Get the linear velocity of a body. | |
ODE_API const dReal * | dBodyGetAngularVel (dBodyID) |
Get the angular velocity of a body. | |
ODE_API void | dBodySetMass (dBodyID, const dMass *mass) |
Set the mass of a body. | |
ODE_API void | dBodyGetMass (dBodyID, dMass *mass) |
Get the mass of a body. | |
ODE_API void | dBodyAddForce (dBodyID, dReal fx, dReal fy, dReal fz) |
Add force at centre of mass of body in absolute coordinates. | |
ODE_API void | dBodyAddTorque (dBodyID, dReal fx, dReal fy, dReal fz) |
Add torque at centre of mass of body in absolute coordinates. | |
ODE_API void | dBodyAddRelForce (dBodyID, dReal fx, dReal fy, dReal fz) |
Add force at centre of mass of body in coordinates relative to body. | |
ODE_API void | dBodyAddRelTorque (dBodyID, dReal fx, dReal fy, dReal fz) |
Add torque at centre of mass of body in coordinates relative to body. | |
ODE_API void | dBodyAddForceAtPos (dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) |
Add force at specified point in body in global coordinates. | |
ODE_API void | dBodyAddForceAtRelPos (dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) |
Add force at specified point in body in local coordinates. | |
ODE_API void | dBodyAddRelForceAtPos (dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) |
Add force at specified point in body in global coordinates. | |
ODE_API void | dBodyAddRelForceAtRelPos (dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) |
Add force at specified point in body in local coordinates. | |
ODE_API const dReal * | dBodyGetForce (dBodyID) |
Return the current accumulated force vector. | |
ODE_API const dReal * | dBodyGetTorque (dBodyID) |
Return the current accumulated torque vector. | |
ODE_API void | dBodySetForce (dBodyID b, dReal x, dReal y, dReal z) |
Set the body force accumulation vector. | |
ODE_API void | dBodySetTorque (dBodyID b, dReal x, dReal y, dReal z) |
Set the body torque accumulation vector. | |
ODE_API void | dBodyGetRelPointPos (dBodyID, dReal px, dReal py, dReal pz, dVector3 result) |
Get world position of a relative point on body. | |
ODE_API void | dBodyGetRelPointVel (dBodyID, dReal px, dReal py, dReal pz, dVector3 result) |
Get velocity vector in global coords of a relative point on body. | |
ODE_API void | dBodyGetPointVel (dBodyID, dReal px, dReal py, dReal pz, dVector3 result) |
Get velocity vector in global coords of a globally specified point on a body. | |
ODE_API void | dBodyGetPosRelPoint (dBodyID, dReal px, dReal py, dReal pz, dVector3 result) |
takes a point in global coordinates and returns the point's position in body-relative coordinates. | |
ODE_API void | dBodyVectorToWorld (dBodyID, dReal px, dReal py, dReal pz, dVector3 result) |
Convert from local to world coordinates. | |
ODE_API void | dBodyVectorFromWorld (dBodyID, dReal px, dReal py, dReal pz, dVector3 result) |
Convert from world to local coordinates. | |
ODE_API void | dBodySetFiniteRotationMode (dBodyID, int mode) |
controls the way a body's orientation is updated at each timestep. | |
ODE_API void | dBodySetFiniteRotationAxis (dBodyID, dReal x, dReal y, dReal z) |
sets the finite rotation axis for a body. | |
ODE_API int | dBodyGetFiniteRotationMode (dBodyID) |
Get the way a body's orientation is updated each timestep. | |
ODE_API void | dBodyGetFiniteRotationAxis (dBodyID, dVector3 result) |
Get the finite rotation axis. | |
ODE_API int | dBodyGetNumJoints (dBodyID b) |
Get the number of joints that are attached to this body. | |
ODE_API dJointID | dBodyGetJoint (dBodyID, int index) |
Return a joint attached to this body, given by index. | |
ODE_API void | dBodySetDynamic (dBodyID) |
Set rigid body to dynamic state (default). | |
ODE_API void | dBodySetKinematic (dBodyID) |
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. | |
ODE_API int | dBodyIsKinematic (dBodyID) |
Check wether a body is in kinematic state. | |
ODE_API void | dBodyEnable (dBodyID) |
Manually enable a body. | |
ODE_API void | dBodyDisable (dBodyID) |
Manually disable a body. | |
ODE_API int | dBodyIsEnabled (dBodyID) |
Check wether a body is enabled. | |
ODE_API void | dBodySetGravityMode (dBodyID b, int mode) |
Set whether the body is influenced by the world's gravity or not. | |
ODE_API int | dBodyGetGravityMode (dBodyID b) |
Get whether the body is influenced by the world's gravity or not. | |
ODE_API void | dBodySetMovedCallback (dBodyID b, void(*callback)(dBodyID)) |
Set the 'moved' callback of a body. | |
ODE_API dGeomID | dBodyGetFirstGeom (dBodyID b) |
Return the first geom associated with the body. | |
ODE_API dGeomID | dBodyGetNextGeom (dGeomID g) |
returns the next geom associated with the same body. | |
ODE_API dReal | dBodyGetMaxAngularSpeed (dBodyID b) |
Get the body's maximum angular speed. | |
ODE_API void | dBodySetMaxAngularSpeed (dBodyID b, dReal max_speed) |
Set the body's maximum angular speed. | |
ODE_API int | dBodyGetGyroscopicMode (dBodyID b) |
Get the body's gyroscopic state. | |
ODE_API void | dBodySetGyroscopicMode (dBodyID b, int enabled) |
Enable/disable the body's gyroscopic term. |
Note that the shape of a rigid body is not a dynamical property (except insofar as it influences the various mass properties). It is only collision detection that cares about the detailed shape of the body.
ODE_API void dBodyCopyPosition | ( | dBodyID | body, | |
dVector3 | pos | |||
) |
Copy the position of a body into a vector.
body | the body to query | |
pos | a copy of the body position |
ODE_API void dBodyCopyQuaternion | ( | dBodyID | body, | |
dQuaternion | quat | |||
) |
Copy the orientation of a body into a quaternion.
body | the body to query | |
quat | a copy of the orientation quaternion |
ODE_API void dBodyCopyRotation | ( | dBodyID | , | |
dMatrix3 | R | |||
) |
Copy the rotation of a body.
body | the body to query | |
R | a copy of the rotation matrix |
ODE_API dBodyID dBodyCreate | ( | dWorldID | ) |
Create a body in given world.
ODE_API void dBodyDestroy | ( | dBodyID | ) |
Destroy a body.
ODE_API void dBodyDisable | ( | dBodyID | ) |
Manually disable a body.
ODE_API void dBodyEnable | ( | dBodyID | ) |
Manually enable a body.
dBodyID | identification of body. |
ODE_API void* dBodyGetData | ( | dBodyID | ) |
Get the body's user-data pointer.
ODE_API void dBodyGetFiniteRotationAxis | ( | dBodyID | , | |
dVector3 | result | |||
) |
Get the finite rotation axis.
result | will contain the axis. |
ODE_API int dBodyGetFiniteRotationMode | ( | dBodyID | ) |
Get the way a body's orientation is updated each timestep.
ODE_API dGeomID dBodyGetFirstGeom | ( | dBodyID | b | ) |
Return the first geom associated with the body.
You can traverse through the geoms by repeatedly calling dBodyGetNextGeom().
ODE_API const dReal* dBodyGetForce | ( | dBodyID | ) |
Return the current accumulated force vector.
ODE_API int dBodyGetGravityMode | ( | dBodyID | b | ) |
Get whether the body is influenced by the world's gravity or not.
ODE_API int dBodyGetGyroscopicMode | ( | dBodyID | b | ) |
Get the body's gyroscopic state.
ODE_API dJointID dBodyGetJoint | ( | dBodyID | , | |
int | index | |||
) |
Return a joint attached to this body, given by index.
index | valid range is 0 to n-1 where n is the value returned by dBodyGetNumJoints(). |
ODE_API dReal dBodyGetMaxAngularSpeed | ( | dBodyID | b | ) |
ODE_API dGeomID dBodyGetNextGeom | ( | dGeomID | g | ) |
returns the next geom associated with the same body.
g | a geom attached to some body. |
ODE_API int dBodyGetNumJoints | ( | dBodyID | b | ) |
Get the number of joints that are attached to this body.
ODE_API void dBodyGetPointVel | ( | dBodyID | , | |
dReal | px, | |||
dReal | py, | |||
dReal | pz, | |||
dVector3 | result | |||
) |
Get velocity vector in global coords of a globally specified point on a body.
result | will contain the result. |
ODE_API const dReal* dBodyGetPosition | ( | dBodyID | ) |
Get the position of a body.
ODE_API void dBodyGetPosRelPoint | ( | dBodyID | , | |
dReal | px, | |||
dReal | py, | |||
dReal | pz, | |||
dVector3 | result | |||
) |
takes a point in global coordinates and returns the point's position in body-relative coordinates.
result | will contain the result. |
ODE_API const dReal* dBodyGetQuaternion | ( | dBodyID | ) |
Get the rotation of a body.
ODE_API void dBodyGetRelPointPos | ( | dBodyID | , | |
dReal | px, | |||
dReal | py, | |||
dReal | pz, | |||
dVector3 | result | |||
) |
Get world position of a relative point on body.
result | will contain the result. |
ODE_API void dBodyGetRelPointVel | ( | dBodyID | , | |
dReal | px, | |||
dReal | py, | |||
dReal | pz, | |||
dVector3 | result | |||
) |
Get velocity vector in global coords of a relative point on body.
result | will contain the result. |
ODE_API const dReal* dBodyGetRotation | ( | dBodyID | ) |
Get the rotation of a body.
ODE_API const dReal* dBodyGetTorque | ( | dBodyID | ) |
Return the current accumulated torque vector.
ODE_API dWorldID dBodyGetWorld | ( | dBodyID | ) |
Retrieves the world attached to te given body.
ODE_API int dBodyIsEnabled | ( | dBodyID | ) |
Check wether a body is enabled.
ODE_API int dBodyIsKinematic | ( | dBodyID | ) |
Check wether a body is in kinematic state.
ODE_API void dBodySetData | ( | dBodyID | , | |
void * | data | |||
) |
Set the body's user-data pointer.
data | arbitraty pointer |
ODE_API void dBodySetDynamic | ( | dBodyID | ) |
Set rigid body to dynamic state (default).
dBodyID | identification of body. |
ODE_API void dBodySetFiniteRotationAxis | ( | dBodyID | , | |
dReal | x, | |||
dReal | y, | |||
dReal | z | |||
) |
sets the finite rotation axis for a body.
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.
ODE_API void dBodySetFiniteRotationMode | ( | dBodyID | , | |
int | mode | |||
) |
controls the way a body's orientation is updated at each timestep.
mode | can be 0 or 1:
|
ODE_API void dBodySetForce | ( | dBodyID | b, | |
dReal | x, | |||
dReal | y, | |||
dReal | z | |||
) |
Set the body force accumulation vector.
ODE_API void dBodySetGravityMode | ( | dBodyID | b, | |
int | mode | |||
) |
Set whether the body is influenced by the world's gravity or not.
mode | when nonzero gravity affects this body. |
ODE_API void dBodySetGyroscopicMode | ( | dBodyID | b, | |
int | enabled | |||
) |
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.
enabled | nonzero (default) to enable gyroscopic term, 0 to disable. |
ODE_API void dBodySetKinematic | ( | dBodyID | ) |
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.
dBodyID | identification of body. |
ODE_API void dBodySetMaxAngularSpeed | ( | dBodyID | b, | |
dReal | max_speed | |||
) |
Set the body's maximum angular speed.
ODE_API void dBodySetMovedCallback | ( | dBodyID | b, | |
void(*)(dBodyID) | callback | |||
) |
Set the 'moved' callback of a body.
Whenever a body has its position or rotation changed during the timestep, the callback will be called (with body as the argument). Use it to know which body may need an update in an external structure (like a 3D engine).
b | the body that needs to be watched. | |
callback | the callback to be invoked when the body moves. Set to zero to disable. |
ODE_API void dBodySetPosition | ( | dBodyID | , | |
dReal | x, | |||
dReal | y, | |||
dReal | z | |||
) |
Set position of a body.
ODE_API void dBodySetQuaternion | ( | dBodyID | , | |
const dQuaternion | q | |||
) |
Set the orientation of a body.
ODE_API void dBodySetRotation | ( | dBodyID | , | |
const dMatrix3 | R | |||
) |
Set the orientation of a body.
ODE_API void dBodySetTorque | ( | dBodyID | b, | |
dReal | x, | |||
dReal | y, | |||
dReal | z | |||
) |
Set the body torque accumulation vector.
ODE_API void dBodyVectorFromWorld | ( | dBodyID | , | |
dReal | px, | |||
dReal | py, | |||
dReal | pz, | |||
dVector3 | result | |||
) |
Convert from world to local coordinates.
result | will contain the result. |
ODE_API void dBodyVectorToWorld | ( | dBodyID | , | |
dReal | px, | |||
dReal | py, | |||
dReal | pz, | |||
dVector3 | result | |||
) |
Convert from local to world coordinates.
result | will contain the result. |