Hi John,

On Tue, Jul 15, 2008 at 2:48 AM, John Burgess
<[EMAIL PROTECTED]> wrote:
>
> I've tried the KdTree but my update traversal rate is still the same as
> before. Below is my code snippet to enable KdTree, am I doing the right
> thing?
>
> osgDB::Registry::instance()->setBuildKdTreesHint(osgDB::ReaderWriter::Options::BUILD_KDTREES);
>
> // Load the terrain
>
> osg::Node* _terrain = osgDB::readNodeFile(terrainFile);

You have to use osgUtil::IntersectionVisitor + LineSegmentIntersector
to take advantage of the new KdTree intersections, the old (and
deprecated) osgUtil::IntersectVisitor does not support KdTree
intersection.

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

Reply via email to