Changeset 251 for experimental/TerrainTest
- Timestamp:
- Feb 21, 2011, 3:05:37 PM (14 years ago)
- Location:
- experimental/TerrainTest
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/TerrainTest/ReaderWriterTerrainMod.cpp
r250 r251 20 20 return ReadResult::FILE_NOT_FOUND; 21 21 22 /*std::ifstream( fileName.c_str(), std::ios::in );23 if( !stream )24 return ReadResult::ERROR_IN_READING_FILE;25 return readNode( stream, options );*/26 27 22 // Strip the pseudo-loader extension 28 23 std::string realName = osgDB::getNameLessExtension( fileName ); … … 38 33 39 34 // Modify Node 35 OSG_NOTIFY( osg::ALWAYS ) << "Doing modification in pseudoloader!" << std::endl; 36 37 // Traverse through loaded graph, check for PagedLOD and modify all filenames of external references 38 ModificationVisitor modVisitor; 39 node->accept( modVisitor ); 40 41 std::string extensionToAdd = ".terrainmod"; 42 40 43 41 44 return node; -
experimental/TerrainTest/ReaderWriterTerrainMod.h
r250 r251 1 1 #pragma once 2 2 3 //#include <osg/> 4 3 #include <osg/Notify> 5 4 #include <osgDB/FileNameUtils> 6 5 #include <osgDB/FileUtils> … … 8 7 #include <osgDB/ReadFile> 9 8 9 #include "ModificationVisitor.h" 10 10 11 11 class ReaderWriterTerrainMod : public osgDB::ReaderWriter … … 14 14 ReaderWriterTerrainMod(); 15 15 16 virtual ReadResult readNode( const std::string&, const osgDB::ReaderWriter::Options*) const; 16 virtual const char* className() const { return "terrain modification pseudo-loader"; }; 17 virtual ReadResult readNode( const std::string& file, const osgDB::ReaderWriter::Options* options) const; 17 18 18 19
Note: See TracChangeset
for help on using the changeset viewer.