John Galt wrote:
Hi,

I have a noob question.

Say I have a pyramid defined by points 0,1,2,3,4. And say I have another cube 
determined by points 5,6,7,8,9,10,11,12.

How do I detect whether the entire cube falls inside the pyramid or not?

What if the cube is very small and can be defined by a single point 13. Can I 
find out if the point 13 falls within the pyramid with a simple osg command?

I think you should be able to do this with a PolytopeIntersector. Just add each face of the pyramid as a plane in the Polytope, and intersect it against the cube. The nice thing about the PolytopeIntersector is that it will work with points and lines as well as faces, so it should work for your second case.

--"J"

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to