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

osgEarth::MapNodeOptions Class Reference

Inheritance diagram for osgEarth::MapNodeOptions:
Collaboration diagram for osgEarth::MapNodeOptions:

List of all members.

Public Member Functions

 MapNodeOptions (const Config &conf=Config())
 MapNodeOptions (const TerrainOptions &terrainOpts)
virtual ~MapNodeOptions ()
optional< ProxySettings > & proxySettings ()
const optional< ProxySettings > & proxySettings () const
optional< bool > & cacheOnly ()
const optional< bool > & cacheOnly () const
optional< bool > & enableLighting ()
const optional< bool > & enableLighting () const
optional< bool > & overlayVertexWarping ()
const optional< bool > & overlayVertexWarping () const
optional< bool > & overlayBlending ()
const optional< bool > & overlayBlending () const
optional< unsigned > & overlayTextureSize ()
const optional< unsigned > & overlayTextureSize () const
const TerrainOptionsgetTerrainOptions () const
void setTerrainOptions (const TerrainOptions &options)
virtual Config getConfig () const
virtual void mergeConfig (const Config &conf)

Static Public Attributes

static std::string OPTIONS_TAG = "__osgEarth::MapNodeOptions"

Private Attributes

optional< ProxySettings_proxySettings
optional< bool > _cacheOnly
optional< bool > _enableLighting
optional< bool > _overlayVertexWarping
optional< bool > _overlayBlending
optional< unsigned > _overlayTextureSize
optional< Config_terrainOptionsConf
TerrainOptions_terrainOptions

Detailed Description

Configuration for a runtime map node.

Definition at line 36 of file MapNodeOptions.


Constructor & Destructor Documentation

MapNodeOptions::MapNodeOptions ( const Config conf = Config())

Definition at line 33 of file MapNodeOptions.cpp.

                                                   :
ConfigOptions        ( conf ),
_proxySettings       ( ProxySettings() ),
_cacheOnly           ( false ),
_enableLighting      ( true ),
_overlayVertexWarping( false ),
_overlayBlending     ( true ),
_overlayTextureSize  ( 4096 ),
_terrainOptions      ( 0L )
{
    mergeConfig( conf );
}

Here is the call graph for this function:

MapNodeOptions::MapNodeOptions ( const TerrainOptions terrainOpts)

Definition at line 46 of file MapNodeOptions.cpp.

Here is the call graph for this function:

MapNodeOptions::~MapNodeOptions ( ) [virtual]

Definition at line 59 of file MapNodeOptions.cpp.

{
    if ( _terrainOptions )
    {
        delete _terrainOptions;
        _terrainOptions = 0L;
    }
}

Member Function Documentation

optional<bool>& osgEarth::MapNodeOptions::cacheOnly ( ) [inline]

Whether the map should be run exclusively off of the cache. Default = false

Definition at line 54 of file MapNodeOptions.

{ return _cacheOnly; }
const optional<bool>& osgEarth::MapNodeOptions::cacheOnly ( ) const [inline]

Definition at line 55 of file MapNodeOptions.

{ return _cacheOnly; }
optional<bool>& osgEarth::MapNodeOptions::enableLighting ( ) [inline]

Whether to explicity enable or disable GL lighting on the map node.

Definition at line 60 of file MapNodeOptions.

{ return _enableLighting; }

Here is the caller graph for this function:

const optional<bool>& osgEarth::MapNodeOptions::enableLighting ( ) const [inline]

Definition at line 61 of file MapNodeOptions.

{ return _enableLighting; } 
Config MapNodeOptions::getConfig ( ) const [virtual]

Reimplemented from osgEarth::ConfigOptions.

Definition at line 69 of file MapNodeOptions.cpp.

