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

osgEarth::Features::FeatureLevel Class Reference

Collaboration diagram for osgEarth::Features::FeatureLevel:

List of all members.

Public Member Functions

 FeatureLevel (const Config &config)
 FeatureLevel (float minRange, float maxRange)
 FeatureLevel (float minRange, float maxRange, const StyleSelector &oneSelector)
float minRange () const
float maxRange () const
const StyleSelectorVectorselectors () const
Config getConfig () const

Protected Member Functions

void fromConfig (const Config &conf)

Protected Attributes

float _minRange
float _maxRange
StyleSelectorVector _selectors
optional< unsigned > _lod

Detailed Description

Settings for a single level of detail of feature data

Definition at line 37 of file FeatureDisplayLayout.


Constructor & Destructor Documentation

FeatureLevel::FeatureLevel ( const Config config)

Definition at line 28 of file FeatureDisplayLayout.cpp.

                                               :
_minRange( 0.0f ),
_maxRange( FLT_MAX )
{
    fromConfig( conf );
}

Here is the call graph for this function:

FeatureLevel::FeatureLevel ( float  minRange,
float  maxRange 
)

Definition at line 35 of file FeatureDisplayLayout.cpp.

                                                           :
_minRange( minRange ),
_maxRange( maxRange )
{
    //nop
}
FeatureLevel::FeatureLevel ( float  minRange,
float  maxRange,
const StyleSelector oneSelector 
)

Definition at line 42 of file FeatureDisplayLayout.cpp.

                                                                                             :
_minRange( minRange ),
_maxRange( maxRange )
{
    _selectors.push_back( oneSelector );
}

Member Function Documentation

void FeatureLevel::fromConfig ( const Config conf) [protected]

Definition at line 50 of file FeatureDisplayLayout.cpp.

{
    if ( conf.hasValue( "min_range" ) )
        _minRange = conf.value( "min_range", 0.0f );
    if ( conf.hasValue( "max_range" ) )
        _maxRange = conf.value( "max_range", FLT_MAX );
    
    conf.getIfSet( "lod", _lod );

    const ConfigSet selectorsConf = conf.children( "selector" );
    for( ConfigSet::const_iterator i = selectorsConf.begin(); i != selectorsConf.end(); ++i )
    {
        _selectors.push_back( StyleSelector(*i) );
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Config FeatureLevel::getConfig ( ) const

Definition at line 67 of file FeatureDisplayLayout.cpp.

{
    Config conf( "level" );
    conf.add( "min_range", toString(_minRange) );
    conf.add( "max_range", toString(_maxRange) );
    conf.addIfSet( "lod", _lod );

    for( StyleSelectorVector::const_iterator i = _selectors.begin(); i != _selectors.end(); ++i )
    {
        conf.addChild( (*i).getConfig() );
    }

    return conf;
}

Here is the call graph for this function:

float osgEarth::Features::FeatureLevel::maxRange ( ) const [inline]

Definition at line 45 of file FeatureDisplayLayout.

{ return _maxRange; }

Here is the caller graph for this function:

float osgEarth::Features::FeatureLevel::minRange ( ) const [inline]

Definition at line 44 of file FeatureDisplayLayout.

{ return _minRange; }

Here is the caller graph for this function:

const StyleSelectorVector& osgEarth::Features::FeatureLevel::selectors ( ) const [inline]

Definition at line 50 of file FeatureDisplayLayout.

{ return _selectors; }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 60 of file FeatureDisplayLayout.

Definition at line 58 of file FeatureDisplayLayout.

Definition at line 58 of file FeatureDisplayLayout.

Definition at line 59 of file FeatureDisplayLayout.


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