Hi Shayne,

On Thu, Sep 13, 2012 at 10:32 AM, Shayne Tueller <[email protected]
> wrote:
>
> I first tried LIMIT_ONE. Performance did improve over the NO_LIMIT case
> but I noticed that the number of intersections calculated were as high as 6
> for some of the line segments. I would have expected just one intersection
> calculated. Why is more than one intersection being done in this case?
>

LIMIT_ONE should only report one intersection. Are you intersecting with
multiple line segments? Can you post the code you are using to setup the
intersector?


> Next I tried LIMIT_NEAREST. This resulted in many more intersections
> calculated. Some segments got as high as 27 intersections. That would
> suggest that this option is calculating intersections and then sorting
> through to determine which one is "closest" to the line segment starting
> point?


LIMIT_NEAREST can report many intersections. As I mentioned earlier, it is
more of a hint that you are only interested in the nearest hit. This allows
it to reject subgraphs early on before performing any intersections with
the actual mesh. However, in the worst case scenario where the scene is
traversed in farthest to closest order, then there will be no difference in
the number of hits between LIMIT_NEAREST and NO_LIMIT.

Cheers,
Farshid


>

I should point out that I'm intersecting my line segments with a terrain
> database...
>
> -Shayne
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=50026#50026
>
>
>
>
>
> _______________________________________________
> 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

Reply via email to