Rev | Line | |
---|
[365] | 1 | #pragma once |
---|
| 2 | |
---|
[366] | 3 | |
---|
| 4 | |
---|
[365] | 5 | #include <osg/Notify> |
---|
| 6 | #include <osgDB/FileNameUtils> |
---|
| 7 | #include <osgDB/FileUtils> |
---|
| 8 | #include <osgDB/Registry> |
---|
| 9 | #include <osgDB/ReadFile> |
---|
[367] | 10 | #include <osgDB/WriteFile> |
---|
| 11 | #include <stdlib.h> |
---|
[365] | 12 | |
---|
| 13 | |
---|
| 14 | class ReaderWriterDist : public osgDB::ReaderWriter |
---|
| 15 | { |
---|
| 16 | public: |
---|
| 17 | ReaderWriterDist(); |
---|
| 18 | |
---|
[366] | 19 | virtual const char* className() const { return "distortion set loader"; }; |
---|
[367] | 20 | Options* prepareReading( ReadResult& result, std::string& fileName, std::ios::openmode& mode, const Options* options ) const; |
---|
| 21 | Options* prepareWriting( WriteResult& result, const std::string& fileName, std::ios::openmode& mode, const Options* options ) const; |
---|
[368] | 22 | virtual ReadResult readObject( const std::string& file, const osgDB::ReaderWriter::Options* options) const; |
---|
| 23 | virtual ReadResult readObject( std::istream& fin, const osgDB::ReaderWriter::Options* options ) const; |
---|
| 24 | virtual WriteResult writeObject( const osg::Object& object, const std::string& fileName, const osgDB::ReaderWriter::Options* options ) const; |
---|
| 25 | virtual WriteResult writeObject( const osg::Object& object, std::ostream& fout, const osgDB::ReaderWriter::Options* options ) const; |
---|
[365] | 26 | |
---|
[366] | 27 | |
---|
[365] | 28 | private: |
---|
| 29 | std::string extensionToAdd; |
---|
[366] | 30 | |
---|
| 31 | osg::ref_ptr<osgDB::Options> readOptions; |
---|
| 32 | osg::ref_ptr<osgDB::Options> writeOptions; |
---|
| 33 | osg::ref_ptr<osgDB::ReaderWriter> rw; |
---|
[365] | 34 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.