Sign in to follow this  

Forcing the mouse to follow one single line

Recommended Posts

I'm rendering many lines (with GL_LINES of course) on the screen, and I can select any one of them (with glPickMatrix) and any vertex in the line. Is there any easy way to force the mouse (once a line and a vertex are selected and highlighted) to move along this line (to the next vertex)? My plan is this: compute the projected 2D position of the next vertex, then force the mouse to appear there with SetCursorPos. Any better idea? Is there an easier way to compute the projected 2D position of a vertex than multiplying it with all matrices? Thanks. [Edit:]compute the projected 2D position: gluProject :-)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this