Hi Andy, Am 23.10.2012 15:03, schrieb Andy Skinner: > Thanks for comments, Peter. > > By "easier to pick", I didn't mean relative to other lines in the scene, but > that I wouldn't have to be as close to the actual line geometry. It is a > question of whether the line will be in the list of intersections, rather > than which intersection I choose. > > I suspect the same thing about whether it is worth the effort. > >> As for your "other kinds of thinks" in the scene you should be aware that >> the performance of PolytopeIntersector for 2d-geometries is rather bad. It >> is much faster to use LineSegementIntersector for those and combine the >> results afterwards. > > By 2d-geometries, do you mean triangles and quads (and not 2D scenes)? And > that it would be better to run the polytope intersector for points and lines, > and a separate line intersector for triangles and quads, and combine > intersections? I know all of that is pretty much what you said, but I wanted > to be sure. That's using two intersection traversals. Sounds interesting if > it is really faster.
Yes, I did mean triangles and quads. I haven't done performance measurements but I did implement the PolytopeIntersector for triangles and quads. There are quite a few cases to cover to get it correct. The IntersectionVisitor has the additional advantage that it can use a kd-tree for speedup (which unfortunately is totally geared towards triangles, and hence unsuitable for the PolytopeIntersector). But, yes, I do mean performing two separate intersections, where you can turn off the PolytopeIntersector checks for 2d-elements by using setDimensionMask(DimZero|DimOne) and merging those results with the results from a LineSegmentIntersector. > thanks, > andy Cheers, Peter > _______________________________________________ > 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

