georegression.metric.alg
Class DistancePointTriangle3D_F32
- java.lang.Object
-
- georegression.metric.alg.DistancePointTriangle3D_F32
-
public class DistancePointTriangle3D_F32 extends java.lang.ObjectComputes 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 Summary
Constructors Constructor and Description DistancePointTriangle3D_F32()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclosestPoint(Point3D_F32 P, Point3D_F32 closestPt)Find the closest point on the triangle to P.voidsetTriangle(Point3D_F32 p0, Point3D_F32 p1, Point3D_F32 p2)floatsign(Point3D_F32 P)Returns the signed of the vector.
-
-
-
Method Detail
-
setTriangle
public void setTriangle(Point3D_F32 p0, Point3D_F32 p1, Point3D_F32 p2)
-
closestPoint
public void closestPoint(Point3D_F32 P, Point3D_F32 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 float sign(Point3D_F32 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.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG