Changeset 11037
- Timestamp:
- 02/02/10 12:16:10 (3 years ago)
- Location:
- OpenSceneGraph/trunk/src/osgPlugins/txp
- Files:
-
- 3 modified
-
ReaderWriterTXP.cpp (modified) (1 diff)
-
ReaderWriterTXP.h (modified) (1 diff)
-
TXPNode.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/txp/ReaderWriterTXP.cpp
r11036 r11037 625 625 } 626 626 627 bool ReaderWriterTXP::removeArchive( int id ) 628 { 629 osg::notify(osg::INFO)<<"ReaderWriterTXP::removeArchive(id="<<id<<")"<<std::endl; 630 return (_archives.erase(id) >= 1); 631 } 632 627 633 class SeamFinder: public osg::NodeVisitor 628 634 { -
OpenSceneGraph/trunk/src/osgPlugins/txp/ReaderWriterTXP.h
r8578 r11037 74 74 return const_cast<ReaderWriterTXP*>(this)->local_readNode(file, options); 75 75 } 76 77 bool removeArchive( int id ); 76 78 77 79 protected: -
OpenSceneGraph/trunk/src/osgPlugins/txp/TXPNode.cpp
r10965 r11037 5 5 #include <osg/MatrixTransform> 6 6 #include <osgUtil/CullVisitor> 7 #include <osgDB/Registry> 8 #include <osgDB/ReaderWriter> 7 9 8 10 #include <iostream> … … 14 16 #include "TXPNode.h" 15 17 #include "TXPPagedLOD.h" 16 18 #include "ReaderWriterTXP.h" 17 19 18 20 … … 79 81 TXPNode::~TXPNode() 80 82 { 83 if (_archive.get()) 84 { 85 if (osgDB::ReaderWriter * rw = 86 osgDB::Registry::instance()->getReaderWriterForExtension("txp")) 87 { 88 if (ReaderWriterTXP * rwTXP = 89 dynamic_cast< ReaderWriterTXP * >(rw)) 90 { 91 const int id = _archive->getId(); 92 if (!rwTXP->removeArchive(id)) 93 { 94 TXPNodeERROR("Failed to remove archive ") << id << std::endl; 95 } 96 } 97 } 98 } 81 99 } 82 100
