Jump to content


3d picking


6 replies to this topic

#1 rogerdv

    Member

  • Members
  • PipPip
  • 99 posts

Posted 09 September 2003 - 05:03 PM

I finished my simple isometric renderer (looks like Neverwinter view, really nice), but I still have a couple of problems. One is convrting mouse coordinates (2d screen coords) to my map coordinates. That requires some raytracing and calculation, because the view can be rotated and zoomed. Im looking for somebody with good math skills and opengl experience who can help me to implement this. Any volunteer?

#2 Ed Mack

    Senior Member

  • Members
  • PipPipPipPip
  • 1239 posts

Posted 09 September 2003 - 05:43 PM

Ok, this isn't quite what you want I think, but you could use glRenderMode(GL_SELECT), and then set up some buffers to get the objects the mouse was over. The Red Book has a good bit of info on this I'm quite sure.

Of course, I suppose you want coords of the mouse in your virtual world ^_^

#3 Noor

    Senior Member

  • Members
  • PipPipPipPip
  • 503 posts

Posted 09 September 2003 - 07:00 PM

Ed Mack: welcome back...
"What ever happened to happily ever after?"

#4 rogerdv

    Member

  • Members
  • PipPip
  • 99 posts

Posted 09 September 2003 - 07:29 PM

Yes, gl picking system is an option. But I would prefer the raytracing solution.

#5 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 10 September 2003 - 05:29 AM

there is a code snipped floating around.. for ray-sphere intersections.. its the snipped we used in starcraft3d to select units.. it worked great..
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#6 rogerdv

    Member

  • Members
  • PipPip
  • 99 posts

Posted 10 September 2003 - 12:54 PM

Where is that code snippet?
After carefully evaluating gl picking, I found that raytracing is the only choice. Just the map tiles overflow the name buffer (I render no less than 256 tiles).

#7 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 10 September 2003 - 10:17 PM

Algorithms & Code Snippets?

(there)
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users