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

osgEarth::ModelLayerOptions Class Reference

Inheritance diagram for osgEarth::ModelLayerOptions:
Collaboration diagram for osgEarth::ModelLayerOptions:

List of all members.

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

Detailed Description

Configuration options for a ModelLayer.

Definition at line 37 of file ModelLayer.


Constructor & Destructor Documentation

ModelLayerOptions::ModelLayerOptions ( const ConfigOptions options = ConfigOptions())

Definition at line 28 of file ModelLayer.cpp.

                                                                   :
ConfigOptions( options )
{
    setDefaults();
    fromConfig( _conf ); 
}

Here is the call graph for this function:

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;
}

Here is the call graph for this function:


Member Function Documentation

optional<ModelSourceOptions>& osgEarth::ModelLayerOptions::driver ( ) [inline]

Options for the underlying model source driver.

Definition at line 53 of file ModelLayer.

{ return _driver; }

Here is the caller graph for this function:

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; }

Here is the caller graph for this function:

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

Definition at line 66 of file ModelLayer.cpp.

{
    conf.getIfSet( "name", _name );
    conf.getIfSet( "overlay", _overlay );
    conf.getIfSet( "enabled", _enabled );
    conf.getIfSet( "lighting", _lighting );
}

Here is the call graph for this function:

Here is the caller graph for this function:

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;
}

Here is the call graph for this function:

Here is the caller graph for this function:

optional<bool>& osgEarth::ModelLayerOptions::lightingEnabled ( ) [inline]

Whether to enable OpenGL lighting on the model node.

Definition at line 59 of file ModelLayer.

{ return _lighting; }

Here is the caller graph for this function:

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 );
}

Here is the call graph for this function:

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; }

Here is the caller graph for this function:

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; }

Here is the caller graph for this function:

const optional<bool>& osgEarth::ModelLayerOptions::overlay ( ) const [inline]

Definition at line 73 of file ModelLayer.

{ return _overlay; }
void ModelLayerOptions::setDefaults ( ) [private]

Definition at line 45 of file ModelLayer.cpp.

{
    _overlay.init( false );
    _enabled.init( true );
    _lighting.init( true );
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 85 of file ModelLayer.

Definition at line 86 of file ModelLayer.

Definition at line 87 of file ModelLayer.

Definition at line 83 of file ModelLayer.

Definition at line 84 of file ModelLayer.


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