I'm trying to use the osgSim::HeightAboveTerrain class to compute
terrain heights at various points within a TXP database.  The intent is
to get an array of Vec3d's such that I can create a grid pattern using
osg::Geometry that (coarsely) represents the database (I tried the
OverlayNode and other examples, but the textures just didn't work for
me).

In my code, I basically create a osgSim::HeightAboveTerrain object, then
loop through various points laterally offset from the terrain's center
point (as determined by the bounding sphere).  With each point, I call
the 'computeHeightAboveTerrain' method using the terrain node (read in
using osgDB::readNodeFile) and the computed point to get the height
above the terrain.  Unfortunately, all of the calls return the same
height.  The terrain is of a mountainous region, so the actual terrain
height varies considerably from point to point.

As a check, I ran the osgintersection example using the TXP database.
For this example, it also returns a constant height (and the same height
that I receive in my code).

Any suggestions on why a constant height is returned?  Are there steps
that I'm missing?  I searched the mailing list archives and couldn't
find any discussions related to my problem.  BTW, The TXP database is a
paged LOD database with a Z-up orientation.

TIA.

chuck

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to