Hi Farshid,
I've added an attribute that allows the user to specify how many hits per drawable they want reported. Once the maximum hits have been encountered for a drawable, it will stop performing the intersection tests for the remaining primitives. By setting this to 1, I still know which drawables are hit, but get a noticeable performance boost.
Very interesting, thanks for the submission. I've mused in the past about adding a similar attribute to all intersectors, that would stop testing intersections as soon as one was found. In ray tracing, we often only want to know if *at least* one intersection is found (shadow rays) and this kind of optimization would help a lot in that case - I've used OSG as a base for a ray tracer in the past :-)
I'm not suggesting you implement this, just saying your idea is similar to what I wanted to do long ago :-)
J-S -- ______________________________________________________ Jean-Sebastien Guay [email protected] http://www.cm-labs.com/ http://whitestar02.webhop.org/ _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
