void TA::PhysicsJoint::InitialiseHingeEx
(
|
const Vec3 &
|
v3LocalPosOnA,
|
|
const Vec3 &
|
v3LocalPosOnB,
|
|
const Vec3 &
|
v3HingeAxis,
|
|
const Vec3 &
|
v3HingeCenterDirection,
|
|
const Mat33 &
|
m33DefaultRotationA,
|
|
const Mat33 &
|
m33DefaultRotationB,
|
|
float
|
fMinAngle,
|
|
float
|
fMaxAngle
|
) |
|
|
|
This is an extended version of the function TA::PhysicsJoint::InitialiseHinge.
Call this function to initialise the joint as a hinge.
The hinge is created using TA::PhysicsJoint::InitialiseEulerConstraintEx as follows: TA::Mat33 jointOrientation;
jointOrientation.SetToLookAt(v3HingeCenterDirection, v3HingeAxis);
InitialiseEulerConstraintEx(
v3LocalPosOnA,
v3LocalPosOnB,
jointOrientation,
m33DefaultRotationA,
m33DefaultRotationB,
TA::EulerAngles(0.0f, fMinAngle, 0.0f),
TA::EulerAngles(0.0f, fMaxAngle, 0.0f));
- Note:
- To create a joint, use TA::DynamicObject::AddJoint.
- Parameters:
-
| v3LocalPosOnA |
| | The position on Object A where the joint is attached, specified in local space to Object A. |
| v3LocalPosOnB |
| | The position on Object B where the joint is attached, specified in local space to Object B. |
| v3HingeAxis |
| | The axis that the hinge is allowed to rotate about. Specified in world space. |
| v3HingeCenterDirection |
| | The Direction that min and max angles are constrained from. Must be perpendicular to v3LocalHingeAxis. Specified in world space. |
| m33DefaultRotationA |
| | Used as orientation of Object A when using v3HingeCenterDirection and v3HingeAxis to calculate the joints default orientation in relation to Object A. |
| m33DefaultRotationB |
| | Used as orientation of Object B when using v3HingeCenterDirection and v3HingeAxis to calculate the joints default orientation in relation to Object B. |
| 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. |
|
|