Hi Gang,

I'm working on improving picking performance via KDTree, but I'm hitting an
issue that is driving me nuts: If I pick a node from directly above (e.g. +
Z axis) everything works great, and picking is *very* fast.  If I pick at an
angle, (e.g. from eye(1,1,1)) then picking is fast, but not accurate - nodes
to the left, right, top, or bottom get picked instead of what I'm after.

Here is my KDTree Build function:

#ifdef USE_KDTREE

    // Update the KDTree
    osg::KdTree::BuildOptions kdTreeBuildOptions;
    osg::ref_ptr<osg::KdTree> kdTree = new osg::KdTree();

    if(kdTree->build(kdTreeBuildOptions, geometry))
    {
        geometry->setShape(kdTree.get());
    }
    else
    {
        LOG_MSG(logERROR) << "osg::KdTree::build() unsuccessful.";
    }
#endif

Any suggestions?

cheers,

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

Reply via email to