I have been looking for an example of using this utility PolytopeIntersector
to intersect say, a bounding box, of a more complex object,
with another set of objects in the scene. Are there any example snippets out
there how to go about this?

An example might be wanting to know if a moving car (surrounded by bounding
box) hit a cone or channelizer drum (e.g., "cylinder").

thanks all,
Ted

On Fri, Mar 5, 2010 at 11:10 AM, Jason Daly <jd...@ist.ucf.edu> wrote:

> 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
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to