sweepShapeClosest#

Fully qualified name: isaacsim::physics::manager::sweepShapeClosest

bool isaacsim::physics::manager::sweepShapeClosest(
registration::PathToken geometryPrimitivePath,
const isaacsim::physics::registration::Float3 &unitDirection,
float distance,
registration::SweepHit &hit,
bool bothSides,
)#

Finds the closest hit produced by sweeping a USD geometric primitive through the scene.

Note

A backend may use and cache a convex approximation for a mesh query shape. This behavior is backend-specific.

Note

Exceptions that escape a backend query callback propagate to the caller and prevent dispatch to later backends.

Parameters:
  • geometryPrimitivePath – [in] Encoded USD path of the UsdGeomGPrim used as the sweep shape.

  • unitDirection – [in] Normalized sweep direction.

  • distance – [in] Maximum sweep distance in scene length units. Must be nonnegative.

  • hit – [out] Closest hit. The value is modified only when the function returns true.

  • bothSides – [in] Whether both sides of mesh triangles participate in the query.

Returns:

true if the shape encountered an object; otherwise, false.