rapid-sdk
    Preparing search index...

    Function geomGetSurroundingRectangle

    • A generalized function for computing a surrounding rectangle for a given array of points. The caller supplies getScore and isBetter functions that define the heuristic which determines what kind of rectangle to return.

      Parameters

      • points: Vec2[]
      • getScore: (extent: Extent) => number
      • isBetter: (score: number, bestScore: number) => boolean
      • initialBestScore: number
      • OptionalcandidateAngles: number[]

        optional axis angles to check instead of the convex hull edge angles

      Returns SurroundingRectangle | null

      A SurroundingRectangle (polygon and angle), or null if the given points did not produce a valid hull.