Package georegression.metric
Class Area2D_F64
java.lang.Object
georegression.metric.Area2D_F64
The area contained inside 2D shapes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
polygonSimple
(Polygon2D_F64 poly) Area of a simple polygon.static double
Area of a quadrilateral computed from two triangles.static double
Returns the area of the Rectanglestatic double
triangle
(Point2D_F64 a, Point2D_F64 b, Point2D_F64 c) Computes the area of an arbitrary triangle from 3-vertices.
-
Constructor Details
-
Area2D_F64
public Area2D_F64()
-
-
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
-