[osg-users] osgUtil::LineSegmentIntersector performance issues
Robert Osfield
robert.osfield at gmail.com
Tue Dec 4 09:21:34 PST 2018
Hi Andrea,
The osg::KdTree is design for the purpose of accelerating intersection
testing. What you need to do is run the KdTreeBuilder visitor on your
subgraph to generate KdTree for each osg::Geometry in the subgraph, these
then get assigned automaticaly to each osg::Geometry as a Shape. The
intersection traversals then automatically detect the KdTree when available
and use it instead of the raw primitive data into the Geometry.
I would also strongly recommend upgrading 3.6.3, it even contains some nice
improvement for KdTree building and intersections.
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20181204/ea574340/attachment.html>
More information about the osg-users
mailing list