Changeset 13041 for OpenSceneGraph/trunk/include/osg/PagedLOD
- Timestamp:
- 03/21/12 18:36:20 (15 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/PagedLOD (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/PagedLOD
r12942 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 24 24 { 25 25 public : 26 26 27 27 PagedLOD(); 28 28 … … 31 31 32 32 META_Node(osg, PagedLOD); 33 34 33 34 35 35 36 36 virtual void traverse(NodeVisitor& nv); 37 37 38 38 virtual bool addChild(Node *child); 39 39 … … 61 61 inline const std::string& getDatabasePath() const { return _databasePath; } 62 62 63 63 64 64 struct OSG_EXPORT PerRangeData 65 65 { … … 80 80 81 81 typedef std::vector<PerRangeData> PerRangeDataList; 82 82 83 83 void setFileName(unsigned int childNo, const std::string& filename) { expandPerRangeDataTo(childNo); _perRangeDataList[childNo]._filename=filename; } 84 84 const std::string& getFileName(unsigned int childNo) const { return _perRangeDataList[childNo]._filename; } … … 114 114 115 115 116 /** Return the DatabaseRequest object used by the DatabasePager to keep track of file load requests 116 /** Return the DatabaseRequest object used by the DatabasePager to keep track of file load requests 117 117 * being carried on behalf of the DatabasePager. 118 * Note, in normal OSG usage you should not set this value yourself, as this will be managed by 118 * Note, in normal OSG usage you should not set this value yourself, as this will be managed by 119 119 * the osgDB::DatabasePager.*/ 120 120 osg::ref_ptr<osg::Referenced>& getDatabaseRequest(unsigned int childNo) { return _perRangeDataList[childNo]._databaseRequest; } 121 122 /** Return the const DatabaseRequest object.*/ 121 122 /** Return the const DatabaseRequest object.*/ 123 123 const osg::ref_ptr<osg::Referenced>& getDatabaseRequest(unsigned int childNo) const { return _perRangeDataList[childNo]._databaseRequest; } 124 124 125 125 126 126 /** Set the frame number of the last time that this PageLOD node was traversed. 127 * Note, this frame number is automatically set by the traverse() method for all traversals (update, cull etc.). 127 * Note, this frame number is automatically set by the traverse() method for all traversals (update, cull etc.). 128 128 */ 129 129 inline void setFrameNumberOfLastTraversal(unsigned int frameNumber) { _frameNumberOfLastTraversal=frameNumber; } … … 151 151 * Return true if children are removed, false otherwise. */ 152 152 virtual bool removeExpiredChildren(double expiryTime, unsigned int expiryFrame, NodeList& removedChildren); 153 153 154 154 protected : 155 155 156 156 virtual ~PagedLOD(); 157 157 158 158 void expandPerRangeDataTo(unsigned int pos); 159 159
