PDA

View Full Version : Line intersection? Any GL function??



uNsignedINT
04-16-2003, 08:37 AM
Hello, is there any GL function that tells me if one line intersects another?

I'm developing a mini CAD system usig GL and C++. In order to draw a non regular polygon I need to know if there is any intersection in the process of drawing a new line with the mouse!

Help!! Thanks!

shinpaughp
04-16-2003, 09:23 AM
There are several tutorials at http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg3.htm . And, no OpenGL specific functions to do that.

edit: messed up the ending url tag

[This message has been edited by shinpaughp (edited 04-16-2003).]

nexusone
04-16-2003, 10:14 AM
No, GL only handles drawing routines, but there are lot's of math sites and tutor sites that have line intersect.

It has been posted here on this forum many times, just use the search function.

Also google is your friend, and will give you ton's of sites on it.



Originally posted by uNsignedINT:
Hello, is there any GL function that tells me if one line intersects another?

I'm developing a mini CAD system usig GL and C++. In order to draw a non regular polygon I need to know if there is any intersection in the process of drawing a new line with the mouse!

Help!! Thanks!