#include "MePrecision.h"
#include "MdtTypes.h"
Functions | |
| MdtBodyID | MdtBodyCreate (const MdtWorldID w) |
| Creates a new body with default parameters. More... | |
| void | MdtBodyReset (const MdtBodyID b) |
| Initialises a body and sets default values. More... | |
| void | MdtBodyDestroy (const MdtBodyID b) |
| Destroys a body. More... | |
| MdtBodyID | MdtBodyCopy (const MdtBodyID b, const MdtWorldID w) |
| Puts a copy of an MdtBody into the supplied MdtWorld. More... | |
| void | MdtBodyEnable (const MdtBodyID b) |
| Enables simulation of this body. More... | |
| void | MdtBodyDisable (const MdtBodyID b) |
| Removes a body from simulation. More... | |
| void | MdtBodyDisableWithConstraints (const MdtBodyID b) |
| Removes a body and any constraint affecting it from simulation. More... | |
| int | MdtBodyIsEnabled (const MdtBodyID b) |
| Indicates whether a body has been removed from simulation, and is not being processed by the solver. More... | |
| void | MdtBodyLog (const MdtBodyID b) |
| Debug function - output body using MeMessage. More... | |
| MdtBodyID | MdtBodyGetFirst (const MdtWorldID w) |
| Get the 'first' body in a world. More... | |
| MdtBodyID | MdtBodyGetNext (const MdtBodyID b) |
| Get the body following the given one in the world. More... | |
| MdtWorldID | MdtBodyGetWorld (const MdtBodyID b) |
| Returns the WorldID of the world this body is part of. More... | |
| MeReal* | MdtBodyGetTransformPtr (const MdtBodyID b) |
| Returns a pointer to a bodies 4x4 transformation matrix. More... | |
| void | MdtBodyGetTransform (const MdtBodyID b,MeMatrix4 m) |
| Returns a copy of a bodies 4x4 transformation matrix. More... | |
| void* | MdtBodyGetUserData (const MdtBodyID b) |
| Returns the body's UserData pointer. More... | |
| void | MdtBodyGetName (const MdtBodyID b, char name[]) |
| Returns the body's name. More... | |
| MeReal | MdtBodyGetMass (const MdtBodyID b) |
| Returns the body's mass. More... | |
| void | MdtBodyGetInertiaTensor (const MdtBodyID b, MeMatrix3 i) |
| The body's 3X3 inertia tensor is returned in i. More... | |
| void | MdtBodyGetPosition (const MdtBodyID b, MeVector3 p) |
| The body's position vector is returned in p. More... | |
| void | MdtBodyGetQuaternion (const MdtBodyID b, MeVector4 q) |
| The body's quaternion vector is returned in q. More... | |
| void | MdtBodyGetOrientation (const MdtBodyID b, MeMatrix3 v) |
| The body's 3X3 rotation matrix is returned in v. More... | |
| void | MdtBodyGetLinearVelocity (const MdtBodyID b, MeVector3 v) |
| The body's linear velocity vector is returned in v. More... | |
| void | MdtBodyGetAngularVelocity (const MdtBodyID b, MeVector3 v) |
| The body's angular velocity vector is returned in v. More... | |
| void | MdtBodyGetVelocityAtPoint (const MdtBodyID body, MeVector3 p, MeVector3 v) |
| Calculate the linear velocity of a point at a position 'p' in the body's reference frame. More... | |
| void | MdtBodyGetLinearAcceleration (const MdtBodyID b, MeVector3 v) |
| Return's the body's linear acceleration vector in v. More... | |
| void | MdtBodyGetAngularAcceleration (const MdtBodyID b, MeVector3 v) |
| Return's the body's angular acceleration vector in v. More... | |
| void | MdtBodyGetFastSpinAxis (const MdtBodyID b, MeVector3 v) |
| Return's the body's fast spin axis in v. More... | |
| MeReal | MdtBodyGetLinearVelocityDamping (const MdtBodyID b) |
| Returns the linear velocity damping of a body. More... | |
| MeReal | MdtBodyGetAngularVelocityDamping (const MdtBodyID b) |
| Returns the angular velocity damping of a body. More... | |
| void | MdtBodyGetForce (const MdtBodyID b, MeVector3 v) |
| Return's the force accumulated on the body so far. More... | |
| void | MdtBodyGetTorque (const MdtBodyID b, MeVector3 v) |
| Return's the force accumulated on the body so far. More... | |
| MeReal | MdtBodyGetKineticEnergy (const MdtBodyID b) |
| Return's the body's kinetic energy. More... | |
| void | MdtBodySetUserData (const MdtBodyID b, void *d) |
| Sets the body's UserData pointer. More... | |
| void | MdtBodySetName (const MdtBodyID b, const char name[]) |
| Sets the body's name. More... | |
| void | MdtBodySetTransform (const MdtBodyID b, const MeMatrix4 tm) |
| Set's the body's 4X4 transformation matrix. More... | |
| void | MdtBodySetMass (const MdtBodyID b, const MeReal mass) |
| Sets the mass of a body. More... | |
| void | MdtBodySetInertiaTensor (const MdtBodyID b, const MeMatrix3 i) |
| Sets the 3X3 inertia tensor of a body. More... | |
| void | MdtBodySetPosition (const MdtBodyID b, const MeReal x, const MeReal y, const MeReal z) |
| Sets the position of an objects center of mass. More... | |
| void | MdtBodySetOrientation (const MdtBodyID b, const MeMatrix3 i) |
| Sets the orientation of an object using 3X3 rotation matrix. More... | |
| void | MdtBodySetQuaternion (const MdtBodyID b, const MeReal q1, const MeReal q2, const MeReal q3, const MeReal q4) |
| Sets the orientation of an object using a quaternion vector. More... | |
| void | MdtBodySetLinearVelocity (const MdtBodyID b, const MeReal dx, const MeReal dy, const MeReal dz) |
| Sets the linear velocity of a body. More... | |
| void | MdtBodySetAngularVelocity (const MdtBodyID b, const MeReal wx, const MeReal wy, const MeReal wz) |
| Sets the angular velocity of a body. More... | |
| void | MdtBodySetLinearVelocityDamping (const MdtBodyID b, const MeReal d) |
| Sets the velocity damping of a body. More... | |
| void | MdtBodySetAngularVelocityDamping (const MdtBodyID b, const MeReal d) |
| Sets the angular velocity damping of a body. More... | |
| void | MdtBodySetFastSpinAxis (const MdtBodyID b, const MeReal x, const MeReal y, const MeReal z) |
| Sets the fast spin axis of rotation of a body. More... | |
| void | MdtBodySetNoFastSpinAxis (const MdtBodyID b) |
| Disables fast spin for a body. More... | |
| void | MdtBodyResetForces (const MdtBodyID b) |
| Reset forces and torques being applied to body to zero. More... | |
| void | MdtBodyAddForce (const MdtBodyID b, const MeReal fx, const MeReal fy, const MeReal fz) |
| Add a force vector to a body. More... | |
| void | MdtBodyAddForceAtPosition (const MdtBodyID b, const MeReal fx, const MeReal fy, const MeReal fz, const MeReal px, const MeReal py, const MeReal pz) |
| Apply a force at a specific point on a body. More... | |
| void | MdtBodyAddTorque (const MdtBodyID b, const MeReal tx, const MeReal ty, const MeReal tz) |
| Add a torque to a body. More... | |
| void | MdtBodyAddImpulse (const MdtBodyID b, const MeReal ix, const MeReal iy, const MeReal iz) |
| Add an instanteous impulse vector to a body. More... | |
| void | MdtBodyAddImpulseAtPosition (const MdtBodyID b, const MeReal ix, const MeReal iy, const MeReal iz, const MeReal px, const MeReal py, const MeReal pz) |
| Apply an instantaneous impulse at a specific point on a body. More... | |
|
Add a force vector to a body.
The force is applied at the centre of mass and is set in the world reference frame. Forces are accumulated on a body until the body is next simulated, when they are used.
|
Apply a force at a specific point on a body.
| b | Body to apply force to. |
| f | [xyz] Force to be applied in world reference frame. |
| p | [xyz] Position to apply force to in world reference frame. |
|
Add an instanteous impulse vector to a body.
|
Apply an instantaneous impulse at a specific point on a body.
| b | Body to apply force to. |
| i | [xyz] Impulse to be applied in world reference frame. |
| p | [xyz] Position to apply impulse to in world reference frame. |
|
Add a torque to a body.
The torque vector is set in the world reference frame.
|
|
|
Destroys a body.
|
Removes a body from simulation.
A 'disabled' body will not be simulated. You can use the MdtDEMModePartitionAutoDisable option with MdtWorldSetDEMMode to automatically disable bodies when they come to rest. If the partitioner is enabled, bodies will be automatically enabled when hit by an enabled body etc.
|
Removes a body and any constraint affecting it from simulation.
This function will not only remove a body from simulation, but will remove any constraints that affect it from simulation as well. This can be useful when, for example, disabling a link in the middle of a chain.
|
Enables simulation of this body.
By default, bodies are disabled from simulation. This function enables simulation of that body. Bodies are automatically enabled when hit by other enabled bodies, for example.
|
Return's the body's angular acceleration vector in v.
Acceleration is READ ONLY, and is given in the world reference frame.
|
The body's angular velocity vector is returned in v.
The angular velocity is given as as an (x, y, z) vector.
|
Returns the angular velocity damping of a body.
Damping is a torque (newton-meters/radian/sec) opposing the body's angular velocity. 0 indicates no damping.
|
Return's the body's fast spin axis in v.
|
Get the 'first' body in a world.
|
Return's the force accumulated on the body so far.
|
The body's 3X3 inertia tensor is returned in i.
The inertia tensor of a body is given in the bodies reference frame.
|
Return's the body's kinetic energy.
|
Return's the body's linear acceleration vector in v.
Acceleration is READ ONLY, and is given in the world reference frame.
|
The body's linear velocity vector is returned in v.
The velocity is given in the world reference frame.
|
Returns the linear velocity damping of a body.
Damping is a force (newtons/unit/sec) opposing the body's velocity. 0 indicates no damping.
|
Returns the body's mass.
|
Returns the body's name.
Naming a body is very useful in conjunction with the logging functions.
|
Get the body following the given one in the world.
|
The body's 3X3 rotation matrix is returned in v.
The rotation matrix is relative to the world reference frame.
|
The body's position vector is returned in p.
The position is of the bodies center of mass, and is given in the world reference frame.
|
The body's quaternion vector is returned in q.
The quaternion is in the form (w, x, y, z), and is relative to the world reference frame.
|
Return's the force accumulated on the body so far.
|
Returns a copy of a bodies 4x4 transformation matrix.
|
Returns a pointer to a bodies 4x4 transformation matrix.
The lifetime of this transformation is not guaranteed.
|
Returns the body's UserData pointer.
|
Calculate the linear velocity of a point at a position 'p' in the body's reference frame.
|
Returns the WorldID of the world this body is part of.
|
Indicates whether a body has been removed from simulation, and is not being processed by the solver.
0 if disabled, 1 if enabled.
|
Debug function - output body using MeMessage.
|
Initialises a body and sets default values.
Default values (gives a sphere of radius 1, mass 1):
|
Reset forces and torques being applied to body to zero.
|
Sets the angular velocity of a body.
Angular velocity is set in the world reference frame.
|
Sets the angular velocity damping of a body.
Angular velocity damping applies a torque (newton-meters/radian/sec) opposing the body's angular velocity. 0 indicates no damping.
|
Sets the fast spin axis of rotation of a body.
Fast spin is used for spinning objects like wheels.
|
Sets the 3X3 inertia tensor of a body.
The inertia tensor must be diagonally symmetrical and greater than zero.
|
Sets the linear velocity of a body.
Linear velocity is set in the world reference frame.
|
Sets the velocity damping of a body.
Damping applies a force (newtons/unit/sec) opposing the body's velocity. 0 indicates no damping.
|
Sets the mass of a body.
|
Sets the body's name.
|
Disables fast spin for a body.
|
Sets the orientation of an object using 3X3 rotation matrix.
|
Sets the position of an objects center of mass.
The position of an object is set in the world reference frame.
|
Sets the orientation of an object using a quaternion vector.
The quaternion is in the form (w, x, y, z).
|
Set's the body's 4X4 transformation matrix.
|
Sets the body's UserData pointer.
Copyright MathEngine PLC 2000, all rights reserved.