Hi Robert,
Thanks for the advice, after using KdTree and LineSegmentIntersector, my update 
traversal rate reduce from 700ms to 60ms.
Regards,
John



----- Original Message ----
From: Robert Osfield <[EMAIL PROTECTED]>
To: OpenSceneGraph Users <[email protected]>
Sent: Tuesday, July 15, 2008 5:33:35 PM
Subject: Re: [osg-users] Update Optimization

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



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

Reply via email to