Re: [osg-users] Ground clamping to paging terrain

2009-05-28 Thread Glenn Waldron
Brett, Installing a ReadCallback on your IntersectionVisitor will allow it to traverse PagedLODs so you can intersect with the highest LOD. Look at osgSim::HeightAboveTerrain for a demonstration of the technique. If you don't like that approach, you could install an osgDB::Registry::ReadCallback,

Re: [osg-users] Ground clamping to paging terrain

2009-05-28 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
I've tried the following which seems to work pretty well for moving models on the paging terrain surface. Perhaps you can leverage this to do what you need. double MissionFunctions::GetHeightOnTerrain(double lat, double lon) { double X,Y,Z; double maxElevation = 13000.0 / 3.281; //

Re: [osg-users] Ground clamping to paging terrain

2009-05-28 Thread Paul Martz
There is an osgSim::ElevationSlice that might be useful here, because it is smart about paged databases and will go to the highest LOD to get the elevation values. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 ___ osg-us

Re: [osg-users] Ground clamping to paging terrain

2009-05-28 Thread Chris 'Xenon' Hanson
brettwiesner wrote: > I want to position something (let's say a building) to a terrain. > Currently I'm getting the Z value for the building doing this with an > osgUtil::IntersectVisitor and that works fine for static terrains. When > I run on a paging terrain (like one from osgEarth) and I positi