Re: [osg-users] [Newbie]: PolytopeIntersector in WINDOW CoordinateFrame is not working as expected

2008-11-19 Thread Karl Karsten
Hello Peter, > 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

Re: [osg-users] [Newbie]: PolytopeIntersector in WINDOW CoordinateFrame is not working as expected

2008-11-19 Thread Jean-Sébastien Guay
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 yo

Re: [osg-users] [Newbie]: PolytopeIntersector in WINDOW CoordinateFrame is not working as expected

2008-11-19 Thread Jean-Sébastien Guay
Hello Karl, This is very, very fast, <1sec for 1.000 cows. But some nodes could be outside the selectionBoundingBox, because the box of the node has an intersection with the SelectionBoundingBox and not the node itself. Yes, that's a classic optimization. I haven't looked at the code (that's

Re: [osg-users] [Newbie]: PolytopeIntersector in WINDOW CoordinateFrame is not working as expected

2008-11-19 Thread Peter Hrenka
Hi guys, Karl Karsten schrieb: Hello Jean-Sébastien, it no big deal for me, coding around OpenSceneGraph is my hobby ... ... to keep a bit on track and good for my brain. A made some other code to select geometry objects within a box. The scenario is that I place 1.000 cows.osg (transform + sc

Re: [osg-users] [Newbie]: PolytopeIntersector in WINDOW CoordinateFrame is not working as expected

2008-11-19 Thread Karl Karsten
Hello Jean-Sébastien, it no big deal for me, coding around OpenSceneGraph is my hobby ... ... to keep a bit on track and good for my brain. A made some other code to select geometry objects within a box. The scenario is that I place 1.000 cows.osg (transform + scale) in a world cube of 200,200,2

Re: [osg-users] [Newbie]: PolytopeIntersector in WINDOW CoordinateFrame is not working as expected

2008-11-18 Thread Jean-Sébastien Guay
Hi Karl, hey, you are a hero ... It's working, fine. Glad I could help. Seems we're doing similar things... :-) Do you have any experience in terms of performance when expanding a rect (dragging like a rubberband) over a huge number of models (ex. hundreds or thousands of cow.osg) and comp

Re: [osg-users] [Newbie]: PolytopeIntersector in WINDOW CoordinateFrame is not working as expected

2008-11-18 Thread Karl Karsten
Hello Jean-Sébastien, hey, you are a hero ... It's working, fine. Do you have any experience in terms of performance when expanding a rect (dragging like a rubberband) over a huge number of models (ex. hundreds or thousands of cow.osg) and computing the intersection in a EventHandler depending

Re: [osg-users] [Newbie]: PolytopeIntersector in WINDOW CoordinateFrame is not working as expected

2008-11-18 Thread Jean-Sébastien Guay
Hello Karl, but my problem is that I will get always intersection when a model is loaded around origin (0,0,0) independently from the pan (zoom) of the model. Even when the model is far away or not visible in the window. In osgkeyboardmouse example it works correctly and intersection will be

[osg-users] [Newbie]: PolytopeIntersector in WINDOW CoordinateFrame is not working as expected

2008-11-18 Thread Karl Karsten
Hello, I am following the osgkeyboardmouse example and would like to implement a selection by a rect (like rubberbanding). I thought "PolytopeIntersector" in CoordinateFrame WINDOW is the right choice for it. Hmm, but my problem is that I will get always intersection when a model is loaded ar