osgEarth 2.1.1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

osgEarth::Features::FeatureModelSourceOptions Class Reference

Inheritance diagram for osgEarth::Features::FeatureModelSourceOptions:
Collaboration diagram for osgEarth::Features::FeatureModelSourceOptions:

List of all members.

Public Member Functions

optional< FeatureSourceOptions > & featureOptions ()
const optional
< FeatureSourceOptions > & 
featureOptions () const
osg::ref_ptr< StyleSheet > & styles ()
const osg::ref_ptr< StyleSheet > & styles () const
optional< double > & maxGranularity ()
const optional< double > & maxGranularity () const
optional< bool > & mergeGeometry ()
const optional< bool > & mergeGeometry () const
optional< bool > & enableLighting ()
const optional< bool > & enableLighting () const
optional< FeatureDisplayLayout > & levels ()
const optional
< FeatureDisplayLayout > & 
levels () const
optional< bool > & clusterCulling ()
const optional< bool > & clusterCulling () const
optional< StringExpression > & featureName ()
const optional
< StringExpression > & 
featureName () const
optional< GriddingPolicy > & gridding ()
const optional< GriddingPolicy > & gridding () const
optional
< Symbology::Geometry::Type > & 
geometryTypeOverride ()
const optional
< Symbology::Geometry::Type > & 
geometryTypeOverride () const
osg::ref_ptr< FeatureSource > & featureSource ()
const osg::ref_ptr
< FeatureSource > & 
featureSource () const
 FeatureModelSourceOptions (const ConfigOptions &rhs=ConfigOptions())
virtual Config getConfig () const

Protected Member Functions

virtual void mergeConfig (const Config &conf)

Private Member Functions

void fromConfig (const Config &conf)

Private Attributes

optional< FeatureSourceOptions_featureOptions
optional< FeatureDisplayLayout_levels
optional< StringExpression_featureNameExpr
optional< bool > _lit
optional< double > _maxGranularity_deg
optional< bool > _mergeGeometry
optional< bool > _clusterCulling
osg::ref_ptr< StyleSheet_styles
osg::ref_ptr< FeatureSource_featureSource
optional< GriddingPolicy_gridding
optional< Geometry::Type_geomTypeOverride

Detailed Description

Definition at line 40 of file FeatureModelSource.


Constructor & Destructor Documentation

FeatureModelSourceOptions::FeatureModelSourceOptions ( const ConfigOptions rhs = ConfigOptions())

Definition at line 36 of file FeatureModelSource.cpp.

Here is the call graph for this function:


Member Function Documentation

optional<bool>& osgEarth::Features::FeatureModelSourceOptions::clusterCulling ( ) [inline]

Definition at line 65 of file FeatureModelSource.

{ return _clusterCulling; }

Here is the caller graph for this function:

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; }

Here is the caller graph for this function:

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; }

Here is the caller graph for this function:

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; }

Here is the caller graph for this function:

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;
}

Here is the call graph for this function:

Here is the caller graph for this function:

optional<Symbology::Geometry::Type>& osgEarth::Features::FeatureModelSourceOptions::geometryTypeOverride ( ) [inline]
Deprecated:

Definition at line 78 of file FeatureModelSource.

{ return _geomTypeOverride; }

Here is the caller graph for this function:

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;
}

Here is the call graph for this function:

Here is the caller graph for this function:

optional<GriddingPolicy>& osgEarth::Features::FeatureModelSourceOptions::gridding ( ) [inline]
Deprecated:

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; }

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

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; }

Here is the caller graph for this function:

const osg::ref_ptr<StyleSheet>& osgEarth::Features::FeatureModelSourceOptions::styles ( ) const [inline]

Definition at line 48 of file FeatureModelSource.

{ return _styles; }

Member Data Documentation

Definition at line 106 of file FeatureModelSource.

Definition at line 102 of file FeatureModelSource.

Definition at line 100 of file FeatureModelSource.

Definition at line 109 of file FeatureModelSource.

Definition at line 113 of file FeatureModelSource.

Deprecated:

Definition at line 112 of file FeatureModelSource.

Definition at line 101 of file FeatureModelSource.

Definition at line 103 of file FeatureModelSource.

Definition at line 104 of file FeatureModelSource.

Definition at line 105 of file FeatureModelSource.

Definition at line 108 of file FeatureModelSource.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines