PxEllipseClamp#

Defined in include/foundation/PxMathUtils.h

inline PxVec3 PxEllipseClamp(
const PxVec3 &point,
const PxVec3 &radii,
)#

Compute the closest point on an 2d ellipse to a given 2d point.

Parameters:
  • point[in] is a 2d point in the y-z plane represented by (point.y, point.z)

  • radii[in] are the radii of the ellipse (radii.y and radii.z) in the y-z plane.

Returns:

Returns the 2d position on the surface of the ellipse that is closest to point.