b2ComputeHull

Function b2ComputeHull 

Source
pub unsafe extern "C" fn b2ComputeHull(
    points: *const b2Vec2,
    count: c_int,
) -> b2Hull
Expand description

Compute the convex hull of a set of points. Returns an empty hull if it fails. Some failure cases:

  • all points very close together
  • all points on a line
  • less than 3 points
  • more than B2_MAX_POLYGON_VERTICES points This welds close points and removes collinear points. @warning Do not modify a hull once it has been computed