#ifndef IGL_COPYLEFT_CGAL_TRIANGLE_TRIANGLE_SQUARED_DISTANCE_H #define IGL_COPYLEFT_CGAL_TRIANGLE_TRIANGLE_SQUARED_DISTANCE_H #include #include #include namespace igl { namespace copyleft { namespace cgal { // Given two triangles T1 and T2 find the points on each of closest // approach and the squared distance thereof. // // Inputs: // T1 first triangle // T2 second triangle // Outputs: // P1 point on T1 closest to T2 // P2 point on T2 closest to T1 // d distance betwee P1 and T2 // Returns true if the closest approach is unique. template < typename Kernel> IGL_INLINE bool triangle_triangle_squared_distance( const CGAL::Triangle_3 & T1, const CGAL::Triangle_3 & T2, CGAL::Point_3 & P1, CGAL::Point_3 & P2, typename Kernel::FT & d); } } } #ifndef IGL_STATIC_LIBRARY # include "triangle_triangle_squared_distance.cpp" #endif #endif