Hi Chris,

On 11/17/06, c sklu <[EMAIL PROTECTED]> wrote:
Hi Robert,

It was a bit difficult to explain and I was hoping the pictures would
help. Basically, the yellow rectangles in the pictures show the region
where a pick would return positive. So if you imagine that you click
and drag a box on screen such that any portion of that box is within
the yellow rectangle, a hit is returned.

In looking at the code for Plane::intersect() and the logic for
Polytope::contains() (although I can't follow it completely), I think
it make sense to me now. Refer again to attached rudimentary pic. If
the red box represents the desired box-selection, then obviously for
planes A and B, the object is completely on the positive side of the
plane. But for planes C and D you can see that a part of the object is
on the positive side. I'm not really sure how Polytope::contains()
handles this. But I think it is necessary to traverse all vertices if
the initial bounding sphere calculation passes and see if any of them
are completely contained in the polytope. I hope that makes sense.

I am surprised the polytope intersector is return an intersect in the
case you point out, since no points should be within the box.

I'd recommend you put some debugging code into the
PolytopeIntersector's code to see why its returning try when it tests
the drawable against the polytope.

As i said before the PolytopeIntersector isn't complete yet.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to