|
osgEarth 2.1.1
|
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 |
Definition at line 26 of file Plugin.cpp.
| DRoamEnginePlugin::DRoamEnginePlugin | ( | ) | [inline] |
Definition at line 29 of file Plugin.cpp.
{}
| 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:
1.7.3