Hi Torben, On Mon, Jul 18, 2011 at 3:37 PM, Torben Dannhauer <[email protected]> wrote: > You are right, only providing additional wrappers (for HAT and for HOT) does > not make sense because there is no "general purpose" it would serve in an > optimal way. > Even in my use case it is not optional, I thought it's chaching pool is > persistent across several HAT calculations.
The ideal of the HeightAboveTerrain class is that the chaching of external tiles is persistent, but this only lasts as long as the HeightAboveTerrain class, so the convinience function doesn't take advantage of this. > > It seems I should really dive into the callback, and then implements a > "terrainQuery" class which provides the desired functions with caching etc.) > I'll post my resulting class at the forum/mailinglist, so you can decide if > it makes sense to move the class from osgVisual to OSG. The osgSim::DatabaseCacheReadCallback defined in the include/osgSim/LineOfSight header does the caching for you and as an implementation of the osgUtil::IntersectionVisitor::ReadCallback, so you probably won't need to write any of your own caching, just assign this to an IntersectionVisitor you create. The HeightAboveTerrain.cpp will give you a good pointer on how to put this together. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
