[osg-users] IntersectionVisitor and USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION

Trajce Nikolov NICK trajce.nikolov.nick at gmail.com
Tue Nov 29 14:34:09 PST 2016

Hi Robert,

USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION seams to not have effect no matter if
it is selected or not. I traced the code and as is written now
IntersectionVisitor::apply(osg::PagedLOD& plod) is working always with the
highest res.

// Perform an intersection test only on children that display
// at the maximum resolution.

I need this functionality to be able to pick on the level of detail based
on the distance from the eyepoint. I am seeing there is a override for that
but it is never used

float IntersectionVisitor::getDistanceToEyePoint(const osg::Vec3& pos, bool
/*withLODScale*/) const
        return (pos-getEyePoint()).length();
        return 0.0f;

If you are very busy and give some hints I can try to implement this

Thanks a lot!

trajce nikolov nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20161129/1941d7fc/attachment-0002.htm>

More information about the osg-users mailing list