/usr/include/osgEarthSplat/SplatOptions 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 | /* -*-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 OSGEARTH_DRIVER_SPLAT_OPTIONS
#define OSGEARTH_DRIVER_SPLAT_OPTIONS 1
#include <osgEarth/Common>
#include "Export"
#include "Coverage"
#include "Zone"
namespace osgEarth { namespace Splat
{
using namespace osgEarth;
/**
* Options governing the classification splatting engine.
*/
class OSGEARTHSPLAT_EXPORT SplatOptions : public DriverConfigOptions
{
public:
/** Classification coverage options */
optional<CoverageOptions>& coverage() { return _coverage; }
const optional<CoverageOptions>& coverage() const { return _coverage; }
/** Zone definitions */
ZoneOptionsVector& zones() { return _zones; }
const ZoneOptionsVector& zones() const { return _zones; }
public:
SplatOptions( const ConfigOptions& opt =ConfigOptions() ) : DriverConfigOptions( opt ) {
setDriver( "splat" );
fromConfig( _conf );
}
virtual ~SplatOptions() { }
public:
Config getConfig() const {
Config conf("splat");
conf.setObj( "coverage", _coverage );
Config zones("zones");
for(int i=0; i<_zones.size(); ++i) {
Config zone = _zones[i].getConfig();
if ( !zone.empty() )
zones.add(zone);
}
if ( !zones.empty() )
conf.update(zones);
return conf;
}
protected:
void mergeConfig( const Config& conf ) {
DriverConfigOptions::mergeConfig( conf );
fromConfig( conf );
}
private:
void fromConfig( const Config& conf ) {
conf.getObjIfSet( "coverage", _coverage );
const Config* zones = conf.child_ptr("zones");
if ( zones ) {
const ConfigSet& children = zones->children();
for(ConfigSet::const_iterator i = children.begin(); i != children.end(); ++i) {
_zones.push_back( ZoneOptions(*i) );
}
}
}
optional<CoverageOptions> _coverage;
ZoneOptionsVector _zones;
};
} } // namespace osgEarth::Splat
#endif // OSGEARTH_DRIVER_SPLAT_OPTIONS
|