True Axis Physics SDK 1.2.0.1 Beta Documentation
www.trueaxis.com

void TA::PhysicsJoint::InitialiseHinge (
const Vec3 &   v3Position,
const Vec3 &   v3HingeAxis,
float   fMinAngle,
float   fMaxAngle
 

Call this function to initialise the joint as a hinge.

The hinge is created using TA::PhysicsJoint::InitialiseEulerConstraint as follows:

    TA::Mat33 jointOrientation;
    jointOrientation.SetToLookAt(v3HingeCenterDirection, v3HingeAxis);
   
    InitialiseEulerConstraint(
        v3Position,
        jointOrientation,
        TA::EulerAngles(0.0f, fMinAngle, 0.0f),
        TA::EulerAngles(0.0f, fMaxAngle, 0.0f));

Note:
To create a joint, use TA::DynamicObject::AddJoint.
See also:
TA::DynamicObject::InitialiseHingeEx.
Parameters:
v3Position
The location, in world space, where the 2 objects are joined.
v3HingeAxis
The axis that the hinge is allowed to rotate about. Specified in world space.
fMinAngle
The minimum euler angle constraints. To ignore a constraint use the value TA::JOINT_LIMIT_DISABLED.
fMaxAngle
The maximum euler angle constraints. To ignore a constraint use the value TA::JOINT_LIMIT_DISABLED.
Examples:
HingeJointExample.cpp.



© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.