Class DistancePointTriangle3D_F64

java.lang.Object
georegression.metric.alg.DistancePointTriangle3D_F64

public class DistancePointTriangle3D_F64 extends Object

Computes the closest point and distance between a triangle in 3D and the closest point on a triangle.

David Eberly, "Distance Between Point and Triangle in 3D", Geometric Tools, LLC, 1999

  • Constructor Details

    • DistancePointTriangle3D_F64

      public DistancePointTriangle3D_F64()
  • Method Details

    • setTriangle

      public void setTriangle(Point3D_F64 p0, Point3D_F64 p1, Point3D_F64 p2)
    • closestPoint

      public void closestPoint(Point3D_F64 P, Point3D_F64 closestPt)
      Find the closest point on the triangle to P.
      Parameters:
      P - Input. The point for which the closest point is to be found.
      closestPt - Output. The found closest point.
    • sign

      public double sign(Point3D_F64 P)
      Returns the signed of the vector. If its "in front" it will be positive and negative if "behind". In front is defined as being on the same side as the cross product of p2-p0 and p1-p0.
      Parameters:
      P - Point for which the sign is determined
    • region0

      protected void region0(double det)
    • region1

      protected void region1()
    • region2

      protected void region2()
    • region3

      protected void region3()
    • region4

      protected void region4()
    • region5

      protected void region5()
    • region6

      protected void region6()