Changeset 253 for experimental


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

Legend:

Unmodified
Added
Removed
  • experimental/TerrainTest/ReaderWriterTerrainMod.cpp

    r252 r253  
    55        supportsExtension( "terrainmod", "Terrain modification pseudo loader");
    66
    7         std::string extensionToAdd = ".terrainmod";
     7        extensionToAdd = ".terrainmod";
    88}
    99
     
    3333
    3434        // Traverse through loaded graph, check for PagedLOD and modify all filenames of external references
     35        // This ensures ensures that higher LODs are loaded via terrainmod pseudo loader as well.
    3536        ModificationVisitor modVisitor(extensionToAdd);
    3637        node->accept( modVisitor );
     38
     39        // Modify loaded terrain
     40        ReaderWriterTerrainMod* this_unconst = const_cast < ReaderWriterTerrainMod* > (this);
     41        this_unconst->modifyTerrain();
    3742
    3843        return node;
    3944}
    4045
     46void ReaderWriterTerrainMod::modifyTerrain()
     47{
     48        //
     49        OpenThreads::Thread::microSleep( 500000 );
     50}
     51
    4152// Add ourself to the Registry to instantiate the reader/writer.
    4253REGISTER_OSGPLUGIN(terrainmod, ReaderWriterTerrainMod)
  • experimental/TerrainTest/ReaderWriterTerrainMod.h

    r251 r253  
    1717        virtual ReadResult readNode( const std::string& file, const osgDB::ReaderWriter::Options* options) const;
    1818
    19 
    20         //virtual ~ReaderWriterTerrainMod();
     19private:
     20        void modifyTerrain();
     21        std::string extensionToAdd;
    2122};
  • experimental/TerrainTest/TerrainTest.sln

    r250 r253  
    14881488        EndProjectSection
    14891489EndProject
    1490 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugins terrainmod", "..\Plugins terrainmod\Plugins terrainmod.vcproj", "{59A20266-19E6-4ABD-A43A-6485BA7C1537}"
     1490Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugins terrainmod", "Plugins terrainmod\Plugins terrainmod.vcproj", "{59A20266-19E6-4ABD-A43A-6485BA7C1537}"
    14911491EndProject
    14921492Global
Note: See TracChangeset for help on using the changeset viewer.