#include "MePrecision.h"
#include "MdtTypes.h"
Functions | |
| MdtWorldID | MdtWorldCreate (const int maxBodies, const int maxConstraints, void *const m, const int size) |
| Allocates memory for a new MdtWorld, and resets to default values. More... | |
| void | MdtWorldReset (const MdtWorldID w) |
| Initialises a world and sets default values. More... | |
| void | MdtWorldReCreate (const MdtWorldID w) |
| Completely reset a world and destroys all bodies and constraints. More... | |
| void | MdtWorldDestroy (const MdtWorldID w) |
| Destroys an MdtWorld and all bodies, constraints etc. More... | |
| void | MdtWorldStep (const MdtWorldID w, const MeReal stepSize) |
| Evolves the Kea world. More... | |
| void | MdtWorldLog (const MdtWorldID w) |
| Logs contents of the MdtWorld structure. More... | |
| void | MdtWorldLogAll (const MdtWorldID w) |
| Logs contents of the body and constraint structures before they are evolved by Kea. More... | |
| int | MdtWorldGetTotalBodies (const MdtWorldID w) |
| Returns the total number of bodies in the world regardless of whether they are enabled or not. More... | |
| int | MdtWorldGetEnabledBodies (const MdtWorldID w) |
| Returns the number of enabled bodies in the world. More... | |
| int | MdtWorldGetTotalConstraints (const MdtWorldID w) |
| Returns the number of constraints in the world regardless of whether they are enabled or not. More... | |
| int | MdtWorldGetEnabledConstraints (const MdtWorldID w) |
| Returns the number of enabled constraints in the world. More... | |
| MeReal | MdtWorldGetEpsilon (const MdtWorldID w) |
| Returns the amount of allowed constraint violation. More... | |
| MeReal | MdtWorldGetGamma (const MdtWorldID w) |
| Returns the amount to restore violated constraints. More... | |
| void | MdtWorldGetGravity (const MdtWorldID w, MeVector3 g) |
| Returns the gravity vector, in world reference frame. More... | |
| MdtDEMMode | MdtWorldGetDEMMode (const MdtWorldID w) |
| Returns the DEM event manager mode. More... | |
| MeReal | MdtWorldGetDEMVelocityThreshold (const MdtWorldID w) |
| Returns the minimum velocity before auto-disabling objects. More... | |
| MeReal | MdtWorldGetDEMAngularVelocityThreshold ( const MdtWorldID w) |
| Returns the minimum angular velocity before auto-disabling objects. More... | |
| MeReal | MdtWorldGetDEMAccelerationThreshold (const MdtWorldID w) |
| Returns the minimum acceleration before auto-disabling objects. More... | |
| MeReal | MdtWorldGetDEMAngularAccelerationThreshold ( const MdtWorldID w) |
| Returns the minimum angular acceleration before auto-disabling objects. More... | |
| int | MdtWorldGetDEMAliveWindow (const MdtWorldID w) |
| Returns the minimum number of evolves before auto-disabling and object once enabled. More... | |
| void* | MdtWorldGetMemoryPool (const MdtWorldID w) |
| Returns the memory pool currently being used by the solver each step. More... | |
| int | MdtWorldGetMemoryPoolSize (const MdtWorldID w) |
| Returns the size of the memory pool currently being used by the solver each step. More... | |
| int | MdtWorldGetMaxMemoryPoolUsed (const MdtWorldID w) |
| Returns the maximum amount of the Kea memory pool that has been used on any solve so far. More... | |
| MdtMemoryPoolOverflowCB | MdtWorldGetMemoryPoolOverflowCB (const MdtWorldID w) |
| Returns the currently set (optional) memory pool overflow callback. More... | |
| void | MdtWorldSetEpsilon (const MdtWorldID w, const MeReal e) |
| Sets epsilon for a world. More... | |
| void | MdtWorldSetGamma (const MdtWorldID w, const MeReal g) |
| Sets gamma for a world. More... | |
| void | MdtWorldSetGravity (const MdtWorldID w, const MeReal gx, const MeReal gy, const MeReal gz) |
| Sets the gravity for the world in the world reference frame. More... | |
| void | MdtWorldSetDEMMode (const MdtWorldID w, const MdtDEMMode m) |
| Sets the Dynamic Event Mangager's mode of operation. More... | |
| void | MdtWorldSetDEMVelocityThreshold (const MdtWorldID w, const MeReal vt) |
| Sets the velocity threshold below which an object will be auto-disabled. More... | |
| void | MdtWorldSetDEMAngularVelocityThreshold (const MdtWorldID w, const MeReal avt) |
| Sets the angular velocity threshold below which an object will be auto-disabled. More... | |
| void | MdtWorldSetDEMAccelerationThreshold (const MdtWorldID w, const MeReal at) |
| Sets the acceleration threshold below which an object will be auto-disabled. More... | |
| void | MdtWorldSetDEMAngularAccelerationThreshold ( const MdtWorldID w,const MeReal aat) |
| Sets the angular acceleration threshold below which an object will be auto-disabled. More... | |
| void | MdtWorldSetDEMAliveWindow (const MdtWorldID w, const int aw) |
| Sets the minimum number of evolves before auto-disabling and object once enabled. More... | |
| void | MdtWorldSetMemoryPool (const MdtWorldID w, void *const m, const int size) |
| Changes the memory pool used by Kea to solve the system each step. More... | |
| void | MdtWorldSetMemoryPoolOverflowCB (const MdtWorldID w, const MdtMemoryPoolOverflowCB cb) |
| Sets an optional memory pool overflow callback. More... | |
|
Allocates memory for a new MdtWorld, and resets to default values.
| maxBodies | Maximum number of bodies in this world. |
| maxConstraints | Maximum number of constraints in this world. |
| m | Kea's workspace memory. |
| size | Size of Kea's workspace. |
|
Destroys an MdtWorld and all bodies, constraints etc.
|
Returns the minimum acceleration before auto-disabling objects.
|
Returns the minimum number of evolves before auto-disabling and object once enabled.
|
Returns the minimum angular acceleration before auto-disabling objects.
|
Returns the minimum angular velocity before auto-disabling objects.
|
|
Returns the minimum velocity before auto-disabling objects.
|
Returns the number of enabled bodies in the world.
|
Returns the number of enabled constraints in the world.
|
Returns the amount of allowed constraint violation.
|
Returns the amount to restore violated constraints.
|
Returns the gravity vector, in world reference frame.
|
Returns the maximum amount of the Kea memory pool that has been used on any solve so far.
|
Returns the memory pool currently being used by the solver each step.
|
Returns the currently set (optional) memory pool overflow callback.
|
Returns the size of the memory pool currently being used by the solver each step.
|
Returns the total number of bodies in the world regardless of whether they are enabled or not.
|
Returns the number of constraints in the world regardless of whether they are enabled or not.
|
Logs contents of the MdtWorld structure.
To redirect output redefine the MeInfo handler (see MeMessage.c)
Note that logging only works in the debug build of Mdt (when _MEDEBUG is defined).
|
Logs contents of the body and constraint structures before they are evolved by Kea.
Only logs one timestep's worth of data.
|
Completely reset a world and destroys all bodies and constraints.
This function is equivalent to calling MdtWorldDestroy and MdtWorldCreate, but keeps maxBodies and maxConstraints the same and re-uses the memory pool created. This makes it much faster.
|
Initialises a world and sets default values.
Default values:
|
Sets the acceleration threshold below which an object will be auto-disabled.
The value represents the sum of the squared elements of the objects acceleration. Unused unless the MdtDEMMode is set to MdtDEMModePartitionAutoDisable.
|
Sets the minimum number of evolves before auto-disabling and object once enabled.
Unused unless the MdtDEMMode is set to MdtDEMModePartitionAutoDisable.
|
Sets the angular acceleration threshold below which an object will be auto-disabled.
The value represents the sum of the squared elements of the objects angular acceleration. Unused unless the MdtDEMMode is set to MdtDEMModePartitionAutoDisable.
|
Sets the angular velocity threshold below which an object will be auto-disabled.
The value represents the sum of the squared elements of the objects angular velocity. Unused unless the MdtDEMMode is set to MdtDEMModePartitionAutoDisable.
|
Sets the Dynamic Event Mangager's mode of operation.
The default is MdtDEMModePartitionNoAutoDisable.
|
Sets the velocity threshold below which an object will be auto-disabled.
The value represents the sum of the squared elements of the objects velocity. Unused unless the MdtDEMMode is set to MdtDEMModePartitionAutoDisable.
|
Sets epsilon for a world.
|
Sets gamma for a world.
Gamma is the relaxation rate of constraints.
|
Sets the gravity for the world in the world reference frame.
|
Changes the memory pool used by Kea to solve the system each step.
This pool is only used during MdtWorldStep.
|
Sets an optional memory pool overflow callback.
This is a callback functions that will be called in the event of the memory pool used during MdtWorldStep being to small to solve a particular system, and allows to the user to change the size of the pool to allow simulation to continue. This callback should call no other functionality in Mdt apart from MdtWorldSetMemoryPool.
|
Evolves the Kea world.
This function will use the current MdtDEMMode to divide up the the world into partitions if necessary, and will use the Kea solver to evolve all the bodies in the world.
| w | MdtWorld to simulate. |
| stepSize | Amount of time to evolve world by. |
Copyright MathEngine PLC 2000, all rights reserved.