I've modified my picking code to use the osgUtil::LineSegmentIntersector
class as in the osgPick example (previously I was using the
osgUtil::PolytopeIntersector
class) and now everything works fine. Thank for your advices. BTW, what's
the difference between those classes? When one is more suitable than the
other?

Given that I'm not familiar with both those classes, I see from the picking
example given in OSG Quick Start Guide, that the latter uses
getXnormalized() and getYnormalized() methods of osgGA::GUIEventAdapter
class instead, in the osgPick example, mouse coordinates are aquired by
getX() and getY() methods... as a result my PolytopeIntersector used
normalized coordinates, instead the LineSegmentIntersector uses
not-normalized coordinates...maybe the picking problems I was experiencing
were due to this? What is the difference in using getX() and getY() instead
of getXnormalized() and getYnormalized()?

Thanks.
Alessandro


On 4/24/07, Andreas Goebel <[EMAIL PROTECTED]> wrote:


>
> Yes, I'm using osg::Viewer and I modified the picking example from
> "OpenSceneGraph Quick Start Guide" not the osgPick example. As far as
> I can understand, my picker is created within the overridden
> osgGA::GUIEventHandler::handle() method and it is executed when the
> right event (for example a mouse click...) is catched, so I suppose it
> is up to date when the point of view changes.
>
> Maybe, my menu item picking problem deals with the original picking
> problem I talked about here...ie that it works fine with vertices but
> not with the polygon those vertices describe...
>
Hi,

i´ve just tried the osgPick-sample with several models, and I don´t see
it fail on any of them.

In my own program I do play around with the projected line (behind the
mouse -xy-point) a bit to get all picks, but this is a different story.
On my machine osgPick works just fine.

Regards,

Andreas


_______________________________________________
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