Hi Torben,

On Mon, Jul 18, 2011 at 2:23 PM, Torben Dannhauer <[email protected]> wrote:
> Hmm, maybe we talk at cross-purposes:
>
> osgSim::HeightAboveTerrain provides already a convenience Method for HAT 
> calculations:
>
> Code:
>
> static double computeHeightAboveTerrain(osg::Node* scene, const osg::Vec3d& 
> point, osg::Node::NodeMask traversalMask=0xffffffff);
>

Ahh... forgot completely about this method.

This convinience function is a bit too convinient really - encourages
inefficient usage as it'll be creating the DatabaseCacheReadCallback
on every invocation and will load external files then dispose of the
associated subgraphs as soon
as the function exits.

> I can't really follow you regarding the computation effort or paging 
> performance, because the HOT calculation is no extra step, it is a by-product 
> of your HAT calculation.

If you have a geocentric model then you are doing an extra computation.

> I agree that the HAT-class may not be not the best place for HOT 
> calculations.  ;)

It's not a general purpose intersection class, is a very specific
interseciton class.  It's also pretty tiny, and easy to replace with
more user specific code.

> Meanwhile I'll add these functions to the osgVisual utils to provide the 
> users of my department a simple to use interface to query hat / hot.

All the osgSim interseciton classes are just wrappers on top of the
core osgUtil::IntersectionVisitor functionality, if these classes
don't fit the bill then it should be straight forward to build your
own similar implementations that do exactly what you require.

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

Reply via email to