12-12-2005, 04:27 AM
Hello,all:
I have drawn lines in the scene, now I want to press mouse button down on a line to select the line and then draw a point at the right position on this line. I can do the selection, but how to position the point? first ,I try to get the intersection of the line(though the mouse down position with gluUnProject() at z=0.0 and z=1.0) and the selected line. But it seems that not all lines have intersection, so would you help me please ? Thank you very much!
I have drawn lines in the scene, now I want to press mouse button down on a line to select the line and then draw a point at the right position on this line. I can do the selection, but how to position the point? first ,I try to get the intersection of the line(though the mouse down position with gluUnProject() at z=0.0 and z=1.0) and the selected line. But it seems that not all lines have intersection, so would you help me please ? Thank you very much!