Hi Peter,

- Any idea to speed up this procedure?

Combine your two approaches: First check the planes of your
Polytope against the bounding volumes of your nodes.
Do not use "intersect" but check if the volume is
"properly" on the "inner" side of the plane. If this
test passes for all planes you don't need to generate
all the results.
If the bounding volume of the node is on the "outer"
side of any plane, there are no intersections.
If the bounding volume of the node intersects one of the planes
itself, use the polytope intersector for that node
to check for proper intersections.

I suspect that's what PolytopeIntersector already does, since it's implemented on top of a scene graph which has a BVH already, and which is always up to date... If not then that's a shame.

As I said I haven't looked at the code, so this is only speculation, but my hunch is that a lot of the time is spent on intersecting nodes (not totally outside, nor totally inside the polytope), testing each polygon to see if it's inside/intersecting the polytope. In that sense, the Intersections structure which contains the results is too detailed for our needs - all we'd need is which nodes are inside/intersecting the polytope. See my previous message on this thread.

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to