PDA

View Full Version : how to make a hole in quad?



mochenoo
02-26-2010, 12:30 AM
Hi,

I'm beginner in opengl. I need opengl for simulation in my cnc program.
How can i make a hole in Quad or dissapear a part of one shape in opengl? and at all how can i drill my shape?

I ask this because in my simulation i have two shape: 1- quad or something like that. and 2- a thin cylinder as a drill.
i controll the position of drill and when the drill reach the shape, the conflicted area should be omited.

Heiko
02-26-2010, 02:04 AM
You can't.

To make a quad with a hole in it, use a combination of multiple quads (or triangles) that together form a shape that looks like a quad with a hole in it.

All forms in OpenGL are based on triangles (or quads). And you have to put these triangles/quads on the correct positions yourselves. For very complex objects, the objects are created in a 3d drawing program and exported to a file. Thereafter you would have to import it in your OpenGL program. 3d drawing programs often have options to make holes in objects. But the end product will also be a combination of triangles or quads.