This file is indexed.

/usr/share/netgen/libsrc/csg/brick.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
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#ifndef FILE_BRICK
#define FILE_BRICK


/**************************************************************************/
/* File:   brick.hpp                                                      */
/* Author: Joachim Schoeberl                                              */
/* Date:   11. Mar. 98                                                    */
/**************************************************************************/

namespace netgen
{


  /*

  brick geometry, has several surfaces
  
  */



  class Parallelogram3d : public Surface
  {
    Point<3> p1, p2, p3, p4;
    Vec<3> v12, v13;
    Vec<3> n;

  public:
    Parallelogram3d (Point<3> ap1, Point<3> ap2, Point<3> ap3);
    virtual ~Parallelogram3d ();

    void SetPoints (Point<3> ap1, Point<3> ap2, Point<3> ap3);

    virtual int IsIdentic (const Surface & s2, int & inv, double eps) const; 

    virtual double CalcFunctionValue (const Point<3> & point) const;
    virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const;
    virtual void CalcHesse (const Point<3> & point, Mat<3> & hesse) const;
    virtual double HesseNorm () const;

    virtual Point<3> GetSurfacePoint () const;
    virtual void Print (ostream & str) const;
  
    virtual void GetTriangleApproximation (TriangleApproximation & tas, 
					   const Box<3> & boundingbox, 
					   double facets) const;

  protected:
    void CalcData();
  };


  class Brick : public Primitive
  {
    Point<3> p1, p2, p3, p4;
    Vec<3> v12, v13, v14;
    // Array<OneSurfacePrimitive*> faces;
    Array<Plane*> faces;

  public:
    Brick (Point<3> ap1, Point<3> ap2, Point<3> ap3, Point<3> ap4);
    virtual ~Brick ();
    static Primitive * CreateDefault ();

    virtual Primitive * Copy () const;
    virtual void Transform (Transformation<3> & trans);


    virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const;

    virtual INSOLID_TYPE PointInSolid (const Point<3> & p,
				       double eps) const;
    virtual INSOLID_TYPE VecInSolid (const Point<3> & p,
				     const Vec<3> & v,
				     double eps) const;
    virtual INSOLID_TYPE VecInSolid2 (const Point<3> & p,
				      const Vec<3> & v1,
				      const Vec<3> & v2,
				      double eps) const;

    virtual INSOLID_TYPE VecInSolid3 (const Point<3> & p,
				      const Vec<3> & v1,
				      const Vec<3> & v2,
				      double eps) const;

    virtual INSOLID_TYPE VecInSolid4 (const Point<3> & p,
				      const Vec<3> & v,
				      const Vec<3> & v2,
				      const Vec<3> & m,
				      double eps) const;


    virtual int GetNSurfaces() const 
    { return 6; }
    virtual Surface & GetSurface (int i) 
    { return *faces[i]; }
    virtual const Surface & GetSurface (int i) const
    { return *faces[i]; }


    virtual void GetPrimitiveData (const char *& classname, Array<double> & coeffs) const;
    virtual void SetPrimitiveData (Array<double> & coeffs);

    virtual void Reduce (const BoxSphere<3> & box);
    virtual void UnReduce ();

  protected:
    void CalcData();
  };


  class OrthoBrick : public Brick 
  {
  protected:
    Point<3> pmin, pmax;
  public:
    OrthoBrick (const Point<3> & ap1, const Point<3> & ap2);
  
    virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const;
    virtual void Reduce (const BoxSphere<3> & box);
  };

}

#endif