osgEarth 2.1.1
|
Configuration for a runtime map node.
Definition at line 36 of file MapNodeOptions.
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 ); }
MapNodeOptions::MapNodeOptions | ( | const TerrainOptions & | terrainOpts | ) |
Definition at line 46 of file MapNodeOptions.cpp.
: _proxySettings ( ProxySettings() ), _cacheOnly ( false ), _enableLighting ( true ), _overlayVertexWarping( false ), _overlayBlending ( true ), _overlayTextureSize ( 4096 ), _terrainOptions ( 0L ) { setTerrainOptions( to ); }
MapNodeOptions::~MapNodeOptions | ( | ) | [virtual] |
Definition at line 59 of file MapNodeOptions.cpp.
{ if ( _terrainOptions ) { delete _terrainOptions; _terrainOptions = 0L; } }
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; }
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; }
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; } }
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; } } }
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; }
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; }
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.
{ return _overlayVertexWarping; }
const optional<bool>& osgEarth::MapNodeOptions::overlayVertexWarping | ( | ) | const [inline] |
Definition at line 67 of file MapNodeOptions.
{ return _overlayVertexWarping; }
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; }
void MapNodeOptions::setTerrainOptions | ( | const TerrainOptions & | options | ) |
Definition at line 109 of file MapNodeOptions.cpp.
{ _terrainOptionsConf = options.getConfig(); if ( _terrainOptions ) { delete _terrainOptions; _terrainOptions = 0L; } }
optional<bool> osgEarth::MapNodeOptions::_cacheOnly [private] |
Definition at line 96 of file MapNodeOptions.
optional<bool> osgEarth::MapNodeOptions::_enableLighting [private] |
Definition at line 97 of file MapNodeOptions.
optional<bool> osgEarth::MapNodeOptions::_overlayBlending [private] |
Definition at line 99 of file MapNodeOptions.
optional<unsigned> osgEarth::MapNodeOptions::_overlayTextureSize [private] |
Definition at line 100 of file MapNodeOptions.
optional<bool> osgEarth::MapNodeOptions::_overlayVertexWarping [private] |
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.