You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks a lot for the code, I'm using it to rasterize triangles in a Delaunay triangulation. I discovered an issue in the case of triangles with both short sides on the left; the spans in this case reach from x1 to x2, where x1 > x2 and so no pixels are drawn in:
That's cool! Glad to hear you found it useful. It's been a while since I worked on this, but it looks like the Span constructor ensures that X1 is less than X2, so I think that case should already be handled in the original code (it probably does make more sense to do the swapping when drawing the span, though)
Hey Josh,
thanks a lot for the code, I'm using it to rasterize triangles in a Delaunay triangulation. I discovered an issue in the case of triangles with both short sides on the left; the spans in this case reach from x1 to x2, where x1 > x2 and so no pixels are drawn in:
triangleraster/Rasterizer.cpp
Line 118 in 263d823
The failure cases are exemplified in the image below (black triangles: failure case, gray: successfully rasterized)
I've fixed it by simply swapping the range limits if x2>x1.
The text was updated successfully, but these errors were encountered: