osgEarth 2.1.1
|
Definition at line 40 of file FeatureModelSource.
FeatureModelSourceOptions::FeatureModelSourceOptions | ( | const ConfigOptions & | rhs = ConfigOptions() | ) |
Definition at line 36 of file FeatureModelSource.cpp.
: ModelSourceOptions( options ), _geomTypeOverride( Geometry::TYPE_UNKNOWN ), _lit( true ), _maxGranularity_deg( 5.0 ), _mergeGeometry( false ), _clusterCulling( true ) { fromConfig( _conf ); }
optional<bool>& osgEarth::Features::FeatureModelSourceOptions::clusterCulling | ( | ) | [inline] |
Definition at line 65 of file FeatureModelSource.
{ return _clusterCulling; }
const optional<bool>& osgEarth::Features::FeatureModelSourceOptions::clusterCulling | ( | ) | const [inline] |
Definition at line 66 of file FeatureModelSource.
{ return _clusterCulling; }
const optional<bool>& osgEarth::Features::FeatureModelSourceOptions::enableLighting | ( | ) | const [inline] |
Definition at line 60 of file FeatureModelSource.
{ return _lit; }
optional<bool>& osgEarth::Features::FeatureModelSourceOptions::enableLighting | ( | ) | [inline] |
Whether to explicity set/clear GL lighting on the result
Definition at line 59 of file FeatureModelSource.
{ return _lit; }
const optional<StringExpression>& osgEarth::Features::FeatureModelSourceOptions::featureName | ( | ) | const [inline] |
Definition at line 69 of file FeatureModelSource.
{ return _featureNameExpr; }
optional<StringExpression>& osgEarth::Features::FeatureModelSourceOptions::featureName | ( | ) | [inline] |
Definition at line 68 of file FeatureModelSource.
{ return _featureNameExpr; }
const optional<FeatureSourceOptions>& osgEarth::Features::FeatureModelSourceOptions::featureOptions | ( | ) | const [inline] |
Definition at line 45 of file FeatureModelSource.
{ return _featureOptions; }
optional<FeatureSourceOptions>& osgEarth::Features::FeatureModelSourceOptions::featureOptions | ( | ) | [inline] |
Definition at line 44 of file FeatureModelSource.
{ return _featureOptions; }
osg::ref_ptr<FeatureSource>& osgEarth::Features::FeatureModelSourceOptions::featureSource | ( | ) | [inline] |
A live feature source instance to use. Note, this does not serialize.
Definition at line 83 of file FeatureModelSource.
{ return _featureSource; }
const osg::ref_ptr<FeatureSource>& osgEarth::Features::FeatureModelSourceOptions::featureSource | ( | ) | const [inline] |
Definition at line 84 of file FeatureModelSource.
{ return _featureSource; }
void FeatureModelSourceOptions::fromConfig | ( | const Config & | conf | ) | [private] |
Reimplemented from osgEarth::ModelSourceOptions.
Reimplemented in osgEarth::Drivers::FeatureSubModelOptions, osgEarth::Drivers::FeatureGeomModelOptions, osgEarth::Drivers::FeatureLabelModelOptions, and osgEarth::Drivers::FeatureStencilModelOptions.
Definition at line 48 of file FeatureModelSource.cpp.
{ conf.getObjIfSet( "features", _featureOptions ); //if ( conf.hasChild("features") ) // _featureOptions->merge( conf.child("features") ); _featureSource = conf.getNonSerializable<FeatureSource>("feature_source"); conf.getObjIfSet( "styles", _styles ); conf.getObjIfSet( "layout", _levels ); conf.getObjIfSet( "paging", _levels ); // backwards compat.. to be deprecated conf.getObjIfSet( "gridding", _gridding ); // to be deprecated conf.getObjIfSet( "feature_name", _featureNameExpr ); conf.getIfSet( "lighting", _lit ); conf.getIfSet( "max_granularity", _maxGranularity_deg ); conf.getIfSet( "merge_geometry", _mergeGeometry ); conf.getIfSet( "cluster_culling", _clusterCulling ); std::string gt = conf.value( "geometry_type" ); if ( gt == "line" || gt == "lines" || gt == "linestring" ) _geomTypeOverride = Geometry::TYPE_LINESTRING; else if ( gt == "point" || gt == "pointset" || gt == "points" ) _geomTypeOverride = Geometry::TYPE_POINTSET; else if ( gt == "polygon" || gt == "polygons" ) _geomTypeOverride = Geometry::TYPE_POLYGON; }
optional<Symbology::Geometry::Type>& osgEarth::Features::FeatureModelSourceOptions::geometryTypeOverride | ( | ) | [inline] |
Definition at line 78 of file FeatureModelSource.
{ return _geomTypeOverride; }
const optional<Symbology::Geometry::Type>& osgEarth::Features::FeatureModelSourceOptions::geometryTypeOverride | ( | ) | const [inline] |
Definition at line 79 of file FeatureModelSource.
{ return _geomTypeOverride; }
Config FeatureModelSourceOptions::getConfig | ( | ) | const [virtual] |
Gets or sets the name of the object
Reimplemented from osgEarth::ModelSourceOptions.
Reimplemented in osgEarth::Drivers::FeatureSubModelOptions, osgEarth::Drivers::FeatureGeomModelOptions, osgEarth::Drivers::FeatureLabelModelOptions, and osgEarth::Drivers::FeatureStencilModelOptions.
Definition at line 75 of file FeatureModelSource.cpp.
{ Config conf = ModelSourceOptions::getConfig(); conf.updateObjIfSet( "features", _featureOptions ); if (_featureSource.valid()) { conf.addNonSerializable("feature_source", _featureSource.get()); } //conf.updateObjIfSet( "feature_source", _featureSource); conf.updateObjIfSet( "gridding", _gridding ); // to be deprecated conf.updateObjIfSet( "styles", _styles ); conf.updateObjIfSet( "layout", _levels ); conf.updateIfSet( "lighting", _lit ); conf.updateIfSet( "max_granularity", _maxGranularity_deg ); conf.updateIfSet( "merge_geometry", _mergeGeometry ); conf.updateIfSet( "cluster_culling", _clusterCulling ); if ( _geomTypeOverride.isSet() ) { if ( _geomTypeOverride == Geometry::TYPE_LINESTRING ) conf.update( "geometry_type", "line" ); else if ( _geomTypeOverride == Geometry::TYPE_POINTSET ) conf.update( "geometry_type", "point" ); else if ( _geomTypeOverride == Geometry::TYPE_POLYGON ) conf.update( "geometry_type", "polygon" ); } return conf; }
optional<GriddingPolicy>& osgEarth::Features::FeatureModelSourceOptions::gridding | ( | ) | [inline] |
Definition at line 74 of file FeatureModelSource.
{ return _gridding; }
const optional<GriddingPolicy>& osgEarth::Features::FeatureModelSourceOptions::gridding | ( | ) | const [inline] |
Definition at line 75 of file FeatureModelSource.
{ return _gridding; }
optional<FeatureDisplayLayout>& osgEarth::Features::FeatureModelSourceOptions::levels | ( | ) | [inline] |
Definition at line 62 of file FeatureModelSource.
{ return _levels; }
const optional<FeatureDisplayLayout>& osgEarth::Features::FeatureModelSourceOptions::levels | ( | ) | const [inline] |
Definition at line 63 of file FeatureModelSource.
{ return _levels; }
optional<double>& osgEarth::Features::FeatureModelSourceOptions::maxGranularity | ( | ) | [inline] |
Maximum span of a generated edge, in degrees. For geocentric maps only
Definition at line 51 of file FeatureModelSource.
{ return _maxGranularity_deg; }
const optional<double>& osgEarth::Features::FeatureModelSourceOptions::maxGranularity | ( | ) | const [inline] |
Definition at line 52 of file FeatureModelSource.
{ return _maxGranularity_deg; }
virtual void osgEarth::Features::FeatureModelSourceOptions::mergeConfig | ( | const Config & | conf | ) | [inline, protected, virtual] |
Reimplemented from osgEarth::ModelSourceOptions.
Reimplemented in osgEarth::Drivers::FeatureSubModelOptions, osgEarth::Drivers::FeatureGeomModelOptions, osgEarth::Drivers::FeatureLabelModelOptions, and osgEarth::Drivers::FeatureStencilModelOptions.
Definition at line 92 of file FeatureModelSource.
{ ModelSourceOptions::mergeConfig( conf ); fromConfig( conf ); }
const optional<bool>& osgEarth::Features::FeatureModelSourceOptions::mergeGeometry | ( | ) | const [inline] |
Definition at line 56 of file FeatureModelSource.
{ return _mergeGeometry; }
optional<bool>& osgEarth::Features::FeatureModelSourceOptions::mergeGeometry | ( | ) | [inline] |
Whether to merge geometry from multiple features
Definition at line 55 of file FeatureModelSource.
{ return _mergeGeometry; }
osg::ref_ptr<StyleSheet>& osgEarth::Features::FeatureModelSourceOptions::styles | ( | ) | [inline] |
Definition at line 47 of file FeatureModelSource.
{ return _styles; }
const osg::ref_ptr<StyleSheet>& osgEarth::Features::FeatureModelSourceOptions::styles | ( | ) | const [inline] |
Definition at line 48 of file FeatureModelSource.
{ return _styles; }
Definition at line 106 of file FeatureModelSource.
optional<StringExpression> osgEarth::Features::FeatureModelSourceOptions::_featureNameExpr [private] |
Definition at line 102 of file FeatureModelSource.
optional<FeatureSourceOptions> osgEarth::Features::FeatureModelSourceOptions::_featureOptions [private] |
Definition at line 100 of file FeatureModelSource.
osg::ref_ptr<FeatureSource> osgEarth::Features::FeatureModelSourceOptions::_featureSource [private] |
Definition at line 109 of file FeatureModelSource.
Definition at line 113 of file FeatureModelSource.
Definition at line 112 of file FeatureModelSource.
Definition at line 101 of file FeatureModelSource.
optional<bool> osgEarth::Features::FeatureModelSourceOptions::_lit [private] |
Definition at line 103 of file FeatureModelSource.
optional<double> osgEarth::Features::FeatureModelSourceOptions::_maxGranularity_deg [private] |
Definition at line 104 of file FeatureModelSource.
Definition at line 105 of file FeatureModelSource.
osg::ref_ptr<StyleSheet> osgEarth::Features::FeatureModelSourceOptions::_styles [private] |
Definition at line 108 of file FeatureModelSource.