PDA

View Full Version : Several Rectangle or One rectangle with cuts

Mickey PT
08-02-2011, 07:02 AM
Hello
I'm a new user here in the forums, I'm learning OpenGL, and now i want to do a little application to show some "objects" in 3d.

This thread it's only to someone point me the right direction to do what i want.

So i have this little object that i have to create at runtime, I will have the width, the length and the depth, and some other measures to know where do i have the cuts.
In the image i only see the width and the length. What should i do to create this object at runtime, the red zones are filled.

1 - Should i draw several rectangles for each "section", and extrude them (A..H)?

2 - Should i draw a big rectangle and then make some cuts (1..4)? If this is the way to go the cuts should be made before the extrusion, or after?

3 - After passing this phase of defining the object i have to make some other cuts, for example after the extrusion, the front and the back will be parallel to each other (angles 90º), but in some cases i have to change that and have a smaller another angles like in the picture. It's the same process if i go for option number 2, but if i use option number 1 how should i do this cuts?

I hope i made myself clear in what I'm trying to achieve.

Thanks

ZbuffeR
08-02-2011, 07:58 AM
OpenGL draws triangles, does not extrude, does not cuts.
Just send a list of coordinates to draw triangles.

Mickey PT
08-03-2011, 03:39 AM
:(
Ok, i assume that the questions have "more" than simple OpenGL, and something in the CSG!? So let me redefine the questions.

How should i draw the initial object, i have the coordinates (x,y) for each point that makes a corner. Should i draw several triangles? Tesselation?

The "extrude", i can duplicate the plane of the object in other Z point, and then connect the points...

The final "cuts", the only way to do them it's with csg?

Thanks