Hi Farshid,

Am 10.03.2011 00:08, schrieb Farshid Lashkari:
> Hi Robert,
> 
> I've made a small addition to the osgUtil::PolytopeIntersector class
> that provides the potential for significant performance increase. In my
> use case for the PolytopIntersector, I'm not interested in every single
> intersection point with a drawable, I only want to know whether the
> drawable intersected or not.
> 
> 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.

I like the idea. This should help several people who
were annoyed with the performance of PolytopeIntersector
with large geometries.

I had a look at you patch and most indentations
do look wrong for me with tab-width==8. The surounding
code does not use tabs at all. I can say from personal
experience that Robert has been picky about such things
before...

But now it's time for me to be picky:
Why "Hits"? Everywhere else it says "Intersection".
While I am all in favor of variety I think
in this context we should stick to terms
that we already have and not needlessly introduce
new ones. So I would suggest:

getSetMaxHitsPerDrawable -> getSetMaxIntersectionsPerDrawable

setSetMaxHitsPerDrawable -> setSetMaxIntersectionsPerDrawable

_maxHitsPerDrawable -> _maxIntersectionsPerDrawable

> Cheers,
> Farshid


Cheers,

Peter
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, 
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 


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

Reply via email to