Hi Shayne, Is each LineSegmentIntersector instance getting more than one intersection result? Or is the total number of results among all intersectors more than 1? The limit is applied to each intersector instance, so the total number of results should max out at the number of intersectors being used.
You can try applying the limit to the IntersectorGroup object as well, but you might still get more than 1 result. However, I think the "IntersectorGroup::intersect" method can be modified to break out of the intersector iteration if the limit has been reached. Cheers, Farshid On Thu, Sep 13, 2012 at 11:33 AM, Shayne Tueller <[email protected] > wrote: > Farshid, > > I'm actually modifying the osgSim::LineOfSight class for my tests. I went > into LineOfSight.cpp and modified the "computeIntersections()" method to > support "setIntersectionLimit()" since there's currently no way to control > this for the Line of Sight stuff in OSG. I added the call > "setIntersectionLimit()" for each LineSegmentIntersector instanced in the > "computeIntersections()" method. This was done at the top of the method > where the iterator loop is for each entry of _LOSlist. I believe this is > the correct way to do it... > > I then called "LineOfSight::computeIntersections()" in my app to test it > out against my terrain database. > > I would include the actual code snippet but my email machine doesn't have > the code on it so I hope that the above description of what I did makes > sense... > > It does make sense on how the LIMIT_NEAREST option works. Thanks for that > explanation. > > -Shayne > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=50029#50029 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

