MathEngine
Home Page       Structures       File List       Functions and Macros      

MdtLinear1.h File Reference

MdtLinear1 API functions. More...

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

Functions

MdtLinear1ID MdtLinear1Create (const MdtWorldID w, const MdtBodyID b1, const MdtBodyID b2)
 Creates a new linear 1 joint with default parameters. More...

void MdtLinear1Reset (const MdtLinear1ID j)
 Sets a linear1 joint to its default values. More...

void MdtLinear1Destroy (const MdtLinear1ID j)
 Destroys a linear 1 joint. More...

void MdtLinear1Log (const MdtLinear1ID j)
 Debug function - output constraint using MeMessage. More...

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

void MdtLinear1GetPosition (const MdtLinear1ID j, MeVector3 position)
 The linear 1 joint's position vector is returned in v. More...

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


Detailed Description

MdtLinear1 API functions.

The primary body is constrained to lie in a plane fixed in the reference frame of the second body (or the inertial frame). The plane normal is the vector from the secondary body to the joint position in the reference frame of the secondary body. If there is no secondary body, the plane normal is the vector from the origin to the joint position.


Define Documentation

#define MdtLinear1Disable( j )

Initializer:

\
                            MdtConstraintDisable(MdtLinear1QuaConstraint(j))

#define MdtLinear1Enable( j )

Initializer:

\
                            MdtConstraintEnable(MdtLinear1QuaConstraint(j))

#define MdtLinear1GetBody( j, bodyindex )

Initializer:

\
                            MdtConstraintGetBody(MdtLinear1QuaConstraint(j), bodyindex)

#define MdtLinear1GetForce( j, bodyindex, f )

Initializer:

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

#define MdtLinear1GetTorque( j, bodyindex, t )

Initializer:

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

#define MdtLinear1GetUserData( j )

Initializer:

\
                            MdtConstraintGetUserData(MdtLinear1QuaConstraint(j))

#define MdtLinear1GetWorld( j )

Initializer:

\
                            MdtConstraintGetWorld(MdtLinear1QuaConstraint(j))

#define MdtLinear1IsEnabled( j )

Initializer:

\
                            MdtConstraintIsEnabled(MdtLinear1QuaConstraint(j))

#define MdtLinear1SetBodies( j, b1, b2 )

Initializer:

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

#define MdtLinear1SetUserData( j, d )

Initializer:

\
                            MdtConstraintSetUserData(MdtLinear1QuaConstraint(j), d)

Function Documentation

MdtLinear1ID MdtLinear1Create ( MdtWorldID w,
MdtBodyID b1,
MdtBodyID b2 )

Creates a new linear 1 joint with default parameters.

See also:
MdtLinear1Reset()

void MdtLinear1Destroy ( MdtLinear1ID j )

Destroys a linear 1 joint.

void MdtLinear1GetPosition ( MdtLinear1ID j,
MeVector3 position )

The linear 1 joint's position vector is returned in v.

void MdtLinear1Log ( MdtLinear1ID j )

Debug function - output constraint using MeMessage.

MdtConstraintID MdtLinear1QuaConstraint ( MdtLinear1ID j )

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

void MdtLinear1Reset ( MdtLinear1ID j )

Sets a linear1 joint to its default values.

Note that the joint's bodies are not reset.

Default values:

Parameters:
j   linear 1 joint ID

void MdtLinear1SetPosition ( MdtLinear1ID j,
MeReal x,
MeReal y,
MeReal z )

Sets the joint position in world coordinates.

The joint position with respect to the secondary body defines the plane normal for this joint. The joint position is therefore not allowed to be coincident with the secondary body, or with the origin of the inertial frame if there is no secondary body.

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:48 2000

Copyright MathEngine PLC 2000, all rights reserved.