Results 1 to 3 of 3

Thread: Need some help about picking (it's very important)

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2000
    Location
    France
    Posts
    4

    Need some help about picking (it's very important)

    I have an important project to realize, a CAD file viewer like *.STL. But even if I have already done the model visualisation, I must now implement selection of face (and probably vertex and lines). So I need some help about the picking technic. First my objective is to change color of selected faces.
    Thanks to all who can help me.

    PS: Sorry for my bad english but i'm french

  2. #2
    Member Contributor
    Join Date
    Mar 2000
    Location
    PA, USA
    Posts
    70

    Re: Need some help about picking (it's very important)

    The easiest method that I know of doing selection is the one outlined in the OpenGL Redbook. I.e. encode identifiers for your objects as rgba values and draw the scene using these encoded values as the colors, but do not swap buffers. Then, when the user clicks at a point, you can grab the rgba value at the mouse point from the back buffer, decode the color and get back to your object identifier.

    Good luck.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2000
    Location
    France
    Posts
    4

    Re: Need some help about picking (it's very important)

    I thank U very much. But I have a problem, my mesh is a CAD model and have no color (it musn't use color -> the client is king).
    I have heard a technic which consist in creating a line (Z axis parallel) and select all the faces which intersect with this line.
    I wonder now how know which are these faces.
    Thanks again.

Similar Threads

  1. one questions (Important)
    By orache in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-17-2013, 03:07 AM
  2. for tinak , important !
    By jirkamelich in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 11-16-2002, 12:34 AM
  3. OT - but it's so important that you will care, believe me
    By zeckensack in forum OpenGL: Advanced Coding
    Replies: 24
    Last Post: 03-28-2002, 03:10 PM
  4. OT but important- sorry-
    By neon68 in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 03-23-2002, 08:28 AM
  5. VERY IMPORTANT, please !!!
    By jc in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 09-26-2000, 06:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean