Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Sweep selection error picking object not in swept rectangle...

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2012
    Posts
    11

    Sweep selection error picking object not in swept rectangle...

    I have implemented a sweep rectangle, and it seems to be working ~98 % of the time...!!
    ( really does very good and am overall very pleased with it )

    I noticed today when I was playing with the sweep selectin that I selected a set of elements and it picked the elements I did touch!
    BUT, it also picked a circle element that was no where near my sweep rectangle...???

    So in short, I'm not sure why it would select an element that is not even close to the sweep rectangle and not sure how you would trouble shoot it which is the big issue?
    It also does report a hit on it.... like I said it shouldn't be an issue?
    Last edited by EricMar; 10-09-2012 at 03:33 PM.

  2. #2
    Junior Member Newbie
    Join Date
    Oct 2012
    Posts
    11
    Interesting, I have been playing with this, and for some reason depending on the the sweep, it will add the very last rendered object to the selection list...
    Eventhough it was not even close to the selection rectangle

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Posts
    785
    Given the information you've posted I don't see how anybody would be able to help you, beyond some generic advice like: run it under a debugger, set a break point where the objects are added to the selection list and work backwards from there to find out why it adds an incorrect object.

    So, unless you provide more information, you are likely to continue talking to yourself in this thread

  4. #4
    Junior Member Newbie
    Join Date
    Oct 2012
    Posts
    11
    After searching and testing, it ended up being an animation thread I made to test animation...


    So after I rendered all my elements
    then ALSO did this below:

    ( if I commented this bit of code, it then worked fine... so I take it it was the translate as well as the Push/Pop Matrix ) it worked fine...


    glColor3f(0,0,.5);
    glPushMatrix();
    double move=10.0*m_iAnimate/100;
    glTranslatef(move,0,0);
    GLUquadric * obj=gluNewQuadric();
    gluSphere( obj , 1.0*m_iAnimate/100 , 10,10);
    glTranslatef(-move,0,0);
    gluDeleteQuadric(obj);
    glPopMatrix();
    Last edited by EricMar; 10-09-2012 at 09:53 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •