Changeset 13041 for OpenSceneGraph/trunk/src/osgPlugins/txp/TXPNode.h
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osgPlugins/txp/TXPNode.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/txp/TXPNode.h
r11122 r13041 1 // -*-c++-*- 2 /*************************************************************************** 1 // -*-c++-*- 2 /*************************************************************************** 3 3 * December 2003 4 4 * 5 * This TerraPage loader was re-written in a fashion to use PagedLOD 6 * to manage paging entirely, also includes a version of Terrex's smart mesh 7 * adapted to work with PagedLOD. The essential code by Boris Bralo is still present, 5 * This TerraPage loader was re-written in a fashion to use PagedLOD 6 * to manage paging entirely, also includes a version of Terrex's smart mesh 7 * adapted to work with PagedLOD. The essential code by Boris Bralo is still present, 8 8 * slight modified. 9 9 * nick at terrex dot com 10 * 10 * 11 11 * Ported to PagedLOD technology by Trajce Nikolov (Nick) & Robert Osfield 12 12 *****************************************************************************/ 13 13 14 14 /*************************************************************************** 15 * OpenSceneGraph loader for Terrapage format database 15 * OpenSceneGraph loader for Terrapage format database 16 16 * by Boris Bralo 2002 17 17 * … … 52 52 53 53 TXPNode(); 54 54 55 55 /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ 56 56 TXPNode(const TXPNode&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); 57 57 58 58 META_Node(txp, TXPNode); 59 59 60 60 virtual void traverse(osg::NodeVisitor& nv); 61 61 62 62 void setArchiveName(const std::string& archiveName); 63 63 void setOptions(const std::string& options); 64 64 65 65 const std::string& getOptions() const; 66 66 const std::string& getArchiveName() const; 67 67 68 68 //modified by Brad Anderegg on May-27-08 69 69 //because the TXPArchives are kept in an std::map and referenced later … … 71 71 //If NULL is passed into loadArchive it will do the same thing it used to. 72 72 bool loadArchive(TXPArchive*); 73 73 74 74 TXPArchive* getArchive() { return _archive.get(); } 75 75 … … 78 78 _archive = archive; 79 79 } 80 80 81 81 virtual osg::BoundingSphere computeBound() const; 82 82 83 83 protected: 84 84 85 85 virtual ~TXPNode(); 86 86 87 87 void updateEye(osg::NodeVisitor& nv); 88 88 void updateSceneGraph(); 89 89 90 90 // Create a page lod for lod 0 with givin grid location (x,y) 91 91 osg::Node* addPagedLODTile(int x, int y); 92 92 93 93 std::string _archiveName; 94 94 std::string _options; 95 95 96 96 OpenThreads::Mutex _mutex; 97 97 98 98 osg::ref_ptr<TXPArchive> _archive; 99 99 osg::ref_ptr<TXPPageManager> _pageManager; 100 100 101 101 double _originX; 102 102 double _originY; 103 103 osg::BoundingBox _extents; 104 104 105 105 std::vector<osg::Node*> _nodesToAdd; 106 106 std::vector<osg::Node*> _nodesToRemove; 107 107 108 108 }; 109 109
