MathEngine
Home Page       Structures       File List       Functions and Macros      

MdtCarWheel.h File Reference

MdtCarWheel API functions. More...

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

Functions

MdtCarWheelID MdtCarWheelCreate (const MdtWorldID w, const MdtBodyID b1, const MdtBodyID b2)
 Creates a new car wheel constraint with default parameters. More...

void MdtCarWheelReset (const MdtCarWheelID j)
 Sets a car wheel joint to its default values. More...

void MdtCarWheelDestroy (const MdtCarWheelID j)
 Destroys a car wheel constraint. More...

void MdtCarWheelLog (const MdtCarWheelID j)
 Debug function - output constraint using MeMessage. More...

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

void MdtCarWheelGetPosition (const MdtCarWheelID j, MeVector3 v)
 The wheel joint's position vector is returned in v. More...

MeReal MdtCarWheelGetSteeringAngle (const MdtCarWheelID j)
 Returns the wheel joint's steering angle. More...

MeReal MdtCarWheelGetSteeringAngleRate (const MdtCarWheelID j)
 Returns the wheel joint's steering angle rate. More...

void MdtCarWheelGetSteeringAxis (const MdtCarWheelID j, MeVector3 v)
 The wheel joint's steering axis is returned in v. More...

MeReal MdtCarWheelGetHingeAngle (const MdtCarWheelID j)
 Returns the wheel joint's current hinge angle as a value between zero and pi radians, inclusive. More...

MeReal MdtCarWheelGetHingeAngleRate (const MdtCarWheelID j)
 Returns the wheel joint's hinge angle rate. More...

void MdtCarWheelGetHingeAxis (const MdtCarWheelID j, MeVector3 v)
 The wheel joint's Hinge axis is returned in v. More...

MeReal MdtCarWheelGetSuspensionHeight (const MdtCarWheelID j)
 Returns the wheel joint's suspension height. More...

MeReal MdtCarWheelGetSteeringMotorDesiredVelocity ( const MdtCarWheelID j)
 Returns the desired velocity of the steering motor. More...

MeReal MdtCarWheelGetSteeringMotorMaxForce ( const MdtCarWheelID j)
 Returns the maximum force that the steering motor is allowed to use to attain its desired velocity. More...

int MdtCarWheelIsSteeringLocked (const MdtCarWheelID j)
 Returns the lock state of the steering angle. More...

MeReal MdtCarWheelGetHingeMotorDesiredVelocity ( const MdtCarWheelID j)
 Returns the desired velocity of the hinge motor. More...

MeReal MdtCarWheelGetHingeMotorMaxForce ( const MdtCarWheelID j)
 Returns the maximum force that the hinge motor is allowed to use to attain its desired velocity. More...

MeReal MdtCarWheelGetSuspensionHighLimit ( const MdtCarWheelID j)
 Returns the suspension upper limit. More...

MeReal MdtCarWheelGetSuspensionLowLimit ( const MdtCarWheelID j)
 Returns the suspension lower limit. More...

MeReal MdtCarWheelGetSuspensionLimitSoftness ( const MdtCarWheelID j)
 Returns the suspension limit softness. More...

MeReal MdtCarWheelGetSuspensionReference ( const MdtCarWheelID j)
 Returns the suspension attachment point ("reference"). More...

MeReal MdtCarWheelGetSuspensionKp (const MdtCarWheelID j)
 Returns the suspension "proportionality constant". More...

MeReal MdtCarWheelGetSuspensionKd (const MdtCarWheelID j)
 Returns the suspension "damping constant" (also known as the "derivative constant"). More...

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

void MdtCarWheelSetSteeringAxis (const MdtCarWheelID j, const MeReal x, const MeReal y, const MeReal z)
 Sets the wheel joint's steering axis. More...

void MdtCarWheelSetSteeringLimitedForceMotor ( const MdtCarWheelID j, const MeReal desiredVelocity, const MeReal forceLimit)
 Sets the limited force motor parameters of car wheel joint. More...

void MdtCarWheelSetSteeringLock (const MdtCarWheelID j, const int lock)
 Locks or unlocks the steering angle. More...

void MdtCarWheelSetHingeAxis (const MdtCarWheelID j, const MeReal x, const MeReal y, const MeReal z)
 Returns the wheel joint's Hinge axis. More...

void MdtCarWheelSetHingeLimitedForceMotor (const MdtCarWheelID j, const MeReal desiredVelocity, const MeReal forceLimit)
 Sets the hinge limited force motor parameters. More...

void MdtCarWheelSetSuspension (const MdtCarWheelID j, const MeReal Kp, const MeReal Kd, const MeReal limit_softness, const MeReal lolimit, const MeReal hilimit, const MeReal reference)
 Sets the suspension parameters. More...


Detailed Description

MdtCarWheel API functions.


Define Documentation

#define MdtCarWheelDisable( j )

Initializer:

\
                            MdtConstraintDisable(MdtCarWheelQuaConstraint(j))

#define MdtCarWheelEnable( j )

Initializer:

\
                            MdtConstraintEnable(MdtCarWheelQuaConstraint(j))

#define MdtCarWheelGetBody( j, bodyindex )

Initializer:

\
                            MdtConstraintGetBody(MdtCarWheelQuaConstraint(j), bodyindex)

#define MdtCarWheelGetForce( j, bodyindex, f )

Initializer:

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

#define MdtCarWheelGetTorque( j, bodyindex, t )

Initializer:

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

#define MdtCarWheelGetUserData( j )

Initializer:

\
                            MdtConstraintGetUserData(MdtCarWheelQuaConstraint(j))

