This file is indexed.

/usr/include/osgEarthFeatures/GeometryCompiler is in libosgearth-dev 2.7.0+dfsg-2+b3.

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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
/* -*-c++-*- */
/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
 * Copyright 2015 Pelican Mapping
 * http://osgearth.org
 *
 * osgEarth is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 */
#ifndef OSGEARTH_FEATURES_GEOMETRY_COMPILER_H
#define OSGEARTH_FEATURES_GEOMETRY_COMPILER_H 1

#include <osgEarthFeatures/Common>
#include <osgEarthFeatures/Feature>
#include <osgEarthFeatures/FeatureCursor>
#include <osgEarthFeatures/ResampleFilter>
#include <osgEarthSymbology/Style>
#include <osgEarth/GeoMath>

namespace osgEarth { namespace Features
{
    using namespace osgEarth;
    using namespace osgEarth::Symbology;

    class OSGEARTHFEATURES_EXPORT GeometryCompilerOptions : public ConfigOptions
    {
    public:
        /**
         * Set the global default values for the options.
         */
        static void setDefaults(const GeometryCompilerOptions& defaults);

    public:
        GeometryCompilerOptions(const ConfigOptions& conf =ConfigOptions());
        
        virtual ~GeometryCompilerOptions() { }

    public:
        /** Maximum span of a generated edge, in degrees. Applicable to geocentric maps only */
        optional<double>& maxGranularity() { return _maxGranularity_deg; }
        const optional<double>& maxGranularity() const { return _maxGranularity_deg; }

        /** Interpolation type to use for geodetic points */
        optional<GeoInterpolation>& geoInterp() { return _geoInterp; }
        const optional<GeoInterpolation>& geoInterp() const { return _geoInterp; }

        /** Whether to merge geometry from multiple features */
        optional<bool>& mergeGeometry() { return _mergeGeometry; }
        const optional<bool>& mergeGeometry() const { return _mergeGeometry; }

        /** Expression to evaluate to extract a feature's readable name */
        optional<StringExpression>& featureName() { return _featureNameExpr; }
        const optional<StringExpression>& featureName() const { return _featureNameExpr; }

        /** Whether to cluster feature geometries together for speed */
        optional<bool>& clustering() { return _clustering; }
        const optional<bool>& clustering() const { return _clustering; }

        /** Whether to enabled draw-instancing for model substitution */
        optional<bool>& instancing() { return _instancing; }
        const optional<bool>& instancing() const { return _instancing; }

        /** Whether to ignore the altitude filter (e.g. if you plan to do auto-clamping layer) */
        optional<bool>& ignoreAltitudeSymbol() { return _ignoreAlt; }
        const optional<bool>& ignoreAltitudeSymbol() const { return _ignoreAlt; }

        //todo: merge this with geoInterp()
        optional<osgEarth::Features::ResampleFilter::ResampleMode>& resampleMode() { return _resampleMode;}
        const optional<osgEarth::Features::ResampleFilter::ResampleMode>& resampleMode() const { return _resampleMode;}

        optional<double>& resampleMaxLength() { return _resampleMaxLength; }
        const optional<double>& resampleMaxLength() const { return _resampleMaxLength;}

        /** @deprecated Whether to use VBOs in geometry */
        optional<bool>& useVertexBufferObjects() { return _useVertexBufferObjects;}
        const optional<bool>& useVertexBufferObjects() const { return _useVertexBufferObjects;}

        /** Whether to combine resource library textures into a single texture array */        
        optional<bool>& useTextureArrays() { return _useTextureArrays;}
        const optional<bool>& useTextureArrays() const { return _useTextureArrays;}

        /** Whether to generate shader components on compiled geometry */
        optional<ShaderPolicy>& shaderPolicy() { return _shaderPolicy; }
        const optional<ShaderPolicy>& shaderPolicy() const { return _shaderPolicy; }

        /** Whether to run consolidate equivalent state attributes for better performance. */
        optional<bool>& optimizeStateSharing() { return _optimizeStateSharing; }
        const optional<bool>& optimizeStateSharing() const { return _optimizeStateSharing; }

        /** Whether to run the optimizer on the resulting group. */
        optional<bool>& optimize() { return _optimize; }
        const optional<bool>& optimize() const { return _optimize; }

        /** Whether to run a geometry validation pass on teh resulting group. This is for debugging
        purposes and will dump issues to the console. */
        optional<bool>& validate() { return _validate; }
        const optional<bool>& validate() const { return _validate; }

    public:
        Config getConfig() const;
        void mergeConfig( const Config& conf );

    private:
        optional<double>               _maxGranularity_deg;
        optional<GeoInterpolation>     _geoInterp;
        optional<bool>                 _mergeGeometry;
        optional<StringExpression>     _featureNameExpr;
        optional<bool>                 _clustering;
        optional<bool>                 _instancing;
        optional<ResampleFilter::ResampleMode> _resampleMode;
        optional<double>               _resampleMaxLength;
        optional<bool>                 _ignoreAlt;
        optional<bool>                 _useVertexBufferObjects;
        optional<ShaderPolicy>         _shaderPolicy;
        optional<bool>                 _useTextureArrays;
        optional<bool>                 _optimizeStateSharing;
        optional<bool>                 _optimize;
        optional<bool>                 _validate;

        void fromConfig( const Config& conf );

        static GeometryCompilerOptions s_defaults;

    public:
       GeometryCompilerOptions(bool); // internal
    };

    /**
     * Compiles a collection of features against a style.
     */
    class OSGEARTHFEATURES_EXPORT GeometryCompiler
    {
    public:

        /** Constructs a new geometry compiler with default options. */
        GeometryCompiler();

        /** Constructs a new compiler with preconfigured options. */
        GeometryCompiler( const GeometryCompilerOptions& options );
        
        virtual ~GeometryCompiler() { }
        
        /** Access the options read-only */
        const GeometryCompilerOptions& options() const { return _options; }

        /** Access the options for editing. */
        GeometryCompilerOptions& options() { return _options; }

    public:

        /** Compiles a collection of features into an OSG scene graph. */
        osg::Node* compile(
            FeatureCursor*        input,
            const Style&          style,
            const FilterContext&  context);

        osg::Node* compile(
            Feature*              input,
            const Style&          style,
            const FilterContext&  context);

        osg::Node* compile(
            Feature*              input,
            const FilterContext&  context);

        osg::Node* compile(
            Geometry*             geom,
            const Style&          style,
            const FilterContext&  context);

        osg::Node* compile(
            Geometry*             geom,
            const FilterContext&  context );

        osg::Node* compile(
            FeatureList&          mungeableInput,
            const Style&          style,
            const FilterContext&  context);

    protected:
        GeometryCompilerOptions _options;
    };

} } // namespace osgEarth::Features

#endif // OSGEARTH_FEATURES_GEOMETRY_COMPILER_H