Hi David,

Not quite sure what you are after, is that you want to use a polytope
to intersect with a scene, rather than a line segmenet as
IntersectVisitor does?

There is a spealized code in src/osgSim/SphereSegmenet.cpp does create
a osg::Polytope
and traversing throught the scene picking out what elements intersect
it.  Perhaps this would be useful guide for you.

BTW, a Polytope can be used to represent a bounding box, by building
it from 6 half space planes.


Robert.

On 6/25/06, David Johansson <[EMAIL PROTECTED]> wrote:
Hi All!

I have been looking for a while now, but have not found, a way to use
a BoundingBox and a IntersectVisitor.

I'm not sure if it's currently implemeted, but instead of writing my
own functions i thought i might just ask.
As shown in some examples you can use a LineSegment and a
IntersectVisitor to find node's (geodes) that intersect with a given
line. Since i am using this to Select objects (sometimes very thin
lines) with a mouse this does pose a problem. As you need to click on
the exact pixel to select the object.
So, i was thinking that maybe you could use a BoundingBox instead, and
check if any object is inside. So, back to the question.. Is there a
way to do this allready implemeted into OSG?

Thanks in advance!

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

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

Reply via email to