definePhysicsRevoluteJoint#

Fully qualified name: usdex::core::definePhysicsRevoluteJoint

pxr::UsdPhysicsRevoluteJoint usdex::core::definePhysicsRevoluteJoint(
pxr::UsdStagePtr stage,
const pxr::SdfPath &path,
const pxr::UsdPrim &body0,
const pxr::UsdPrim &body1,
const JointFrame &frame,
const pxr::GfVec3f &axis = pxr::GfVec3f(1.0f, 0.0f, 0.0f),
std::optional<float> lowerLimit = std::nullopt,
std::optional<float> upperLimit = std::nullopt,
)#

Creates a revolute joint, which acts as a hinge around a single axis, connecting two rigid bodies.

Using the coordinate system specified by the jointFrame, the local position and rotation corresponding to body0 and body1 of the joint are automatically calculated.

The axis specifies the primary axis for rotation, based on the local joint orientation relative to each body.

  • To rotate around the X-axis, specify (1, 0, 0). To rotate in the opposite direction, specify (-1, 0, 0).

  • To rotate around the Y-axis, specify (0, 1, 0). To rotate in the opposite direction, specify (0, -1, 0).

  • To rotate around the Z-axis, specify (0, 0, 1). To rotate in the opposite direction, specify (0, 0, -1).

  • Any other direction will be aligned to X-axis via a local rotation for both bodies.

Parameters:
  • stage – The stage on which to define the joint

  • path – The absolute prim path at which to define the joint

  • body0 – The first body of the joint

  • body1 – The second body of the joint

  • frame – The position and rotation of the joint in the specified coordinate system.

  • axis – The axis of rotation

  • lowerLimit – The lower limit of the joint (degrees).

  • upperLimit – The upper limit of the joint (degrees).

Returns:

UsdPhysicsRevoluteJoint schema wrapping the defined UsdPrim