osgEarth 2.1.1
Public Member Functions

DRoamEnginePlugin Class Reference

List of all members.

Public Member Functions

 DRoamEnginePlugin ()
virtual const char * className ()
virtual bool acceptsExtension (const std::string &extension) const
virtual ReadResult readNode (const std::string &uri, const Options *options) const

Detailed Description

Definition at line 26 of file Plugin.cpp.


Constructor & Destructor Documentation

DRoamEnginePlugin::DRoamEnginePlugin ( ) [inline]

Definition at line 29 of file Plugin.cpp.

{}

Member Function Documentation

virtual bool DRoamEnginePlugin::acceptsExtension ( const std::string &  extension) const [inline, virtual]

Definition at line 36 of file Plugin.cpp.

    {
        return osgDB::equalCaseInsensitive( extension, "engine_droam" );
    }
virtual const char* DRoamEnginePlugin::className ( ) [inline, virtual]

Definition at line 31 of file Plugin.cpp.

    {
        return "OSG Earth D-ROAM Engine";
    }
virtual ReadResult DRoamEnginePlugin::readNode ( const std::string &  uri,
const Options *  options 
) const [inline, virtual]

Definition at line 41 of file Plugin.cpp.

    {
        if ( "osgearth_engine_droam" == osgDB::getFileExtension( uri ) )
        {
            std::string earthFile = osgDB::getNameLessExtension( uri );

            osg::ref_ptr<osg::Node> node = osgDB::readNodeFile(earthFile);
            osgEarth::MapNode* mapNode = osgEarth::MapNode::findMapNode(node.get());
            if ( mapNode )
            {
                return ReadResult( new DRoamNode( mapNode->getMap() ) );
            }
            else
            {
                return ReadResult::FILE_NOT_FOUND;
            }
        }
        else
            return ReadResult::FILE_NOT_HANDLED;
    }           

Here is the call graph for this function:


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