Class Distance3D_F64

java.lang.Object
georegression.metric.Distance3D_F64

public class Distance3D_F64 extends Object
Distance of various shapes in 3D space
  • Constructor Details

    • Distance3D_F64

      public Distance3D_F64()
  • Method Details

    • distance

      public static double distance(LineParametric3D_F64 l0, LineParametric3D_F64 l1)
      Distance of the closest point between two lines. Parallel lines are correctly handled.
      Parameters:
      l0 - First line. Not modified.
      l1 - Second line. Not modified.
      Returns:
      Distance between the closest point on both lines.
    • distance

      public static double distance(LineParametric3D_F64 l, Point3D_F64 p)
      Distance from the point to the closest point on the line.
      Parameters:
      l - Line. Not modified.
      p - Point. Not modified.
      Returns:
      distance.
    • distance

      public static double distance(LineParametric3D_F64 l, double px, double py, double pz)
      Distance from the point to the closest point on the line.
      Parameters:
      l - Line. Not modified.
      px - x-axis coordinate of point
      py - y-axis coordinate of point
      pz - z-axis coordinate of point
      Returns:
      distance.
    • distance

      public static double distance(LineSegment3D_F64 l, Point3D_F64 p)
      Distance from the point to the closest point on the line segment.
      Parameters:
      l - Line. Not modified.
      p - Point. Not modified.
      Returns:
      distance.
    • distanceSigned

      public static double distanceSigned(PlaneGeneral3D_F64 plane, Point3D_F64 point)
      Distance between a plane and a point. A signed distance is returned, where a positive value is returned if the point is on the same side of the plane as the normal and the opposite if it's on the other.
      Parameters:
      plane - The plane
      point - The point
      Returns:
      Signed distance
    • distanceSigned

      public static double distanceSigned(Sphere3D_F64 sphere, Point3D_F64 point)

      Returns the signed distance a point is from the sphere's surface. If the point is outside of the sphere it's distance will be positive. If it is inside it will be negative.

      distance = ||sphere.center - point|| - r
      Parameters:
      sphere - The sphere
      point - The point
      Returns:
      Signed distance
    • distanceSigned

      public static double distanceSigned(Cylinder3D_F64 cylinder, Point3D_F64 point)
      Returns the signed distance a point is from the cylinder's surface. If the point is outside the cylinder it's distance will be positive. If it is inside it will be negative.
      Parameters:
      cylinder - The cylinder
      point - The point
      Returns:
      Signed distance
    • distanceSigned

      public static double distanceSigned(Cylinder3D_F64 cylinder, double px, double py, double pz)
    • distance

      public static double distance(Triangle3D_F64 triangle, Point3D_F64 point)
      Signed distance from a 3D point to 3D triangle. The sign indicates which side of the triangle the point is on. See DistancePointTriangle3D_F64 for the details.
      Parameters:
      triangle - 3D triangle
      point - Point for which the closest point on the triangle is found
      Returns:
      The closest point
    • scoreIoU

      public static double scoreIoU(Box3D_F64 a, Box3D_F64 b)
      Returns the Intersection Over Union (IoU) score
      Parameters:
      a - (Input) rectangle
      b - (Input) rectangle
      Returns:
      IoU score