Documentation of 'georegression.metric.ClosestPoint2D_F64' Java class
ClosestPoint2D_F64
georegression.metric

Class ClosestPoint2D_F64



  • public class ClosestPoint2D_F64
    extends java.lang.Object
    Functions related to finding the closest point(s) on one shape from another shape.
    • Constructor Detail

      • ClosestPoint2D_F64

        public ClosestPoint2D_F64()
    • Method Detail

      • closestPoint

        public static Point2D_F64 closestPoint(LineGeneral2D_F64 line,
                                               Point2D_F64 p,
                                               Point2D_F64 output)

        Finds the closest point on 'line' to the specified point.

        Parameters:
        line - Line along which the closest point is to be found.
        p - Point.
        output - Where the solution is stored. If null a new instance is created. Modified.
        Returns:
        Closest point on the line.
      • closestPoint

        public static Point2D_F64 closestPoint(LineParametric2D_F64 line,
                                               Point2D_F64 p,
                                               Point2D_F64 output)

        Finds the closest point on 'line' to the specified point.

        Parameters:
        line - Line along which the closest point is being found.
        p - Point.
        output - Where the solution is stored. If null a new instance is created. Modified.
        Returns:
        Closest point on the line.
      • closestPointT

        public static double closestPointT(LineParametric2D_F64 line,
                                           Point2D_F64 p)

        Computes the closest point along the line as a function of 't':
        [x, y] = [x_0, y_0] + t·[slopeX, slopeY]

        Parameters:
        line - The line along which the closest point is being found. Not modified.
        p - A point. Not modified.
        Returns:
        Distance as a function of 't'
      • closestPoint

        public static Point2D_F64 closestPoint(LineSegment2D_F64 line,
                                               Point2D_F64 p,
                                               Point2D_F64 output)
        Finds the closest point on the line segment to the provided point 'p'.
        Parameters:
        line - Line segment
        p - Point`
        output - Optional storage for the closet point on the line to p. If null a new instance is created.
        Returns:
        Closest point on the line to the point
      • closestPoint

        public static Point2D_F64 closestPoint(EllipseRotated_F64 ellipse,
                                               Point2D_F64 p)
        Computes the closest point on an ellipse to the provided point. If there are multiple solutions then one is arbitrarily chosen. NOTE: When optimizing consider calling ClosestPointEllipseAngle_F64 directly instead.
        Parameters:
        ellipse - Ellipse
        p - Point
        Returns:
        Closest point on the ellipse

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.