Added osgDB::ReaderWriter::Options class to the ReaderWriter base class, support
for settings options in osgDB::Registry, and added the paramter to all of the reaader/writer plugins. The Options structure by default has an string attached for packing basic options, however, it also can be subclassed to encapsulate any users defined option data. In the later case both the client code *and* the plugin need to be aware of subclass, the plugin will need to use dynamic_cast<> to assertain its type.
This commit is contained in:
@@ -19,9 +19,9 @@ class OSGReaderWriter : public ReaderWriter
|
||||
return equalCaseInsensitive(extension,"osg");
|
||||
}
|
||||
|
||||
virtual Object* readObject(const std::string& fileName) { return readNode(fileName); }
|
||||
virtual Object* readObject(const std::string& fileName, const osgDB::ReaderWriter::Options* opt) { return readNode(fileName,opt); }
|
||||
|
||||
virtual Node* readNode(const std::string& fileName)
|
||||
virtual Node* readNode(const std::string& fileName, const osgDB::ReaderWriter::Options*)
|
||||
{
|
||||
std::string ext = getFileExtension(fileName);
|
||||
if (!acceptsExtension(ext)) return NULL;
|
||||
|
||||
Reference in New Issue
Block a user