Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hit test question
#1
Hi:

I have an 8x8 grid in 3d and I want to test for mouse clicks on the grid. I can get the screen coordinates of the four corners, so what is the fastest way to test what square was licked on by the user? The grid might be rotated or twisted in any direction. Every way I can think of seams to be too much calculations

Thanks for any hints.

Garvan
Reply
#2
Feedback buffer. Or try to read some tutes on "gl picking"
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#3
Quote:Feedback buffer. Or try to read some tutes on "gl picking"

I looked at code like this earlier today, but decided to try something else that I found in the OpenGL docs but did not have any code samples for. I figured it out in the end, using ideas from.

http://astronomy.swin.edu.au/~pbourke/ge...nsidepoly/

Thanks

Garvan
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)