Class AreaIntersectionPolygon2D_F64

java.lang.Object
georegression.geometry.polygon.AreaIntersectionPolygon2D_F64

public class AreaIntersectionPolygon2D_F64 extends Object

Computes the area of intersection between two convex polygons. Port of code found at [1] and Java version by Lagado.

[1] http://www.cap-lore.com/MathPhys/IP/
  • Constructor Details

    • AreaIntersectionPolygon2D_F64

      public AreaIntersectionPolygon2D_F64()
  • Method Details

    • computeArea

      public double computeArea(Polygon2D_F64 a, Polygon2D_F64 b)

      Computes the area of the intersection between the two polygons.

      Note: the area result has little more accuracy than a float This is true even if the polygon is specified with doubles.
      Parameters:
      a - Polygon A
      b - Polygon B
      Returns:
      area of intersection. Negative if the order (CW vs CCW) do not match.