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

osgEarth::MapOptions Class Reference

Inheritance diagram for osgEarth::MapOptions:
Collaboration diagram for osgEarth::MapOptions:

List of all members.

Public Types

enum  CoordinateSystemType { CSTYPE_GEOCENTRIC, CSTYPE_GEOCENTRIC_CUBE, CSTYPE_PROJECTED }

Public Member Functions

 MapOptions (const ConfigOptions &options=ConfigOptions())
optional< std::string > name ()
const optional< std::string > name () const
optional< CoordinateSystemType > & coordSysType ()
const optional
< CoordinateSystemType > & 
coordSysType () const
optional< ProfileOptions > & profile ()
const optional< ProfileOptions > & profile () const
optional< CacheOptions > & cache ()
const optional< CacheOptions > & cache () const
optional< std::string > & referenceURI ()
const optional< std::string > & referenceURI () const
Config getConfig () const
void mergeConfig (const Config &conf)

Private Member Functions

void fromConfig (const Config &conf)

Private Attributes

optional< std::string > _name
optional< ProfileOptions_profileOptions
optional< CacheOptions_cacheOptions
optional< CoordinateSystemType_cstype
optional< std::string > _referenceURI

Detailed Description

Configuration for a runtime map.

Definition at line 35 of file MapOptions.


Member Enumeration Documentation

Enumerator:
CSTYPE_GEOCENTRIC 
CSTYPE_GEOCENTRIC_CUBE 
CSTYPE_PROJECTED 

Definition at line 38 of file MapOptions.


Constructor & Destructor Documentation

osgEarth::MapOptions::MapOptions ( const ConfigOptions options = ConfigOptions()) [inline]

Definition at line 46 of file MapOptions.


Member Function Documentation

optional<CacheOptions>& osgEarth::MapOptions::cache ( ) [inline]

Caching setup for the entire map. By default, map layers added to the map will inherit this setup unless they override or customize it with their own settings.

Definition at line 77 of file MapOptions.

{ return _cacheOptions; }

Here is the caller graph for this function:

const optional<CacheOptions>& osgEarth::MapOptions::cache ( ) const [inline]

Definition at line 78 of file MapOptions.

{ return _cacheOptions; }
const optional<CoordinateSystemType>& osgEarth::MapOptions::coordSysType ( ) const [inline]

Definition at line 64 of file MapOptions.

{ return _cstype; }
optional<CoordinateSystemType>& osgEarth::MapOptions::coordSysType ( ) [inline]

The coordinate system type of the map (default is CSTYPE_GEOCENTRIC)

Definition at line 63 of file MapOptions.

{ return _cstype; }

Here is the caller graph for this function:

void MapOptions::fromConfig ( const Config conf) [private]

Definition at line 24 of file MapOptions.cpp.

{
    conf.getIfSet( "name", _name );
    conf.getObjIfSet( "profile", _profileOptions );
    conf.getObjIfSet( "cache", _cacheOptions );

    // all variations:
    conf.getIfSet( "type", "geocentric", _cstype, CSTYPE_GEOCENTRIC );
    conf.getIfSet( "type", "globe",      _cstype, CSTYPE_GEOCENTRIC );
    conf.getIfSet( "type", "round",      _cstype, CSTYPE_GEOCENTRIC );
    conf.getIfSet( "type", "projected",  _cstype, CSTYPE_PROJECTED );
    conf.getIfSet( "type", "flat",       _cstype, CSTYPE_PROJECTED );
    conf.getIfSet( "type", "cube",       _cstype, CSTYPE_GEOCENTRIC_CUBE );
}

Here is the call graph for this function:

Config MapOptions::getConfig ( ) const [virtual]

Reimplemented from osgEarth::ConfigOptions.

Definition at line 40 of file MapOptions.cpp.

{
    Config conf; // get a fresh one since this is a final object // = ConfigOptions::getConfig();

    conf.updateIfSet( "name", _name );
    conf.updateObjIfSet( "profile", _profileOptions );
    conf.updateObjIfSet( "cache", _cacheOptions );

    // all variations:
    conf.updateIfSet( "type", "geocentric", _cstype, CSTYPE_GEOCENTRIC );
    conf.updateIfSet( "type", "projected",  _cstype, CSTYPE_PROJECTED );
    conf.updateIfSet( "type", "cube",       _cstype, CSTYPE_GEOCENTRIC_CUBE );

    return conf;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void osgEarth::MapOptions::mergeConfig ( const Config conf) [inline, virtual]

Reimplemented from osgEarth::ConfigOptions.

Definition at line 91 of file MapOptions.

                                               {
            ConfigOptions::mergeConfig( conf );
            fromConfig( conf );
        }

Here is the call graph for this function:

const optional<std::string> osgEarth::MapOptions::name ( ) const [inline]

Definition at line 58 of file MapOptions.

{ return _name; }
optional<std::string> osgEarth::MapOptions::name ( ) [inline]

Human-readable name of the map.

Definition at line 57 of file MapOptions.

{ return _name; }
const optional<ProfileOptions>& osgEarth::MapOptions::profile ( ) const [inline]

Definition at line 71 of file MapOptions.

{ return _profileOptions; }
optional<ProfileOptions>& osgEarth::MapOptions::profile ( ) [inline]

An explicit master profile for the Map. Usually this is calculated automatically, but in some cases you need to set it manually.

Definition at line 70 of file MapOptions.

{ return _profileOptions; }

Here is the caller graph for this function:

optional<std::string>& osgEarth::MapOptions::referenceURI ( ) [inline]

A reference location that drivers can use to load data from relative locations. NOTE: this is a runtime-only property and is NOT serialized in the ConfigOptions.

Definition at line 85 of file MapOptions.

{ return _referenceURI; }

Here is the caller graph for this function:

const optional<std::string>& osgEarth::MapOptions::referenceURI ( ) const [inline]

Definition at line 86 of file MapOptions.

{ return _referenceURI; }

Member Data Documentation

Definition at line 101 of file MapOptions.

Definition at line 102 of file MapOptions.

optional<std::string> osgEarth::MapOptions::_name [private]

Definition at line 99 of file MapOptions.

Definition at line 100 of file MapOptions.

Definition at line 103 of file MapOptions.


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