osgEarth 2.1.1
Static Public Member Functions

osgEarth::MaskSourceFactory Class Reference

List of all members.

Static Public Member Functions

static MaskSourcecreate (const MaskSourceOptions &options)

Detailed Description

Definition at line 98 of file MaskSource.


Member Function Documentation

MaskSource * MaskSourceFactory::create ( const MaskSourceOptions options) [static]

Definition at line 64 of file MaskSource.cpp.

{
    MaskSource* source = 0L;

    if ( !options.getDriver().empty() )
    {
        std::string driverExt = std::string(".osgearth_mask_") + options.getDriver();

        osg::ref_ptr<osgDB::ReaderWriter::Options> rwopts = new osgDB::ReaderWriter::Options();
        rwopts->setPluginData( MASK_SOURCE_OPTIONS_TAG, (void*)&options );

        source = dynamic_cast<MaskSource*>( osgDB::readObjectFile( driverExt, rwopts.get() ) );
        if ( source )
        {
            OE_INFO << "Loaded MaskSource driver \"" << options.getDriver() << "\" OK" << std::endl;
        }
        else
        {
            OE_WARN << "FAIL, unable to load MaskSource driver for \"" << options.getDriver() << "\"" << std::endl;
        }
    }
    else
    {
        OE_WARN << LC << "FAIL, illegal null driver specification" << std::endl;
    }

    return source;
}

Here is the call graph for this function:

Here is the caller graph for this function:


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