Changeset 305 for osgVisual/trunk/include/util
- Timestamp:
- Jul 19, 2011, 9:47:13 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/include/util/terrainQuery.h
r300 r305 15 15 */ 16 16 17 #ifndef OSGSIM_HEIGHTABOVETERRAIN18 #define OSGSIM_HEIGHTABOVETERRAIN 117 #ifndef osgVisual_HEIGHTABOVETERRAIN 18 #define osgVisual_HEIGHTABOVETERRAIN 1 19 19 20 20 #include <osgUtil/IntersectionVisitor> … … 23 23 #include <osgSim/LineOfSight> 24 24 25 namespace osg Sim{25 namespace osgVisual { 26 26 27 27 /** Helper class for setting up and acquiring height above terrain intersections with terrain. 28 * By default assigns a osg Sim::DatabaseCacheReadCallback that enables automatic loading28 * By default assigns a osgVisual::DatabaseCacheReadCallback that enables automatic loading 29 29 * of external PagedLOD tiles to ensure that the highest level of detail is used in intersections. 30 30 * This automatic loading of tiles is done by the intersection traversal that is done within … … 33 33 * The external loading of tiles can be disabled by removing the read callback, this is done by 34 34 * calling the setDatabaseCacheReadCallback(DatabaseCacheReadCallback*) method with a value of 0.*/ 35 class OSGSIM_EXPORT HeightAboveTerrain35 class terrainQuery 36 36 { 37 37 public : 38 38 39 enum DataSource 40 { 41 LOADED_SCENE, 42 PAGE_HIGHEST_LOD 43 44 }; 39 45 40 HeightAboveTerrain(bool loadHighestLOD = true);46 terrainQuery(); 41 47 42 48 … … 81 87 82 88 /** Compute the vertical distance between the specified scene graph and a single HAT point. */ 83 static double computeHeightAboveTerrain(osg::Node* scene, const osg::Vec3d& point, bool loadHighestLOD = true, osg::Node::NodeMask traversalMask=0xffffffff);89 static double computeHeightAboveTerrain(osg::Node* scene, const osg::Vec3d& point, DataSource pagingBehaviour, osg::Node::NodeMask traversalMask=0xffffffff); 84 90 85 91 /** Compute the vertical position of the scene at a single HOT point. */ 86 static double computeHeightOfTerrain(osg::Node* scene, const osg::Vec3d& point, bool loadHighestLOD = true, osg::Node::NodeMask traversalMask=0xffffffff);92 static double computeHeightOfTerrain(osg::Node* scene, const osg::Vec3d& point, DataSource pagingBehaviour, osg::Node::NodeMask traversalMask=0xffffffff); 87 93 88 94 … … 93 99 * Note, if you have multiple LineOfSight or HeightAboveTerrain objects in use at one time then you should share a single 94 100 * DatabaseCacheReadCallback between all of them. */ 95 void setDatabaseCacheReadCallback(DatabaseCacheReadCallback* dcrc);101 void setDatabaseCacheReadCallback(osgSim::DatabaseCacheReadCallback* dcrc); 96 102 97 103 /** Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs.*/ 98 104 osgSim::DatabaseCacheReadCallback* getDatabaseCacheReadCallback() { return _dcrc.get(); } 99 105 100 106 protected : … … 118 124 HATList _HATList; 119 125 120 121 osg::ref_ptr<DatabaseCacheReadCallback> _dcrc; 126 osg::ref_ptr<osgSim::DatabaseCacheReadCallback> _dcrc; 122 127 osgUtil::IntersectionVisitor _intersectionVisitor; 123 128
Note: See TracChangeset
for help on using the changeset viewer.