osgEarth 2.1.1
|
Public Member Functions | |
SeamlessPlugin () | |
virtual const char * | className () |
virtual ReadResult | readObject (const std::string &uri, const Options *options) const |
virtual ReadResult | readNode (const std::string &uri, const Options *options) const |
Definition at line 37 of file SeamlessPlugin.cpp.
seamless::SeamlessPlugin::SeamlessPlugin | ( | ) | [inline] |
Definition at line 40 of file SeamlessPlugin.cpp.
{ supportsExtension("osgearth_engine_seamless", "osgEarth seamless engine plugin"); supportsExtension("osgearth_engine_seamless_patch", "seamless engine patch pseudo loader"); }
virtual const char* seamless::SeamlessPlugin::className | ( | ) | [inline, virtual] |
Definition at line 48 of file SeamlessPlugin.cpp.
{ return "OSG Earth Seamless Engine"; }
virtual ReadResult seamless::SeamlessPlugin::readNode | ( | const std::string & | uri, |
const Options * | options | ||
) | const [inline, virtual] |
Definition at line 68 of file SeamlessPlugin.cpp.
{ if ("osgearth_engine_seamless_patch" == osgDB::getFileExtension(uri)) { Vec2d lowerLeft(0.0, 1.0); Vec2d upperRight(1.0, 1.0); const PatchOptions* poptions = dynamic_cast<const PatchOptions*>(options); if (!poptions) { OE_FATAL << "PatchGroup reader: Options object is not PatchOptions\n"; return osgDB::ReaderWriter::ReadResult::ERROR_IN_READING_FILE; } PatchSet* pset = poptions->getPatchSet(); Group* result = new Group; for (int i = 0; i < 4; ++i) result->addChild(pset->createChild(poptions, i)); return result; } else { // The pseudo-loader form for engines isn't supported anymore. return ReadResult::FILE_NOT_FOUND; } }
virtual ReadResult seamless::SeamlessPlugin::readObject | ( | const std::string & | uri, |
const Options * | options | ||
) | const [inline, virtual] |
Definition at line 53 of file SeamlessPlugin.cpp.
{ if ("osgearth_engine_seamless" == osgDB::getFileExtension(uri)) { if ("earth" == osgDB::getNameLessExtension(osgDB::getFileExtension(uri))) return readNode(uri, options); else return ReadResult(new SeamlessEngineNode); } else return ReadResult::FILE_NOT_HANDLED; }