PDA

View Full Version : How to get 3d coords from mouse clicks - drawing a curve...



BigShooter
10-31-2003, 12:04 AM
Could someone please explain to me how I could click on in ogl screen (using glut, too) and have a 3d points defines in that area? What I'd like to do is have a user click on screen and draw nurbs curve. I know how to do the curves, just don't know how to do it interactively...
So again, I'd like the user to click and draw points on screen, which would then be used to draw the nurbs curve as the points are clicked.
Thank you,
Luke

cwc36
10-31-2003, 12:38 AM
Hi,

You can use gluUnProject command to get the coordinates x, y, z. U can find out more detail in red book.