MathEngine
Home Page       Structures       File List       Functions and Macros      

MdtBSJoint.h File Reference

MdtBSJoint API functions. More...

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

Functions

MdtBSJointID MdtBSJointCreate (const MdtWorldID w, const MdtBodyID b1, const MdtBodyID b2)
 Creates a new ball and socket joint with default parameters. More...

void MdtBSJointReset (const MdtBSJointID j)
 Sets a ball and socket joint to its default values. More...

void MdtBSJointDestroy (const MdtBSJointID j)
 Destroys a ball and socket joint. More...

void MdtBSJointLog (const MdtBSJointID j)
 Debug function - output constraint using MeMessage. More...

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

void MdtBSJointGetPosition (const MdtBSJointID j, MeVector3 v)
 The ball and socket joint's position vector is returned in v. More...

void MdtBSJointGetPrimaryAxis (const MdtBSJointID j, MeVector3 axis, const unsigned int bodyindex)
 Returns the primary axis vector of the body given by bodyindex (0 or 1). More...

void MdtBSJointGetOrthogonalAxis (const MdtBSJointID j, MeVector3 axis, const unsigned int bodyindex)
 Returns the orthogonal axis vector of the body given by bodyindex (0 or 1). More...

MdtLimitID MdtBSJointGetLimit (const MdtBSJointID j, const unsigned int LimitID)
 Provides read/write access to the constraint limits. More...

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

void MdtBSJointSetPrimaryAxis (const MdtBSJointID j, const MeReal x, const MeReal y, const MeReal z, const unsigned int bodyindex)
 Sets the primary axis vector of the body given by bodyindex (0 or 1). More...

int MdtBSJointSetOrthogonalAxis (const MdtBSJointID j, const MeReal x, const MeReal y, const MeReal z, const unsigned int bodyindex)
 Attempts to set an axis vector of the body given by bodyindex (0 or 1) which is the orthogonal to the body's primary axis. More...

void MdtBSJointSetLimit (const MdtBSJointID j, const MdtLimitID NewLimit, const unsigned int LimitID)
 Resets the joint limit and then copies the public attributes of NewLimit. More...


Detailed Description

MdtBSJoint API functions.


Define Documentation

#define MdtBSJointDisable( j )

Initializer:

\
                            MdtConstraintDisable(MdtBSJointQuaConstraint(j))

#define MdtBSJointEnable( j )

Initializer:

\
                            MdtConstraintEnable(MdtBSJointQuaConstraint(j))

#define MdtBSJointGetBody( j, bodyindex )

Initializer:

\
                            MdtConstraintGetBody(MdtBSJointQuaConstraint(j), bodyindex)

#define MdtBSJointGetForce( j, bodyindex, f )

Initializer:

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

#define MdtBSJointGetTorque( j, bodyindex, t )

Initializer:

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

#define MdtBSJointGetUserData( j )

Initializer:

\
                            MdtConstraintGetUserData(MdtBSJointQuaConstraint(j))

#define MdtBSJointGetWorld( j )

Initializer:

\
                            MdtConstraintGetWorld(MdtBSJointQuaConstraint(j))

#define MdtBSJointIsEnabled( j )

Initializer:

\
                            MdtConstraintIsEnabled(MdtBSJointQuaConstraint(j))

#define MdtBSJointSetBodies( j, b1, b2 )

Initializer:

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

#define MdtBSJointSetUserData( j, d )

Initializer:

\
                            MdtConstraintSetUserData(MdtBSJointQuaConstraint(j), d)

Function Documentation

MdtBSJointID MdtBSJointCreate ( MdtWorldID w,
MdtBodyID b1,
MdtBodyID b2 )

Creates a new ball and socket joint with default parameters.

See also:
MdtBSJointReset()

void MdtBSJointDestroy ( MdtBSJointID j )

Destroys a ball and socket joint.

MdtLimitID MdtBSJointGetLimit ( MdtBSJointID j,
unsigned int LimitID )

Provides read/write access to the constraint limits.

LimitID values correspond to the following rotational degrees of freedom:

0 - rho (twist angle) 1 - theta (cone, or polar, angle) 2 - phi (segment, or longitudinal, angle).

void MdtBSJointGetOrthogonalAxis ( MdtBSJointID j,
MeVector3 axis,
unsigned int bodyindex )

Returns the orthogonal axis vector of the body given by bodyindex (0 or 1).

The returned vector is in the inertial reference frame.

void MdtBSJointGetPosition ( MdtBSJointID j,
MeVector3 v )

The ball and socket joint's position vector is returned in v.

The position is returned in the world reference frame.

void MdtBSJointGetPrimaryAxis ( MdtBSJointID j,
MeVector3 axis,
unsigned int bodyindex )

Returns the primary axis vector of the body given by bodyindex (0 or 1).

The returned vector is in the inertial reference frame.

void MdtBSJointLog ( MdtBSJointID j )

Debug function - output constraint using MeMessage.

MdtConstraintID MdtBSJointQuaConstraint ( MdtBSJointID j )

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

void MdtBSJointReset ( MdtBSJointID j )

Sets a ball and socket joint to its default values.

Note that the joint's bodies are not reset.

A default ball and socket joint has the following characteristics:

Parameters:
j   ball and socket joint ID

void MdtBSJointSetLimit ( MdtBSJointID j,
MdtLimitID NewLimit,
unsigned int LimitID )

Resets the joint limit and then copies the public attributes of NewLimit.

LimitID values correspond to the following rotational degrees of freedom:

0 - rho (twist angle) 1 - theta (cone, or polar, angle) 2 - phi (segment, or longitudinal, angle).

int MdtBSJointSetOrthogonalAxis ( MdtBSJointID j,
MeReal x,
MeReal y,
MeReal z,
unsigned int bodyindex )

Attempts to set an axis vector of the body given by bodyindex (0 or 1) which is the orthogonal to the body's primary axis.

The vector is set in the inertial reference frame. This service returns a non-zero value if it succeeds. If the input axis is not orthogonal to the primary axis, the service fails: it returns zero without changing the hinge in any way.

void MdtBSJointSetPosition ( MdtBSJointID j,
MeReal x,
MeReal y,
MeReal z )

Sets the joint position in world coordinates.

void MdtBSJointSetPrimaryAxis ( MdtBSJointID j,
MeReal x,
MeReal y,
MeReal z,
unsigned int bodyindex )

Sets the primary axis vector of the body given by bodyindex (0 or 1).

The vector is set in the inertial reference frame.


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

Copyright MathEngine PLC 2000, all rights reserved.