Added readObject() implementations
This commit is contained in:
@@ -62,6 +62,12 @@ class ReaderWritterOpenCASCADE: public osgDB::ReaderWriter
|
||||
/// \brief returns class name
|
||||
virtual const char* className() const { return "STEP/IGES Reader"; }
|
||||
|
||||
|
||||
virtual ReadResult readObject(const std::string& fileName, const osgDB::ReaderWriter::Options* options) const
|
||||
{
|
||||
return readNode(fileName, options);
|
||||
}
|
||||
|
||||
virtual osgDB::ReaderWriter::ReadResult readNode(const std::string& fileName, const osgDB::ReaderWriter::Options*) const;
|
||||
|
||||
virtual osgDB::ReaderWriter::WriteResult writeNode(const osg::Node&, const std::string&, const Options* =NULL) const ;
|
||||
|
||||
@@ -82,18 +82,12 @@ public:
|
||||
|
||||
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;
|
||||
return readNode(fileName, options);
|
||||
}
|
||||
|
||||
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;
|
||||
return readNode(fin, options);
|
||||
}
|
||||
|
||||
virtual ReadResult readNode(const std::string& fileName, const osgDB::ReaderWriter::Options* options) const;
|
||||
|
||||
@@ -114,6 +114,12 @@ public:
|
||||
|
||||
virtual const char* className() const { return "OGR file reader"; }
|
||||
|
||||
|
||||
virtual ReadResult readObject(const std::string& fileName, const osgDB::ReaderWriter::Options* options) const
|
||||
{
|
||||
return readNode(fileName, options);
|
||||
}
|
||||
|
||||
virtual ReadResult readNode(const std::string& file, const osgDB::ReaderWriter::Options* options) const
|
||||
{
|
||||
OSG_INFO<<"OGR::readNode("<<file<<")"<<std::endl;
|
||||
|
||||
@@ -64,6 +64,12 @@ public:
|
||||
return "TXP Reader/Writer";
|
||||
}
|
||||
|
||||
|
||||
virtual ReadResult readObject(const std::string& fileName, const osgDB::ReaderWriter::Options* options) const
|
||||
{
|
||||
return readNode(fileName, options);
|
||||
}
|
||||
|
||||
virtual ReadResult readNode(const std::string& file, const osgDB::ReaderWriter::Options* options) const
|
||||
{
|
||||
if( !acceptsExtension(osgDB::getFileExtension(file) ))
|
||||
|
||||
Reference in New Issue
Block a user