[Algorithms] more plane-poly clipping woes
Brought to you by:
vexxed72
From: Charles B. <cb...@cb...> - 2000-09-20 22:03:27
|
Well, I'm now using "thick" BSP planes as suggested to me by Angel Popov. This basically means treating all your BSP planes as having some thickness; then any vert which lies in that thickness is treated as being already on the plane. When you clip a poly against a plane, the verts which are "on" the plane are not modified. This prevents you from clipping segments where one point has a distance of 999 and the other has a distance of -0.001 The problem is that the clipper is still not consistent. That is, if I take a polygon and clip it against a plane to produce two new polygons, and then test those against the plane, they should tell me they're on the front and back sides; instead they can occasionally report that they intersect the plane, because a vertex produced by clipping was not inside the thickness of the plane. The only solution I can think of for this is to have a larger epsilon for plane-testing than for plane-clipping (double seems to work), but that concerns me a bit (is there a way that could lead to inconsistency?). -------------------------------------- Charles Bloom www.cbloom.com |