From 40bb7d7c618560e8f4250622a29bd670435c4486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Wed, 7 Sep 2016 09:03:49 +0200 Subject: [PATCH] added function for 2d --- libsrc/gprim/geomtest3d.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libsrc/gprim/geomtest3d.hpp b/libsrc/gprim/geomtest3d.hpp index 05387da0..a8bb0266 100644 --- a/libsrc/gprim/geomtest3d.hpp +++ b/libsrc/gprim/geomtest3d.hpp @@ -78,6 +78,15 @@ extern double MinDistLP2 (const Point3d & lp1, const Point3d & lp2, const Point3 extern double MinDistTP2 (const Point3d & tp1, const Point3d & tp2, const Point3d & tp3, const Point3d & p); + inline double MinDistTP2 (const Point<2> & tp1, const Point<2> & tp2, + const Point<2> & tp3, const Point<2> & p) + { + return MinDistTP2 (Point<3> (tp1(0), tp1(1),0), + Point<3> (tp2(0), tp2(1),0), + Point<3> (tp3(0), tp3(1),0), + Point<3> (p(0), p(1),0)); + } + /// Minimal distance of the 2 lines [l1p1,l1p2] and [l2p1,l2p2] extern double MinDistLL2 (const Point3d & l1p1, const Point3d & l1p2, const Point3d & l2p1, const Point3d & l2p2);