/usr/share/netgen/libsrc/csg/triapprox.hpp is in netgen-headers 4.9.13.dfsg-8build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | #ifndef FILE_TRIAPPROX
#define FILE_TRIAPPROX
/**************************************************************************/
/* File: triapprox.hh */
/* Author: Joachim Schoeberl */
/* Date: 2. Mar. 98 */
/**************************************************************************/
namespace netgen
{
/**
Triangulated approxiamtion to true surface
*/
class TATriangle
{
int pi[3];
int surfind;
public:
TATriangle () { ; }
TATriangle (int si, int pi1, int pi2, int pi3)
{ surfind = si; pi[0] = pi1; pi[1] = pi2; pi[2] = pi3; }
int SurfaceIndex() const { return surfind; }
int & SurfaceIndex() { return surfind; }
int & operator[] (int i) { return pi[i]; }
const int & operator[] (int i) const { return pi[i]; }
};
class TriangleApproximation
{
Array<Point<3> > points;
Array<Vec<3> > normals;
Array<TATriangle> trigs;
public:
TriangleApproximation();
int GetNP () const { return points.Size(); }
int GetNT () const { return trigs.Size(); }
int AddPoint (const Point<3> & p) { points.Append (p); return points.Size()-1; }
int AddNormal (const Vec<3> & n) { normals.Append (n); return normals.Size()-1; }
int AddTriangle (const TATriangle & tri, bool invert = 0);
const Point<3> & GetPoint (int i) const { return points[i]; }
const TATriangle & GetTriangle (int i) const { return trigs[i]; }
const Vec<3> & GetNormal (int i) const { return normals[i]; }
void RemoveUnusedPoints ();
friend class CSGeometry;
};
}
#endif
|