MathEngine
Home Page       Structures       File List       Functions and Macros      

MdtUniversal.h File Reference

MdtUniversal API functions. More...

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

Functions

MdtUniversalID MdtUniversalCreate (const MdtWorldID w, const MdtBodyID b1, const MdtBodyID b2)
 Creates a new universal joint with default parameters. More...

void MdtUniversalReset (const MdtUniversalID j)
 Initialises a universal joint and sets default values. More...

void MdtUniversalDestroy (const MdtUniversalID j)
 Destroys a universal joint. More...

void MdtUniversalLog (const MdtUniversalID j)
 Debug function - output constraint using MeMessage. More...

MdtConstraintID MdtUniversalQuaConstraint (const MdtUniversalID j)
 Gets an MdtConstraintID from a specific constraint for performing functions common to all constraints. More...

void MdtUniversalGetPosition (const MdtUniversalID j, MeVector3 position)
 The universal joint's position vector is returned in v. More...

void MdtUniversalGetAxis (const MdtUniversalID j, MeVector3 axis, const unsigned int bodyindex)
 This returns one of the universal joint's axes in v. More...

void MdtUniversalSetPosition (const MdtUniversalID j, const MeReal x, const MeReal y, const MeReal z)
 Sets the joint position in world coordinates. More...

void MdtUniversalSetAxis (const MdtUniversalID j, const MeReal x, const MeReal y, const MeReal z, const unsigned int bodyindex)
 Sets the joint axis corresponding to the third parameter (bodyindex) in world coordinates. More...


Detailed Description

MdtUniversal API functions.

This joint is essentially a pair of hinges with their axes joined at an angle (usually 90 degrees).


Define Documentation

#define MdtUniversalDisable( j )

Initializer:

\
                            MdtConstraintDisable(MdtUniversalQuaConstraint(j))

#define MdtUniversalEnable( j )

Initializer:

\
                            MdtConstraintEnable(MdtUniversalQuaConstraint(j))

#define MdtUniversalGetBody( j, bodyindex )

Initializer:

\
                            MdtConstraintGetBody(MdtUniversalQuaConstraint(j), bodyindex)

#define MdtUniversalGetForce( j, bodyindex, f )

Initializer:

\
                            MdtConstraintGetForce(MdtUniversalQuaConstraint(j), bodyindex, f)

#define MdtUniversalGetTorque( j, bodyindex, t )

Initializer:

\
                            MdtConstraintGetTorque(MdtUniversalQuaConstraint(j), bodyindex, t)

#define MdtUniversalGetUserData( j )

Initializer:

\
                            MdtConstraintGetUserData(MdtUniversalQuaConstraint(j))

#define MdtUniversalGetWorld( j )

Initializer:

\
                            MdtConstraintGetWorld(MdtUniversalQuaConstraint(j))

#define MdtUniversalIsEnabled( j )

Initializer:

\
                            MdtConstraintIsEnabled(MdtUniversalQuaConstraint(j))

#define MdtUniversalSetBodies( j, b1, b2 )

Initializer:

\
                            MdtConstraintSetBodies(MdtUniversalQuaConstraint(j), b1, b2)

#define MdtUniversalSetUserData( j, d )

Initializer:

\
                            MdtConstraintSetUserData(MdtUniversalQuaConstraint(j), d)

Function Documentation

MdtUniversalID MdtUniversalCreate ( MdtWorldID w,
MdtBodyID b1,
MdtBodyID b2 )

Creates a new universal joint with default parameters.

See also:
MdtUniversalReset()

void MdtUniversalDestroy ( MdtUniversalID j )

Destroys a universal joint.

void MdtUniversalGetAxis ( MdtUniversalID j,
MeVector3 axis,
unsigned int bodyindex )

This returns one of the universal joint's axes in v.

The axis is selected by the third parameter (BodyID).

void MdtUniversalGetPosition ( MdtUniversalID j,
MeVector3 position )

The universal joint's position vector is returned in v.

void MdtUniversalLog ( MdtUniversalID j )

Debug function - output constraint using MeMessage.

MdtConstraintID MdtUniversalQuaConstraint ( MdtUniversalID j )

Gets an MdtConstraintID from a specific constraint for performing functions common to all constraints.

void MdtUniversalReset ( MdtUniversalID j )

Initialises a universal joint and sets default values.

Note that the joint's bodies are not reset.

Default values:

Parameters:
j   universal joint ID

void MdtUniversalSetAxis ( MdtUniversalID j,
MeReal x,
MeReal y,
MeReal z,
unsigned int bodyindex )

Sets the joint axis corresponding to the third parameter (bodyindex) in world coordinates.

void MdtUniversalSetPosition ( MdtUniversalID j,
MeReal x,
MeReal y,
MeReal z )

Sets the joint position in world coordinates.

N.B. Set attributes x, y and z *should* be const.


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

Copyright MathEngine PLC 2000, all rights reserved.