From Wang Rui, "Attached is the osgTerrain wrappers, based on the latest SVN version

of OSG. I modified the osgDB::InputStream and OutputStream and the
PagedLOD wrapper as well. Now all seems to work fine with paged
scenes. I've tested with the puget terrain data and the osgdem
application from VPB:
# osgdem --xx 10 --yy 10 -t ps_texture_4k.tif --xx 10 --yy 10 -d
ps_height_4k.tif -l 8 -v 0.1 -o puget.osgb

As the ive plugin does, The PagedLOD wrapper now automatically add the
latest file path to PagedLODs' databasePath member, to help them find
correct child positions. I also changed the image storage strategy of
the OutputStream class, to store them inline by default. The osgt
extension should also work, in case the image files are also written
to the disk.
"
This commit is contained in:
Robert Osfield
2010-02-25 17:53:51 +00:00
parent 26e68926f7
commit 605ad76691
19 changed files with 399 additions and 13 deletions

View File

@@ -69,6 +69,7 @@ public:
bool isBinary() const { return _in->isBinary(); }
bool getUseFloatMatrix() const { return _useFloatMatrix; }
const osgDB::Options* getOptions() const { return _options.get(); }
// Serialization related functions
InputStream& operator>>( bool& b ) { _in->readBool(b); checkStream(); return *this; }
@@ -163,6 +164,7 @@ protected:
std::vector<std::string> _fields;
osg::ref_ptr<InputIterator> _in;
osg::ref_ptr<InputException> _exception;
osg::ref_ptr<const osgDB::Options> _options;
};
void InputStream::throwException( const std::string& msg )

View File

@@ -77,6 +77,7 @@ public:
bool isBinary() const { return _out->isBinary(); }
const std::string& getSchemaName() const { return _schemaName; }
const osgDB::Options* getOptions() const { return _options.get(); }
void setWriteImageHint( WriteImageHint hint ) { _writeImageHint = hint; }
WriteImageHint getWriteImageHint() const { return _writeImageHint; }
@@ -172,6 +173,7 @@ protected:
std::stringstream _compressSource;
osg::ref_ptr<OutputIterator> _out;
osg::ref_ptr<OutputException> _exception;
osg::ref_ptr<const osgDB::Options> _options;
};
void OutputStream::throwException( const std::string& msg )