Well I don't use the current version and what Robert gave me I had to backport it a little to OSG 2.4, but it was working fine for me. We don't do anything special with setting up the visitor. This is essentially what we do.

mLineSegmentIntersector = new LineSegmentIntersector (Intersector::WINDOW, 0.0f, 0.0f); mIntersectionVisitor = new IntersectionVisitor (mLineSegmentIntersector.get ());

mIntersectionVisitor->reset ();
mLineSegmentIntersector->set (Intersector::WINDOW, mx, my);

view->GetCamera ()->GetOSGCamera ()->accept (*mIntersectionVisitor);

Judd Tracy
Assistant in Simulation
Institute for Simulation and Training
University of Central Florida
Phone: (407) 384-5507
[EMAIL PROTECTED]



Vincent Bourdier wrote:
Hi Judd
Thanks for you answer.
I think I have the same problem, the pick result depends on the direction the camera is looking.
I'm not OSG master, and I think you tried to resolve the problem.

So, do you think this can be easy to solve ? or is it a big work with current OSG version ?

Thanks for help.

Regards,
   Vincent.

2008/11/13 Judd Tracy <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>

    I was the one who originally reported the problem and tested the
    fix for Robert.  The problem was that the PickVisitor would not
    rotate the billboards toward the camera in the traversal for the
    PickVisitor.  So depending on where you were located in the
    database you would be able to pick some billboards but not others,
    because they were not oriented toward you.  Try moving somewhere
    else on the database and try picking again.  If you can pick the
    billboards better then you are having the same problem that I did.

    Judd Tracy
    Assistant in Simulation
    Institute for Simulation and Training
    University of Central Florida
    Phone: (407) 384-5507
    [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>



    Vincent Bourdier wrote:

        for the moment :

        On 2.6.1 : no pick on billboards
        On 2.7.5 : pick work a little... not very reliable. sometimes
        billboards are picked, sometimes not...

        You can see in attached file one of my billboard.
        Open it with osgpick example, and you will understand...  I
        can't pick the billboard in this example.

        In my application, there are a lot of theses billboards.
        Sometimes they are picked, sometimes not. and another strange
        thing : the billboard is not in the top of the picked list...
        even if it must be...

        Any idea ? remark ? I feel a bit lost with theses complications.

        Thanks a lot.

        Regards,
          Vincent.

        2008/11/13 Robert Osfield <[EMAIL PROTECTED]
        <mailto:[EMAIL PROTECTED]>
        <mailto:[EMAIL PROTECTED]
        <mailto:[EMAIL PROTECTED]>>>


           On Thu, Nov 13, 2008 at 8:11 AM, Vincent Bourdier
           <[EMAIL PROTECTED]
        <mailto:[EMAIL PROTECTED]>
        <mailto:[EMAIL PROTECTED]
        <mailto:[EMAIL PROTECTED]>>>

           wrote:
           > With OSG 2.7.5, launching osgpick lz.osg and picking trees, I
           can pick
           > billboards !
           > So picking on Billboard is really implemented.
           >
           > So, why in my application I cannot pick billboards ?  For the
           picking, are
           > there any necessary things like normals ? parent(s) ? ... ?

           I don't know what might be up, all I know is that I've merge a
           submission that on my initial test worked fine.

           Robert.
           _______________________________________________
           osg-users mailing list
           osg-users@lists.openscenegraph.org
        <mailto:osg-users@lists.openscenegraph.org>
           <mailto:osg-users@lists.openscenegraph.org
        <mailto:osg-users@lists.openscenegraph.org>>

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


    _______________________________________________
    osg-users mailing list
    osg-users@lists.openscenegraph.org
    <mailto: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