[osg-users] Ground clamping to paging terrain

2009-05-28 Thread brettwiesner
Hi, 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 position the building,

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 position

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 ___

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