Package georegression.metric
Class Area2D_F32
java.lang.Object
georegression.metric.Area2D_F32
The area contained inside 2D shapes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic float
polygonSimple
(Polygon2D_F32 poly) Area of a simple polygon.static float
Area of a quadrilateral computed from two triangles.static float
Returns the area of the Rectanglestatic float
triangle
(Point2D_F32 a, Point2D_F32 b, Point2D_F32 c) Computes the area of an arbitrary triangle from 3-vertices.
-
Constructor Details
-
Area2D_F32
public Area2D_F32()
-
-
Method Details
-
triangle
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 1b
- Corner point 2c
- Corner point 3- Returns:
- area
-
quadrilateral
Area of a quadrilateral computed from two triangles.- Parameters:
quad
- quadrilateral- Returns:
- area
-
polygonSimple
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
Returns the area of the Rectangle- Parameters:
r
- Rectangle- Returns:
- area
-