This file is indexed.

/usr/include/snlCurve.h is in libsnl-dev 0.2.1.svn.18-1.

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
// libSNL - Simple Nurbs Library
// Copyright Scott A.E. Lanham, Australia.
// ---------------------------------------
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU Library General Public License for more details.
//
//  You should have received a copy of the GNU Library General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

// *** General NURBS Curve ***

#ifndef SNL_CURVE_H
#define SNL_CURVE_H


#include "snlCtrlPointNetCurve.h"
#include "snlCurveBase.h"
#include "snlKnotVector.h"
#include "snlPoint.h"
#include "snlVector.h"
#include "snlVertex.h"
#include "snlVertexNet.h"


class snlCurve : public snlCurveBase
{    
    public:        

        virtual ~snlCurve();
        
        snlCurve();
        
        snlCurve ( int degree, unsigned size, snlPoint& start, snlPoint& end );
                     
        snlCurve ( int degree, unsigned size, snlCtrlPoint* points, knot* knots = 0 );

        snlCurve ( unsigned size, snlCtrlPoint* points, snlKnotVector* knotVector );
        
        snlCurve ( const snlCurve& copyFrom );  // Copy constructor.

        snlCurve& operator= ( const snlCurve& curveToCopy );
        
        // Interpolated / approximated curve.
        snlCurve ( snlPoint* points, unsigned size, int fittingType, int degree, bool closedLoop = false, knot** retParams = 0 );

        // Circular Arc.
        snlCurve ( snlPoint& startPoint, snlPoint& endPoint, snlPoint& centrePoint, int numSections = - 1 );
        
        snlCtrlPointNetCurve& controlPointNet();
        
        snlPoint evalHmg ( knot param ) const;
        
        virtual snlPoint eval ( knot param ) const;
        
        snlPoint* evalDerivsHmg ( knot param, unsigned deriv ) const;
        
        snlPoint* evalDerivs ( knot param, unsigned deriv ) const;
        
        snlVector velocity ( knot param );
        
        void insertKnot ( knot iParam, bool reallocate );
        void insertKnots ( knot iParam, int numToInsert, bool reallocate );
        
        double removeKnots ( int numKnots, unsigned removalIndex, double tolerance );
        double removeKnot ( unsigned removalIndex, double tolerance );        
        
        void refine ( double tolerance );
        
        double maxParam() const;
        double minParam() const;
        
        double param ( unsigned index ) const;

        const snlKnotVector& knotVector();
        
        int degree();
        
        int size();
        
        void truncate ( knot param, bool keepLast = false, bool reparameterise = false );
        void insertPartition ( knot param );
        void reparameterise ( knot startKnot, knot endKnot );
        void reverseEvalDirection();
        
        void globalInterpClosedLoop ( int type, snlPoint* points, unsigned size, int degree, knot** retParams );
        void globalInterp ( int type, snlPoint* points, unsigned size, int degree, knot** retParams );
        static snlCtrlPoint* genGlobalInterpPoints ( snlPoint* points, unsigned size, knot* params, snlKnotVector* knots );
        
        void localInterpQuadratic ( snlPoint* points, unsigned size );  // Local quadratic interpolation.
        void localInterpCubic ( snlPoint* points, unsigned size );  // Local cubic interpolation.
        
        void synchronise ( snlCurve& curve );
        void makeCompatible ( snlCurve* curve );
        
        unsigned createBezierSegments ( int** retNumKnotsAdded );
        
        static void elevateBezierSegmentPointsDegree ( int origDegree, int byDegree, const snlCtrlPoint* origPoints,
                                                       snlCtrlPoint* newPoints );
        
        void elevateDegree ( int byDegree );
        
        void appendCurve ( snlCurve* curve, bool copy = true );

        void print();
        
        // Abstract Implementation.
        
        virtual void vertexNet ( snlVertexNet* vNet, double tolerance, bool parametric );
        
        // Enumerations.
        
        enum SNL_FITTING_TYPES
        {
            SNL_GLOBAL_INTERPOLATION,
            SNL_GLOBAL_INTERP_CENTRIFUGAL,
            SNL_LOCAL_INTERPOLATION
        };
        
    protected:

        void vertexNetParam ( snlVertexNet* vNet, double tolerance );
    
    private:
    
        int        deg;  // Degree of curve.
    
        snlCtrlPointNetCurve*       ctrlPtNet;
                                    
        snlKnotVector*              knotVect;
};

#endif