#define MdtCarWheelGetWorld( j )

Initializer:

\
                            MdtConstraintGetWorld(MdtCarWheelQuaConstraint(j))

#define MdtCarWheelIsEnabled( j )

Initializer:

\
                            MdtConstraintIsEnabled(MdtCarWheelQuaConstraint(j))

#define MdtCarWheelSetBodies( j, b1, b2 )

Initializer:

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

#define MdtCarWheelSetUserData( j, d )

Initializer:

\
                            MdtConstraintSetUserData(MdtCarWheelQuaConstraint(j), d)

Function Documentation

MdtCarWheelID MdtCarWheelCreate ( MdtWorldID w,
MdtBodyID b1,
MdtBodyID b2 )

Creates a new car wheel constraint with default parameters.

Note that the chassis of the car must be the first body.

See also:
MdtCarWheelReset()

void MdtCarWheelDestroy ( MdtCarWheelID j )

Destroys a car wheel constraint.

MeReal MdtCarWheelGetHingeAngle ( MdtCarWheelID j )

Returns the wheel joint's current hinge angle as a value between zero and pi radians, inclusive.

MeReal MdtCarWheelGetHingeAngleRate ( MdtCarWheelID j )

Returns the wheel joint's hinge angle rate.

void MdtCarWheelGetHingeAxis ( MdtCarWheelID j,
MeVector3 v )

The wheel joint's Hinge axis is returned in v.

MeReal MdtCarWheelGetHingeMotorDesiredVelocity ( MdtCarWheelID j )

Returns the desired velocity of the hinge motor.

MeReal MdtCarWheelGetHingeMotorMaxForce ( MdtCarWheelID j )

Returns the maximum force that the hinge motor is allowed to use to attain its desired velocity.

void MdtCarWheelGetPosition ( MdtCarWheelID j,
MeVector3 v )

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

MeReal MdtCarWheelGetSteeringAngle ( MdtCarWheelID j )

Returns the wheel joint's steering angle.

MeReal MdtCarWheelGetSteeringAngleRate ( MdtCarWheelID j )

Returns the wheel joint's steering angle rate.

void MdtCarWheelGetSteeringAxis ( MdtCarWheelID j,
MeVector3 v )

The wheel joint's steering axis is returned in v.

MeReal MdtCarWheelGetSteeringMotorDesiredVelocity ( MdtCarWheelID j )

Returns the desired velocity of the steering motor.

MeReal MdtCarWheelGetSteeringMotorMaxForce ( MdtCarWheelID j )

Returns the maximum force that the steering motor is allowed to use to attain its desired velocity.

MeReal MdtCarWheelGetSuspensionHeight ( MdtCarWheelID j )

Returns the wheel joint's suspension height.

MeReal MdtCarWheelGetSuspensionHighLimit ( MdtCarWheelID j )

Returns the suspension upper limit.

MeReal MdtCarWheelGetSuspensionKd ( MdtCarWheelID j )

Returns the suspension "damping constant" (also known as the "derivative constant").

This gives rise to the damping term in the suspension force equation: f = kp*displacement + kd*velocity

MeReal MdtCarWheelGetSuspensionKp ( MdtCarWheelID j )

Returns the suspension "proportionality constant".

This gives rise to the spring term in the suspension force equation: f = kp*displacement + kd*velocity.

MeReal MdtCarWheelGetSuspensionLimitSoftness ( MdtCarWheelID j )

Returns the suspension limit softness.

MeReal MdtCarWheelGetSuspensionLowLimit ( MdtCarWheelID j )

Returns the suspension lower limit.

MeReal MdtCarWheelGetSuspensionReference ( MdtCarWheelID j )

Returns the suspension attachment point ("reference").

int MdtCarWheelIsSteeringLocked ( MdtCarWheelID j )

Returns the lock state of the steering angle.

lock is 1 if steering axis is locked at angle 0.

void MdtCarWheelLog ( MdtCarWheelID j )

Debug function - output constraint using MeMessage.

MdtConstraintID MdtCarWheelQuaConstraint ( MdtCarWheelID j )

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

void MdtCarWheelReset ( MdtCarWheelID j )

Sets a car wheel joint to its default values.

Note that the joint's bodies are not reset.

Parameters:
j   car wheel joint ID

void MdtCarWheelSetHingeAxis ( MdtCarWheelID j,
MeReal x,
MeReal y,
MeReal z )

Returns the wheel joint's Hinge axis.

void MdtCarWheelSetHingeLimitedForceMotor ( MdtCarWheelID j,
MeReal desiredVelocity,
MeReal forceLimit )

Sets the hinge limited force motor parameters.

void MdtCarWheelSetPosition ( MdtCarWheelID j,
MeReal x,
MeReal y,
MeReal z )

Sets the joint position in world coordinates.

void MdtCarWheelSetSteeringAxis ( MdtCarWheelID j,
MeReal x,
MeReal y,
MeReal z )

Sets the wheel joint's steering axis.

void MdtCarWheelSetSteeringLimitedForceMotor ( MdtCarWheelID j,
MeReal desiredVelocity,
MeReal forceLimit )

Sets the limited force motor parameters of car wheel joint.

void MdtCarWheelSetSteeringLock ( MdtCarWheelID j,
int lock )

Locks or unlocks the steering angle.

void MdtCarWheelSetSuspension ( MdtCarWheelID j,
MeReal Kp,
MeReal Kd,
MeReal limit_softness,
MeReal lolimit,
MeReal hilimit,
MeReal reference )

Sets the suspension parameters.


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.