MathEngine
Home Page       Structures       File List       Functions and Macros      

MdtFPFOJoint.h File Reference

MdtFPFOJoint API functions. More...

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

Functions

MdtFPFOJointID MdtFPFOJointCreate (const MdtWorldID w, const MdtBodyID b1, const MdtBodyID b2)
 Creates a new full constraint joint with default parameters. More...

void MdtFPFOJointReset (const MdtFPFOJointID j)
 Sets a full constraint joint to its default values. More...

void MdtFPFOJointDestroy (const MdtFPFOJointID j)
 Destroys a full constraint joint. More...

void MdtFPFOJointLog (const MdtFPFOJointID j)
 Debug function - output constraint using MeMessage. More...

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

void MdtFPFOJointGetPosition (const MdtFPFOJointID j, MeVector3 position, const unsigned int bodyindex)
 The full constraint joint's position with respect to one of the constrained bodies is returned in v. More...

void MdtFPFOJointGetQuaternion (const MdtFPFOJointID j, MeVector4 q1, MeVector4 q2)
 This retrieves the bodies' individual quaternions. More...

void MdtFPFOJointSetPosition (const MdtFPFOJointID j, const MeReal x, const MeReal y, const MeReal z, const unsigned int bodyindex)
 Sets the full constraint joint's position with respect to one of the constrained bodies. More...

void MdtFPFOJointSetQuaternion (const MdtFPFOJointID j, const MeVector4 q1, const MeVector4 q2)
 Set the invariant relative orientation vector. More...


Detailed Description

MdtFPFOJoint API functions.

This joint maintains the relative position and orientation of bodies b1 and b2 - or (if there is no b2) the absolute position and orientation of b1.

A fixed-path joint in which the relative orientation of the two constrained bodies is unconstrained is implemented in MdtFixedPath.cpp. Unlike most other constraints, the user is expected to set the joint position in the constrained bodies' reference frames.


Define Documentation

#define MdtFPFOJointDisable( j )

Initializer:

\
                            MdtConstraintDisable(MdtFPFOJointQuaConstraint(j))

#define MdtFPFOJointEnable( j )

Initializer:

\
                            MdtConstraintEnable(MdtFPFOJointQuaConstraint(j))

#define MdtFPFOJointGetBody( j, bodyindex )

Initializer:

\
                            MdtConstraintGetBody(MdtFPFOJointQuaConstraint(j), bodyindex)

#define MdtFPFOJointGetForce( j, bodyindex, f )

Initializer:

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

#define MdtFPFOJointGetTorque( j, bodyindex, t )

Initializer:

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

#define MdtFPFOJointGetUserData( j )

Initializer:

\
                            MdtConstraintGetUserData(MdtFPFOJointQuaConstraint(j))

#define MdtFPFOJointGetWorld( j )

Initializer:

\
                            MdtConstraintGetWorld(MdtFPFOJointQuaConstraint(j))

#define MdtFPFOJointIsEnabled( j )

Initializer:

\
                            MdtConstraintIsEnabled(MdtFPFOJointQuaConstraint(j))

#define MdtFPFOJointSetBodies( j, b1, b2 )

Initializer:

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

#define MdtFPFOJointSetUserData( j, d )

Initializer:

\
                            MdtConstraintSetUserData(MdtFPFOJointQuaConstraint(j), d)

Function Documentation

MdtFPFOJointID MdtFPFOJointCreate ( MdtWorldID w,
MdtBodyID b1,
MdtBodyID b2 )

Creates a new full constraint joint with default parameters.

See also:
MdtFPFOJointReset()

void MdtFPFOJointDestroy ( MdtFPFOJointID j )

Destroys a full constraint joint.

void MdtFPFOJointGetPosition ( MdtFPFOJointID j,
MeVector3 position,
unsigned int bodyindex )

The full constraint joint's position with respect to one of the constrained bodies is returned in v.

The reference frame is selected by the third parameter (BodyID).

void MdtFPFOJointGetQuaternion ( MdtFPFOJointID j,
MeVector4 q1,
MeVector4 q2 )

This retrieves the bodies' individual quaternions.

Note that the equivalent mutator service sets the joint's invariant relative orientation property. This accessor will therefore not necessarily retrieve identical values to those used in an immediately preceding call to the mutator.

void MdtFPFOJointLog ( MdtFPFOJointID j )

Debug function - output constraint using MeMessage.

MdtConstraintID MdtFPFOJointQuaConstraint ( MdtFPFOJointID j )

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

void MdtFPFOJointReset ( MdtFPFOJointID j )

Sets a full constraint joint to its default values.

Note that the joint's bodies are not reset.

Default values:

Parameters:
j   full constraint joint ID

void MdtFPFOJointSetPosition ( MdtFPFOJointID j,
MeReal x,
MeReal y,
MeReal z,
unsigned int bodyindex )

Sets the full constraint joint's position with respect to one of the constrained bodies.

The reference frame is selected by the third parameter (BodyID).

void MdtFPFOJointSetQuaternion ( MdtFPFOJointID j,
MeVector4 q1,
MeVector4 q2 )

Set the invariant relative orientation vector.

Note that if the secondary body is unrotated, the input q2 should be: q2[0]==1, q2[1]==q2[2]==q2[3]==0

In this case, this service is equivalent to: j->bclFPFOJoint.rel_ori[0] = q1[1]; j->bclFPFOJoint.rel_ori[1] = q1[2]; j->bclFPFOJoint.rel_ori[2] = q1[3];

Note also that if q1 == q2, then j->bclFPFOJoint.rel_ori = {0, 0, 0}


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

Copyright MathEngine PLC 2000, all rights reserved.