PDA

View Full Version : 2D cross section with glClipPlane



helenw
01-30-2007, 07:40 PM
Hi teachers


I find the info. below. And now I want to draw a 2D cross section with glClipPlane.

How do I do?

thanks!!


"Currenty this is done in OpenGL with two clip planes (glClipPlane) very close to each other. Rendering(2D cross section) is done with glPolygonMode(GL_FRONT_AND_BACK,GL_LINE). This ensures that everything is drawn correctly when projecting orthogonally."

Ido_Ilan
01-30-2007, 08:52 PM
Hi,

If you need only the outline, I would suggest SW approach, I've implemented it some time ago using spatial trees, for large meshes (100000+ triangles) the time is around 1-2ms.
It does not suffer all of the drawback of the rendering technique like thick+thin lines, non close objects...

Ido

helenw
01-31-2007, 05:39 AM
Hi,Ido

Would you like to concretely describe the SW approach, spatial trees and so on? or give me some more infomation or www?

thanks

helen