Path: blob/devel/ElmerGUI/netgen/libsrc/gprim/geomtest3d.hpp
3206 views
#ifndef FILE_GEOMTEST3D1#define FILE_GEOMTEST3D23/* *************************************************************************/4/* File: geomtest3d.hh */5/* Author: Joachim Schoeberl */6/* Date: 13. Feb. 98 */7/* *************************************************************************/891011extern int12IntersectTriangleLine (const Point<3> ** tri, const Point<3> ** line);13141516/**17Returns 0, iff18closure (tet) cup closure (tri) is empty, one corner point of tet,19one edge of tet or one face of tet20*/21extern int22IntersectTetTriangle (const Point<3> ** tet, const Point<3> ** tri,23const int * tetpi = NULL, const int * tripi = NULL);2425/**26Same test as above, but tet int reference position (0, ex, ey, ez),27tetpi = 1, 2, 4, 528*/29extern int30IntersectTetTriangleRef (const Point3d ** tri, const int * tripi = NULL);313233// 1, iff not regular triangulation34extern int35IntersectTriangleTriangle (const Point<3> ** tri1, const Point<3> ** tri2);363738extern void39LocalCoordinates (const Vec3d & e1, const Vec3d & e2,40const Vec3d & v, double & lam1, double & lam2);4142/// return 1 = degenerated sphere43extern int44CalcSphereCenter (const Point<3> ** pts, Point<3> & c);4546/// return 1 = degenerated triangle47extern int48CalcTriangleCenter (const Point3d ** pts, Point3d & c);49505152/*53Compute radius of cylinder fitting 4 points.54cylinder axis is in the direction of p1-p255*/56extern double ComputeCylinderRadius (const Point3d & p1, const Point3d & p2,57const Point3d & p3, const Point3d & p4);5859/*60Two triangles T1 and T2 have normals n1 and n2.61The height over the common edge is h1, and h2.62Radius of cylinder fitting both triangles63*/64extern double ComputeCylinderRadius (const Vec3d & n1, const Vec3d & n2,65double h1, double h2);666768extern double MinDistLP2 (const Point2d & lp1, const Point2d & lp2, const Point2d & p);6970extern double MinDistLP2 (const Point3d & lp1, const Point3d & lp2, const Point3d & p);7172extern double MinDistTP2 (const Point3d & tp1, const Point3d & tp2,73const Point3d & tp3, const Point3d & p);7475extern double MinDistLL2 (const Point3d & l1p1, const Point3d & l1p2,76const Point3d & l2p1, const Point3d & l2p2);777879#endif808182