Class Distance2D_F32
closest point
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic float
distance
(EllipseRotated_F32 ellipse, Point2D_F32 p) Euclidean distance of closest point on ellipse to point 'p'.static float
distance
(LineGeneral2D_F32 line, Point2D_F32 p) Returns the Euclidean distance of the closest point on the line to the specified point.static float
distance
(LineParametric2D_F32 line, float x, float y) Returns the Euclidean distance of the closest point on the line from a point.static float
distance
(LineParametric2D_F32 line, Point2D_F32 p) Returns the Euclidean distance of the closest point on the line from a point.static float
distance
(LineSegment2D_F32 line, float x, float y) Returns the Euclidean distance of the closest point on a line segment to the specified point.static float
distance
(LineSegment2D_F32 segmentA, LineSegment2D_F32 segmentB) Finds the distance between the two line segmentsstatic float
distance
(LineSegment2D_F32 line, Point2D_F32 p) Returns the Euclidean distance of the closest point on a line segment to the specified point.static float
distance
(Polygon2D_F32 poly, Point2D_F32 p) Returns the Euclidean distance of the closest point on the Polygon to the provided point.static float
distance
(Quadrilateral_F32 quad, Point2D_F32 p) Returns the Euclidean distance of the closest point on the quadrilateral to the provided point.static float
distance2
(EllipseRotated_F32 ellipse, Point2D_F32 p) Euclidean distance squared of closest point on ellipse to point 'p'.static float
distanceNorm
(LineGeneral2D_F32 line, Point2D_F32 p) Returns the signed Euclidean distance of the closest point on the line to the specified point.static float
Returns the distance of the closest point on the line from the originstatic float
distanceSq
(LineParametric2D_F32 line, float x, float y) Returns the Euclidean distance squared of the closest point on the line from a point.static float
distanceSq
(LineParametric2D_F32 line, Point2D_F32 p) Returns the Euclidean distance squared of the closest point on the line from a point.static float
distanceSq
(LineSegment2D_F32 line, float x, float y) Returns the Euclidean distance squared of the closest point on a line segment to the specified point.static float
distanceSq
(LineSegment2D_F32 segmentA, LineSegment2D_F32 segmentB) Finds the distance squared between the two line segmentsstatic float
distanceSq
(LineSegment2D_F32 line, Point2D_F32 p) Returns the Euclidean distance squared of the closest point on a line segment to the specified point.static float
distanceSq
(Polygon2D_F32 poly, Point2D_F32 p, @Nullable LineSegment2D_F32 storage) Returns the Euclidean distance squared of the closest point on the Polygon to the provided point.static float
distanceSq
(Quadrilateral_F32 quad, Point2D_F32 p) Returns the Euclidean distance squared of the closest point on the quadrilateral to the provided point.static float
scoreIoU
(Polygon2D_F32 a, Polygon2D_F32 b, @Nullable AreaIntersectionPolygon2D_F32 computeArea) Returns the Intersection Over Union (IoU) score for two simple polygonstatic float
Returns the Intersection Over Union (IoU) score
-
Constructor Details
-
Distance2D_F32
public Distance2D_F32()
-
-
Method Details
-
distance
Returns the Euclidean distance of the closest point on the line from a point.
- Parameters:
line
- A line segment. Not modified.p
- The point. Not modified.- Returns:
- Distance the closest point on the line is away from the point.
-
distance
Returns the Euclidean distance of the closest point on the line from a point.
- Parameters:
line
- A line segment. Not modified.x
- Point's x-coordinatey
- Point's y-coordinate- Returns:
- Distance the closest point on the line is away from the point.
-
distanceSq
Returns the Euclidean distance squared of the closest point on the line from a point.
- Parameters:
line
- A line segment. Not modified.p
- The point. Not modified.- Returns:
- Euclidean distance squared to the closest point on the line is away from the point.
-
distanceSq
Returns the Euclidean distance squared of the closest point on the line from a point.
- Parameters:
line
- A line segment. Not modified.x
- Point's x-coordinatey
- Point's y-coordinate- Returns:
- Euclidean distance squared to the closest point on the line is away from the point.
-
distance
Returns the Euclidean distance of the closest point on a line segment to the specified point.
- Parameters:
line
- A line segment. Not modified.p
- The point. Not modified.- Returns:
- Euclidean distance of the closest point on a line is away from a point.
-
distance
Returns the Euclidean distance of the closest point on a line segment to the specified point.
- Parameters:
line
- A line segment. Not modified.x
- Point's x-coordinatey
- Point's y-coordinate- Returns:
- Euclidean distance of the closest point on a line is away from a point.
-
distanceSq
Returns the Euclidean distance squared of the closest point on a line segment to the specified point.
- Parameters:
line
- A line segment. Not modified.p
- The point. Not modified.- Returns:
- Euclidean distance squared of the closest point on a line is away from a point.
-
distanceSq
Returns the Euclidean distance squared of the closest point on a line segment to the specified point.
- Parameters:
line
- Line segment. Not modified.x
- Point's x-coordinatey
- Point's y-coordinate- Returns:
- Euclidean distance squared of the closest point on a line is away from a point.
-
distance
Finds the distance between the two line segments- Parameters:
segmentA
- Line segment. Not modified.segmentB
- Line segment. Not modified.- Returns:
- Euclidean distance of the closest point between the two line segments.
-
distanceSq
Finds the distance squared between the two line segments- Parameters:
segmentA
- Line segment. Not modified.segmentB
- Line segment. Not modified.- Returns:
- Euclidean distance squared of the closest point between the two line segments.
-
distance
Returns the Euclidean distance of the closest point on the quadrilateral to the provided point.- Parameters:
quad
- Quadrilateralp
- Point- Returns:
- Distance apart
-
distanceSq
Returns the Euclidean distance squared of the closest point on the quadrilateral to the provided point.- Parameters:
quad
- Quadrilateralp
- Point- Returns:
- Distance squared apart
-
distance
Returns the Euclidean distance of the closest point on the Polygon to the provided point.- Parameters:
poly
- Polygon2Dp
- Point- Returns:
- Distance squared apart
-
distanceSq
public static float distanceSq(Polygon2D_F32 poly, Point2D_F32 p, @Nullable @Nullable LineSegment2D_F32 storage) Returns the Euclidean distance squared of the closest point on the Polygon to the provided point.- Parameters:
poly
- Polygon2Dp
- Pointstorage
- Optional storage for linesegment which is used internally to compute the distance- Returns:
- Distance squared apart
-
distance
Returns the Euclidean distance of the closest point on the line to the specified point.
- Parameters:
line
- A line. Not modified.p
- The point. Not modified.- Returns:
- Euclidean distance of the closest point on the line to the specified point.
-
distanceNorm
Returns the signed Euclidean distance of the closest point on the line to the specified point. The line is assumed be normalized. See
LineGeneral2D_F32
for details on normalization.- Parameters:
line
- A normalized line. Not modified.p
- The point. Not modified.- Returns:
- Euclidean distance of the closest point on the line to the specified point.
-
distanceOrigin
Returns the distance of the closest point on the line from the origin- Parameters:
line
- Line- Returns:
- Euclidean distance
-
distance
Euclidean distance of closest point on ellipse to point 'p'.- Parameters:
ellipse
- Ellipsep
- Point- Returns:
- Euclidean distance
-
distance2
Euclidean distance squared of closest point on ellipse to point 'p'.- Parameters:
ellipse
- Ellipsep
- Point- Returns:
- Euclidean distance squared
-
scoreIoU
Returns the Intersection Over Union (IoU) score- Parameters:
a
- (Input) rectangleb
- (Input) rectangle- Returns:
- IoU score
-
scoreIoU
public static float scoreIoU(Polygon2D_F32 a, Polygon2D_F32 b, @Nullable @Nullable AreaIntersectionPolygon2D_F32 computeArea) Returns the Intersection Over Union (IoU) score for two simple polygon- Parameters:
a
- (Input) Simple polygonb
- (Input) Simple polygon- Returns:
- IoU score
-