{
    Config conf; // start with a fresh one since this is a FINAL object  // = ConfigOptions::getConfig();
    conf.key() = "options";

    conf.updateObjIfSet( "proxy",            _proxySettings );
    conf.updateIfSet   ( "cache_only",       _cacheOnly );
    conf.updateIfSet   ( "lighting",         _enableLighting );
    conf.updateIfSet   ( "terrain",          _terrainOptionsConf );
    conf.updateIfSet   ( "overlay_warping",  _overlayVertexWarping );
    conf.updateIfSet   ( "overlay_blending", _overlayBlending );
    conf.updateIfSet   ( "overlay_texture_size",     _overlayTextureSize );

    return conf;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const TerrainOptions & MapNodeOptions::getTerrainOptions ( ) const

Options to conigure the terrain engine (the component that renders the terrain surface).

Definition at line 120 of file MapNodeOptions.cpp.

{
    if ( _terrainOptionsConf.isSet() )
    {
        if ( !_terrainOptions )
        {
            const_cast<MapNodeOptions*>(this)->_terrainOptions = new TerrainOptions( _terrainOptionsConf.value() );
        }
        return *_terrainOptions;
    }
    else
    {
        return s_defaultTerrainOptions;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void MapNodeOptions::mergeConfig ( const Config conf) [virtual]

Reimplemented from osgEarth::ConfigOptions.

Definition at line 86 of file MapNodeOptions.cpp.

{
    ConfigOptions::mergeConfig( conf );

    conf.getObjIfSet( "proxy",            _proxySettings );
    conf.getIfSet   ( "cache_only",       _cacheOnly );
    conf.getIfSet   ( "lighting",         _enableLighting );
    conf.getIfSet   ( "overlay_warping",  _overlayVertexWarping );
    conf.getIfSet   ( "overlay_blending", _overlayBlending );
    conf.getIfSet   ( "overlay_texture_size",     _overlayTextureSize );

    if ( conf.hasChild( "terrain" ) )
    {
        _terrainOptionsConf = conf.child( "terrain" );
        if ( _terrainOptions )
        {
            delete _terrainOptions;
            _terrainOptions = 0L;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

optional<bool>& osgEarth::MapNodeOptions::overlayBlending ( ) [inline]

Whether to enable blending on the overlay decorator subgraph. See OverlayDecorator

Definition at line 72 of file MapNodeOptions.

{ return _overlayBlending; }

Here is the caller graph for this function:

const optional<bool>& osgEarth::MapNodeOptions::overlayBlending ( ) const [inline]

Definition at line 73 of file MapNodeOptions.

{ return _overlayBlending; }
optional<unsigned>& osgEarth::MapNodeOptions::overlayTextureSize ( ) [inline]

Texture size to use for the overlay RTT camera.

Definition at line 78 of file MapNodeOptions.

{ return _overlayTextureSize; }

Here is the caller graph for this function:

const optional<unsigned>& osgEarth::MapNodeOptions::overlayTextureSize ( ) const [inline]

Definition at line 79 of file MapNodeOptions.

{ return _overlayTextureSize; }
optional<bool>& osgEarth::MapNodeOptions::overlayVertexWarping ( ) [inline]

Whether to enable overlay vertex warping. See OverlayDecorator

Definition at line 66 of file MapNodeOptions.

Here is the caller graph for this function:

const optional<bool>& osgEarth::MapNodeOptions::overlayVertexWarping ( ) const [inline]

Definition at line 67 of file MapNodeOptions.

const optional<ProxySettings>& osgEarth::MapNodeOptions::proxySettings ( ) const [inline]

Definition at line 48 of file MapNodeOptions.

{ return _proxySettings; }
optional<ProxySettings>& osgEarth::MapNodeOptions::proxySettings ( ) [inline]

The hostname/port of a proxy server to use for all HTTP communications. Default = no proxy.

Definition at line 47 of file MapNodeOptions.

{ return _proxySettings; }

Here is the caller graph for this function:

void MapNodeOptions::setTerrainOptions ( const TerrainOptions options)

Definition at line 109 of file MapNodeOptions.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 96 of file MapNodeOptions.

Definition at line 97 of file MapNodeOptions.

Definition at line 99 of file MapNodeOptions.

Definition at line 100 of file MapNodeOptions.

Definition at line 98 of file MapNodeOptions.

Definition at line 95 of file MapNodeOptions.

Definition at line 103 of file MapNodeOptions.

Definition at line 102 of file MapNodeOptions.

std::string MapNodeOptions::OPTIONS_TAG = "__osgEarth::MapNodeOptions" [static]

Definition at line 92 of file MapNodeOptions.


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