Added ReaderWriterOBJ::readObject(..) implementations to address issue with using osgconv

This commit is contained in:
Robert Osfield 2019-07-25 10:39:34 +01:00
parent d6af3f7d79
commit 62a4be7aeb

View File

@ -80,6 +80,22 @@ public:
virtual const char* className() const { return "Wavefront OBJ Reader"; }
virtual ReadResult readObject(const std::string& fileName, const osgDB::ReaderWriter::Options* options) const
{
ReadResult result = readNode(fileName, options);
osg::Node* node = result.getNode();
if (node) return node;
else return result;
}
virtual ReadResult readObject(std::istream& fin, const Options* options) const
{
ReadResult result = readNode(fin, options);
osg::Node* node = result.getNode();
if (node) return node;
else return result;
}
virtual ReadResult readNode(const std::string& fileName, const osgDB::ReaderWriter::Options* options) const;
virtual ReadResult readNode(std::istream& fin, const Options* options) const;