Just an update.
OSG KdTree works great!
Computational time for "camera->accept(intersectionVisitor)":
before it was about 10M microseconds
with KdTree it is about 25 microseconds!
This is the code I modified in my example:
Code:
osg::Node* createScene() {
osg::Geode* geode = new osg::Geode;
osg::KdTree* kdtree = new osg::KdTree;
osg::Geometry* geometry = buildGeometry();
osg::KdTree::BuildOptions buildOptions;
kdtree->build(buildOptions, geometry);
geometry->setShape(kdtree);
geode->addDrawable(geometry);
return geode;
}
Gianni
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71284#71284
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org