1 / 8

Picking

Picking. What is picking?. Selecting an object on the screen What does this require? Get Mouse Location Compute what objects are rendered at the position. Example. How to do it. http://www.opengl.org/resources/faq/technical/selection.htm

ondrea
Download Presentation

Picking

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Picking

  2. What is picking? • Selecting an object on the screen • What does this require? • Get Mouse Location • Compute what objects are rendered at the position

  3. Example

  4. How to do it • http://www.opengl.org/resources/faq/technical/selection.htm • http://gpwiki.org/index.php/OpenGL:Tutorials:Picking

  5. Color Picking • http://gpwiki.org/index.php/OpenGL_Selection_Using_Unique_Color_IDs

  6. GL_SELECTION • http://gpwiki.org/index.php/OpenGL:Tutorials:Picking • Render twice • glRenderMode(GL_SELECT); • SetViewport to one pixel • It counts how many objects render to that pixel • Read back # (glRenderMode(GL_RENDER) • Identify objects – use name stack

  7. What we’ve been doing

  8. gluUnProject • GLint gluUnProject( GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ )

More Related