This file is indexed.

/usr/include/psurface/CircularPatch.h is in libpsurface-dev 2.0.0-2+b1.

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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#ifndef CIRCULAR_PATCH
#define CIRCULAR_PATCH

#include "Box.h"
#include "Domains.h"
#include "PSurface.h"

#include "psurfaceAPI.h"

namespace psurface {

template <int dim, class ctype>
class PSurface;

/** This class represents the retriangulation of a small hole in a surface.
    It's basically a bunch of triangles.  The feature of this class are the
    routines that evaluate the quality of the retriangulation. */
template <class ctype>
class PSURFACE_API CircularPatch {
public:
    

    /**@name constructors */
    //@{
    ///
    CircularPatch() {
        triangles.resize(0); 
        innerEdges.resize(0);
        par = NULL;
    }

    ///
    CircularPatch(PSurface<2,ctype>* param) {
        triangles.resize(0); 
        innerEdges.resize(0);
        par = param;
    }

    ///
    CircularPatch(int size, PSurface<2,ctype>* param) {
        triangles.resize(size);
        triangles.assign(size,-1U);

        innerEdges.resize(size-1);
        std::tr1::array<int, 2> emptyArray;
        emptyArray.assign(-1U);
        innerEdges.assign(innerEdges.size(),emptyArray);

        par = param;
    }

    ///
    CircularPatch(const std::vector<int>& array, PSurface<2,ctype>* param) {
        triangles.resize(array.size());
        for (size_t i=0; i<array.size(); i++)
            triangles[i] = array[i];

        par = param;
    }

    //@}

    ///
    void resize(int size) {
        triangles.resize(size);
        triangles.assign(size,-1);
        
        innerEdges.resize(size-1);
        std::tr1::array<int, 2> emptyArray;
        emptyArray.assign(-1);
        innerEdges.assign(innerEdges.size(), emptyArray);
    }

    ///
    int& last() {
        return triangles.back();
    }
    
    ///
    int& operator[](int i) {
        return triangles[i];
    }

    ///
    const int operator[](int i) const {
        return triangles[i];
    }
    
    ///
    int size() const { return triangles.size(); }

    ///
    void getBoundingBox(Box<ctype,3> &bbox) const;

    ///
    void killAll(){
        for (size_t i=0; i<triangles.size(); i++)
            par->removeTriangle(triangles[i]);
    }

    /**@name Evaluation methods */
    //@{
    /// gets the smallest internal angle found in any of the triangles
    ctype getMinInteriorAngle() const{
        int i;
        ctype minAngle = 2*M_PI;
        for (i=0; i<size(); i++){
            ctype currentMinAngle = par->minInteriorAngle(i);
            if (currentMinAngle<minAngle)
                minAngle = currentMinAngle;
        }

        return minAngle;
    }

    ///
    bool hasSmallDihedralAngles(ctype threshold, const PSurface<2,ctype>* par, 
                                 const Vertex<ctype>* centerVertex) const;

    /// returns the largest triangle aspect ratio
    ctype maxAspectRatio() const {
        int i;
        ctype maxRatio = 0;
        for (i=0; i<size(); i++){
            const ctype currentAspectRatio = par->aspectRatio(i);
            if (currentAspectRatio>maxRatio)
                maxRatio = currentAspectRatio;
        }

        return maxRatio;
    }

    ///
    bool hasSelfintersections() const;

    /// tests whether the patch intersects the given parametrization, except for the immediate neighbors of center
    bool intersectsParametrization(const std::vector<int> &closeEdges) const;

    /// tests whether insertion of this patch would lead to topology changes
    bool inducesTopologyChange() const;

    //@}

    ctype distanceTo(const class StaticVector<ctype,3> &) const ;

    std::vector<std::tr1::array<int, 2> > innerEdges;

private:

    std::vector<int> triangles;
public:
    PSurface<2,ctype>* par;

};

} // namespace psurface

#endif