/** * Returns distance from the point to the boundary of this polygon. The return value * is positive if the point is inside and negative if it is outside. */ public double getSignedDistance(FramePoint2d point) { return ConvexPolygon2dCalculator.getSignedDistance(point.tuple, this.convexPolygon); }
@Override public double distance(Point2d point) { return Math.max(0.0, ConvexPolygon2dCalculator.getSignedDistance(point, this)); }
public boolean pointIsOnPerimeter(Point2d point) { return Math.abs(ConvexPolygon2dCalculator.getSignedDistance(point, this)) < 1.0E-10; }