alessandro terenzi schrieb:
Actually, problem is that when clicking on a Text object, it is picked
correctly (...I mean that the intersector manages to find it...) but
when I cycle through the retrieved NodePath and try to dynamic_cast
the current node to osgText::Text* it always fails, whereas it succeds
if casting is done to osg::Geode* ...so I cannot get any reference to
the Text object that actually was picked but just to its parent Geode.
Hi Alessandro,
osg::Text is a drawable, you get it with getDrawable (or the drawable
member of the hit, don“t know which intersector you use), not with the
node path! A drawable is not a node!
Regards,
Andreas
Alessandro.
On 4/23/07, *Robert Osfield* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Hi Alessandro,
The PolytopeIntersector should work on Text, albeit with the same
caveats as normal geometry w.r.t point/vs interior picking as the
code isn't yet complete.
Robert.
On 4/23/07, alessandro terenzi <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
> Beside the picking problem stated above, I wonder if the
PolytopeIntersector
> can intersect osgText::Text objects? I'd like to implement
context menus so
> I need to pick one of many Text objects attached to the same
unique Geode,
> but it looks like that the intersector retrieves just the Geode
and not any
> of its (text) children...is this the expected behavior?
>
> Thanks.
> Alessandro
>
>
> On 4/21/07, Robert Osfield <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
> >
> > On 4/18/07, Paul Martz <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
> > > I hacked the Quick Start Guide example to draw two large
quads instead
> of
> > > two cows and you're absolutely right! One of the quad
vertices has to be
> > > inside the polytope in order for picking to work. This seems
like a bug
> in
> > > the Intersector classes. Either submit a fix, or alert
Robert to this
> when
> > > he's back from vacation.
> >
> > The PolytopeIntersector is only a partial implementation which
needs
> > replacing with a full implementation. An OSG user did extend
it to
> > work better, but didn't submit it an form ready for
integration, I was
> > expecting a later rev of this work, but it hasn't appeared
yet. I'll
> > need to do some searching through the archives to track it down.
> >
> > Robert.
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
<mailto:[email protected]>
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> >
>
>
> _______________________________________________
> osg-users mailing list
> [email protected] <mailto:[email protected]>
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
_______________________________________________
osg-users mailing list
[email protected] <mailto:[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/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/