osgEarth 2.1.1
|
Public Member Functions | |
ModelLayerOptions (const ConfigOptions &options=ConfigOptions()) | |
ModelLayerOptions (const std::string &name, const ModelSourceOptions &driverOptions=ModelSourceOptions()) | |
optional< std::string > & | name () |
const optional< std::string > & | name () const |
optional< ModelSourceOptions > & | driver () |
const optional < ModelSourceOptions > & | driver () const |
optional< bool > & | lightingEnabled () |
const optional< bool > & | lightingEnabled () const |
optional< bool > & | enabled () |
const optional< bool > & | enabled () const |
optional< bool > & | overlay () |
const optional< bool > & | overlay () const |
virtual Config | getConfig () const |
virtual void | mergeConfig (const Config &conf) |
Private Member Functions | |
void | fromConfig (const Config &conf) |
void | setDefaults () |
Private Attributes | |
optional< std::string > | _name |
optional< bool > | _overlay |
optional< ModelSourceOptions > | _driver |
optional< bool > | _enabled |
optional< bool > | _lighting |
Configuration options for a ModelLayer.
Definition at line 37 of file ModelLayer.
ModelLayerOptions::ModelLayerOptions | ( | const ConfigOptions & | options = ConfigOptions() | ) |
Definition at line 28 of file ModelLayer.cpp.
: ConfigOptions( options ) { setDefaults(); fromConfig( _conf ); }
ModelLayerOptions::ModelLayerOptions | ( | const std::string & | name, |
const ModelSourceOptions & | driverOptions = ModelSourceOptions() |
||
) |
Definition at line 35 of file ModelLayer.cpp.
: ConfigOptions() { setDefaults(); fromConfig( _conf ); _name = name; _driver = driverOptions; }
optional<ModelSourceOptions>& osgEarth::ModelLayerOptions::driver | ( | ) | [inline] |
Options for the underlying model source driver.
Definition at line 53 of file ModelLayer.
{ return _driver; }
const optional<ModelSourceOptions>& osgEarth::ModelLayerOptions::driver | ( | ) | const [inline] |
Definition at line 54 of file ModelLayer.
{ return _driver; }
const optional<bool>& osgEarth::ModelLayerOptions::enabled | ( | ) | const [inline] |
Definition at line 66 of file ModelLayer.
{ return _enabled; }
optional<bool>& osgEarth::ModelLayerOptions::enabled | ( | ) | [inline] |
Whether this layer will be drawn.
Definition at line 65 of file ModelLayer.
{ return _enabled; }
void ModelLayerOptions::fromConfig | ( | const Config & | conf | ) | [private] |
Config ModelLayerOptions::getConfig | ( | ) | const [virtual] |
Reimplemented from osgEarth::ConfigOptions.
Definition at line 53 of file ModelLayer.cpp.
{ Config conf = ConfigOptions::getConfig(); conf.updateIfSet( "name", _name ); conf.updateIfSet( "overlay", _overlay ); conf.updateIfSet( "enabled", _enabled ); conf.updateIfSet( "lighting", _lighting ); return conf; }
optional<bool>& osgEarth::ModelLayerOptions::lightingEnabled | ( | ) | [inline] |
Whether to enable OpenGL lighting on the model node.
Definition at line 59 of file ModelLayer.
{ return _lighting; }
const optional<bool>& osgEarth::ModelLayerOptions::lightingEnabled | ( | ) | const [inline] |
Definition at line 60 of file ModelLayer.
{ return _lighting; }
void ModelLayerOptions::mergeConfig | ( | const Config & | conf | ) | [virtual] |
Reimplemented from osgEarth::ConfigOptions.
Definition at line 75 of file ModelLayer.cpp.
{ ConfigOptions::mergeConfig( conf ); fromConfig( conf ); }
const optional<std::string>& osgEarth::ModelLayerOptions::name | ( | ) | const [inline] |
Definition at line 48 of file ModelLayer.
{ return _name; }
optional<std::string>& osgEarth::ModelLayerOptions::name | ( | ) | [inline] |
The readable name of the layer.
Definition at line 47 of file ModelLayer.
{ return _name; }
optional<bool>& osgEarth::ModelLayerOptions::overlay | ( | ) | [inline] |
Whether to drape the model geometry over the terrain as a projected overlay. Defaults to false
Definition at line 72 of file ModelLayer.
{ return _overlay; }
const optional<bool>& osgEarth::ModelLayerOptions::overlay | ( | ) | const [inline] |
Definition at line 73 of file ModelLayer.
{ return _overlay; }
void ModelLayerOptions::setDefaults | ( | ) | [private] |
Definition at line 85 of file ModelLayer.
optional<bool> osgEarth::ModelLayerOptions::_enabled [private] |
Definition at line 86 of file ModelLayer.
optional<bool> osgEarth::ModelLayerOptions::_lighting [private] |
Definition at line 87 of file ModelLayer.
optional<std::string> osgEarth::ModelLayerOptions::_name [private] |
Definition at line 83 of file ModelLayer.
optional<bool> osgEarth::ModelLayerOptions::_overlay [private] |
Definition at line 84 of file ModelLayer.