From Jan Peciva, Added write support into Inventor plugin.

Note from Robert Osfield.  A couple of lines of code in ConvertToInventor.cpp
would not compile under g++ 4.1.2, so rather than hold back the dev release till
this is resolved I've optional compiled out the problem section.
The #define DISABLE_PROBLEM_COMPILE_SECTIONS is used to compile out the problem
section, this define is add via the CMakeLists.txt file.
This commit is contained in:
Robert Osfield
2007-09-03 13:52:19 +00:00
parent 7b73a58728
commit bd845a7b23
7 changed files with 2138 additions and 58 deletions

View File

@@ -11,18 +11,25 @@ class ReaderWriterIV : public osgDB::ReaderWriter
virtual const char* className() const
{
return "Inventor Reader";
return "Inventor reader/writer";
}
bool isInventorExtension(const std::string& extension) const
{
return osgDB::equalCaseInsensitive(extension, "iv") ? true : false;
}
virtual bool acceptsExtension(const std::string& extension) const
{
return osgDB::equalCaseInsensitive(extension, "iv") ? true :
return isInventorExtension(extension) ? true :
osgDB::equalCaseInsensitive(extension, "wrl") ? true : false;
}
virtual ReadResult readNode(const std::string& filename,
const osgDB::ReaderWriter::Options *) const;
virtual WriteResult writeNode(const osg::Node& node, const std::string& filename,
const osgDB::ReaderWriter::Options* options = NULL) const;
};
#endif