MathEngine
Home Page       Structures       File List       Functions and Macros      

MdtConstraint.h File Reference

MdtConstraint API functions. More...

#include "MePrecision.h"
#include "MdtTypes.h"

Functions

void MdtConstraintEnable (const MdtConstraintID c)
 Enables simulation of a constraint. More...

void MdtConstraintDisable (const MdtConstraintID c)
 Removes a constraint from simulation in a world. More...

int MdtConstraintIsEnabled (const MdtConstraintID c)
 Determines if this constraint is currently enabled. More...

MdtBodyID MdtConstraintGetBody (const MdtConstraintID c, const unsigned int bodyindex)
 Returns one of the bodies connected to this constraint. More...

void* MdtConstraintGetUserData (const MdtConstraintID c)
 Returns the constraints UserData pointer. More...

MdtWorldID MdtConstraintGetWorld (const MdtConstraintID c)
 Returns the world that the constraint is in. More...

void MdtConstraintGetForce (const MdtConstraintID c, const unsigned int bodyindex, MeVector3 f)
 Returns the force applied to a body by this constraint (on the last timestep). More...

void MdtConstraintGetTorque (const MdtConstraintID c, const unsigned int bodyindex, MeVector3 t)
 Returns the torque applied to a body by this constraint (on the last timestep). More...

void MdtConstraintSetBodies (const MdtConstraintID c, const MdtBodyID b1, const MdtBodyID b2)
 Sets the bodies to be constrained. More...

void MdtConstraintSetUserData (const MdtConstraintID c, void *d)
 Sets the constraint's UserData pointer. More...


Detailed Description

MdtConstraint API functions.


Function Documentation

void MdtConstraintDisable ( MdtConstraintID c )

Removes a constraint from simulation in a world.

void MdtConstraintEnable ( MdtConstraintID c )

Enables simulation of a constraint.

MdtBodyID MdtConstraintGetBody ( MdtConstraintID c,
unsigned int bodyindex )

Returns one of the bodies connected to this constraint.

0 for the first body, 1 for the second body etc.

void MdtConstraintGetForce ( MdtConstraintID c,
unsigned int bodyindex,
MeVector3 f )

Returns the force applied to a body by this constraint (on the last timestep).

Forces are returned in the world reference frame.

void MdtConstraintGetTorque ( MdtConstraintID c,
unsigned int bodyindex,
MeVector3 t )

Returns the torque applied to a body by this constraint (on the last timestep).

Torques are returned in the world reference frame.

void * MdtConstraintGetUserData ( MdtConstraintID c )

Returns the constraints UserData pointer.

MdtWorldID MdtConstraintGetWorld ( MdtConstraintID c )

Returns the world that the constraint is in.

int MdtConstraintIsEnabled ( MdtConstraintID c )

Determines if this constraint is currently enabled.

Returns 1 if enabled, or 0 if not.

void MdtConstraintSetBodies ( MdtConstraintID c,
MdtBodyID b1,
MdtBodyID b2 )

Sets the bodies to be constrained.

It should not be necessary to use this function much because a constraint's bodies are set when the constraint is created, and would not normally be changed.

NB If a constraint's bodies are changed, the constraint must be disabled first.

void MdtConstraintSetUserData ( MdtConstraintID c,
void * d )

Sets the constraint's UserData pointer.


MathEngine Dynamics Toolkit - Version 0.0.5 Alpha - Reference Manual generated using doxygen at Wed Oct 11 00:34:47 2000

Copyright MathEngine PLC 2000, all rights reserved.