Class AreaIntersectionPolygon2D_F32

java.lang.Object
georegression.geometry.polygon.AreaIntersectionPolygon2D_F32

@Generated("georegression.geometry.polygon.AreaIntersectionPolygon2D_F64") public class AreaIntersectionPolygon2D_F32 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_F32

      public AreaIntersectionPolygon2D_F32()
  • Method Details

    • computeArea

      public float computeArea(Polygon2D_F32 a, Polygon2D_F32 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 floats.
      Parameters:
      a - Polygon A
      b - Polygon B
      Returns:
      area of intersection. Negative if the order (CW vs CCW) do not match.