Advertisement

Triangle division and the winding

Started by March 07, 2002 10:52 AM
0 comments, last by AbeE 22 years, 11 months ago
I have my level editor and it outputs all the triangles in clockwise winding but I'm having difficulty keeping them by the same winding after I divide them across planes (for quadtree purposes). After I find the intersection points of the triangle-plane I have to create a new triangle,....scrapping the old big one. So say I have 2 new points and I use a single 3rd coordinate from the old large triangle as so... ........plane ..........| A------D-----oB |.........|....o |.........|..o |.........Eo |........o| |......o..| |....o....| |..o......| |o C Where D+E are the new coordinates and B is the one from the old large triangle. If I use the method of starting with the old one and then the lowest new one and the last it'll be clockwise winded. But if the polygon is facing the other direction,..using the same technique it'll be counterclockwise winded. Does anyone understand what I'm saying and if so am I talking crud? Thanks for any input. ps - sorry bout the cack drawin' Edited by - AbeE on March 7, 2002 11:56:49 AM
Perhaps you could do this:

Rotate the vertexes so that the clobbered one is at the end.

If A is clobbered, the order will become BCA.
If B is clobbered, the order will become CAB.
If C is clobbered, the order will become ABC.

Then create two new triangles:

First point in list, first intersection, second intersecton
First point in list, second intersection, second point in list

Then get rid of the original triangle.

I probably don't understand, but at least I tried.

Edited by - smart_idiot on March 7, 2002 1:34:27 PM
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.

This topic is closed to new replies.

Advertisement