Ignore:
Timestamp:
Feb 21, 2011, 3:05:37 PM (14 years ago)
Author:
Torben Dannhauer
Message:
 
Location:
experimental/TerrainTest
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • experimental/TerrainTest/ReaderWriterTerrainMod.cpp

    r250 r251  
    2020                return ReadResult::FILE_NOT_FOUND;
    2121
    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 
    2722        // Strip the pseudo-loader extension
    2823    std::string realName = osgDB::getNameLessExtension( fileName );
     
    3833
    3934        // 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
    4043
    4144        return node;
  • experimental/TerrainTest/ReaderWriterTerrainMod.h

    r250 r251  
    11#pragma once
    22
    3 //#include <osg/>
    4 
     3#include <osg/Notify>
    54#include <osgDB/FileNameUtils>
    65#include <osgDB/FileUtils>
     
    87#include <osgDB/ReadFile>
    98
     9#include "ModificationVisitor.h"
    1010
    1111class ReaderWriterTerrainMod : public osgDB::ReaderWriter
     
    1414        ReaderWriterTerrainMod();
    1515
    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;
    1718
    1819
Note: See TracChangeset for help on using the changeset viewer.