PxD6JointCreate_Pyramid

Defined in include/extensions/PxD6JointCreate.h

PxJoint *PxD6JointCreate_Pyramid(PxPhysics &physics, PxRigidActor *actor0, const PxVec3 &localPos0, PxRigidActor *actor1, const PxVec3 &localPos1, const PxVec3 &axis, float minLimit1, float maxLimit1, float minLimit2, float maxLimit2)

Helper function to create a D6 joint with pyramidal swing limits.

This function supports a pyramid limit shape, defined by two pairs of angular limit values. This can be used to create an asymmetric pyramid. If the angular limit values are symmetric (i.e. minLimit1=-maxLimit1 and minLimit2=-maxLimit2) then the pyramid axis is the X axis in actor0’s space. By default minLimit1/maxLimit1 are limits around the joint’s Y axis, and minLimit2/maxLimit2 are limits around the joint’s Z axis.

The function creates hard limits, and uses PhysX’s default contact distance parameter.

Limits are expressed in radians. Allowed range is ]-PI;PI[.

The pyramid axis is equivalent to the twist axis for the D6 joint. The twist motion is not limited.

See also

PxD6Joint

Parameters
  • physics[in] The physics SDK

  • actor0[in] An actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame

  • localPos0[in] The position of the joint relative to actor0

  • actor1[in] An actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame

  • localPos1[in] The position of the joint relative to actor1

  • axis[in] The pyramid axis, expressed in the actors’ local space

  • minLimit1[in] Min angular limit along the joint frame’s second axis (first axis = pyramid axis)

  • maxLimit1[in] Max angular limit along the joint frame’s second axis (first axis = pyramid axis)

  • minLimit2[in] Min angular limit along the joint frame’s third axis (first axis = pyramid axis)

  • maxLimit2[in] Max angular limit along the joint frame’s third axis (first axis = pyramid axis)

Returns

The created joint.