Class Area2D_F32

java.lang.Object
georegression.metric.Area2D_F32

@Generated("georegression.metric.Area2D_F64") public class Area2D_F32 extends Object
The area contained inside 2D shapes
  • Constructor Details

    • Area2D_F32

      public Area2D_F32()
  • Method Details

    • triangle

      public static float triangle(Point2D_F32 a, Point2D_F32 b, Point2D_F32 c)
      Computes the area of an arbitrary triangle from 3-vertices. area = | a.x*(b.y - c.y) + b.x*(c.y - a.y) + c.x*(a.y - b.y) | / 2
      Parameters:
      a - Corner point 1
      b - Corner point 2
      c - Corner point 3
      Returns:
      area
    • quadrilateral

      public static float quadrilateral(Quadrilateral_F32 quad)
      Area of a quadrilateral computed from two triangles.
      Parameters:
      quad - quadrilateral
      Returns:
      area
    • polygonSimple

      public static float polygonSimple(Polygon2D_F32 poly)
      Area of a simple polygon. Meaning it can be concave or convex, but can't have self intersections
      Parameters:
      poly - Simple polygon
      Returns:
      area
    • rectangle

      public static float rectangle(Rectangle2D_F32 r)
      Returns the area of the Rectangle
      Parameters:
      r - Rectangle
      Returns:
      area