This file is indexed.

/usr/include/osgEarthSymbology/InstanceSymbol is in libosgearth-dev 2.9.0+dfsg-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
/* -*-c++-*- */
/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
 * Copyright 2016 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 OSGEARTHSYMBOLOGY_INSTANCE_SYMBOL_H
#define OSGEARTHSYMBOLOGY_INSTANCE_SYMBOL_H 1

#include <climits>

#include <osgEarth/Common>
#include <osgEarthSymbology/Symbol>
#include <osgEarthSymbology/Tags>
#include <osgEarthSymbology/Expression>
#include <osg/Vec3f>

namespace osgEarth { namespace Symbology
{
    class InstanceResource;
    class IconSymbol;
    class ModelSymbol;

    /**
     * Base class for symbols that represent an instance of an external resource
     * like an icon or a model and can be placed at a location.
     */
    class OSGEARTHSYMBOLOGY_EXPORT InstanceSymbol : public Taggable<Symbol>
    {
    public:
        /**
         * Controls the placement of the instance.
         */
        enum Placement
        {
            /** Places an instance at each feature point (default) */
            PLACEMENT_VERTEX,

            /** Places one instance at the centroid of the feature. */
            PLACEMENT_CENTROID,

            /** Places instances at regular intervals within/along the feature geometry,
                according to density. */
            PLACEMENT_INTERVAL,

            /** Scatter instances randomly within/along feature, according to density. */
            PLACEMENT_RANDOM
        };

    public:

        InstanceSymbol(const InstanceSymbol& rhs,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);

        /** dtor */
        virtual ~InstanceSymbol() { }

        /** URI of the instance to use for substitution. */
        optional<StringExpression>& url() { return _url; }
        const optional<StringExpression>& url() const { return _url; }

        /** Name of the resource library to use with this symbol (optional) */
        optional<StringExpression>& library() { return _library; }
        const optional<StringExpression>& library() const { return _library; }   

        /** How to map feature geometry to instance placement. (default is PLACEMENT_CENTROID) */
        optional<Placement>& placement() { return _placement; }
        const optional<Placement>& placement() const { return _placement; }

        /** For PLACEMENT_RANDOM/INTERVAL, the scattering density in instances per sqkm */
        optional<float>& density() { return _density; }
        const optional<float>& density() const { return _density; }

        /** Model instance scale factor */
        optional<NumericExpression>& scale() { return _scale; }
        const optional<NumericExpression>& scale() const { return _scale; }

        /** Seeding value for the randomizer */
        optional<unsigned>& randomSeed() { return _randomSeed; }
        const optional<unsigned>& randomSeed() const { return _randomSeed; }

        /** URI alias map for embedded resources */
        optional<URIAliasMap>& uriAliasMap() { return _uriAliasMap; }
        const optional<URIAliasMap>& uriAliasMap() const { return _uriAliasMap; }

        /** Expression that returns custom geometry as a GeoJSON string. 
            You will typically use this as a script that takes the input geometry
            to dumps out a new geometry for model substitution. */
        optional<StringExpression>& script() { return _script; }
        const optional<StringExpression>& script() const { return _script; }

    public: // conversions to built-in base classes, for convenience.

        const IconSymbol* asIcon() const;
        const ModelSymbol* asModel() const;

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

    public: // internal
        /** Creates a new (empty) resource appropriate for this symbol */
        virtual InstanceResource* createResource() const =0;

    protected:
        InstanceSymbol( const Config& conf =Config() );

    protected:
        optional<StringExpression>   _url;
        optional<StringExpression>   _library;
        optional<NumericExpression>  _scale;
        optional<Placement>          _placement;
        optional<float>              _density;
        optional<unsigned>           _randomSeed;
        optional<URIAliasMap>        _uriAliasMap;
        optional<StringExpression>   _script;
    };

} } // namespace osgEarth::Symbology

#endif // OSGEARTHSYMBOLOGY_MARKER_SYMBOL_H