public class ConvexityDefect extends Object
Modifier and Type | Field and Description |
---|---|
Point2d |
deepestPoint
The deepest point on the shape polygon
|
float |
depth
The depth of the deepest point
|
Point2d |
end
The ending point on the convex hull
|
Point2d |
start
The starting point on the convex hull
|
Modifier and Type | Method and Description |
---|---|
static List<ConvexityDefect> |
findDefects(Polygon p)
Find the defects of the given polygon.
|
static List<ConvexityDefect> |
findDefects(Polygon p,
Polygon hull)
Find the defects of the given polygon, based on the given convex hull
|
Triangle |
getTriangle()
Get the triangle represented by this defect.
|
public Point2d deepestPoint
public float depth
public Triangle getTriangle()
public static List<ConvexityDefect> findDefects(Polygon p)
p
- the polygonpublic static List<ConvexityDefect> findDefects(Polygon p, Polygon hull)
p
- the polygonhull
- the convex hull of the polygon