Hi Farshid,

I've just started reviewing your changes and it occurred to me that
this setMaxIntersectionsPerDrawable() is something that would be
useful for all intersector types.

I'm also wondering whether the parameter should be a bool rather than
a uint, and have it enable/disable collection of multiple hits per
drawable, or whether the first intersection is sufficient to indicate
an intersection, as I can't see times when you'd want 0 intersections
per drawable, and why you'd want 2 rather than 3 etc - for me you
either just care about whether a drawable is hit or not, or you care
about the drawable intersected and the actual intersection points.

Thoughts?
Robert.



On Thu, Mar 10, 2011 at 4:15 PM, Farshid Lashkari <[email protected]> wrote:
> Hi Robert,
> I've attached an updated patch which includes the changes suggested by
> Peter.
> Cheers,
> Farshid
> On Wed, Mar 9, 2011 at 3:08 PM, Farshid Lashkari <[email protected]> wrote:
>>
>> 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.
>> Cheers,
>> Farshid
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to