¡@

Home 

c++ Programming Glossary: contourx

C++ triangle rasterization

http://stackoverflow.com/questions/7870533/c-triangle-rasterization

max X for every horizontal line within the triangle long ContourX SCREEN_HEIGHT 2 #define ABS x x 0 x x Scans a side of a triangle.. x x Scans a side of a triangle setting min X and max X in ContourX using the Bresenham's line drawing algorithm . void ScanLine.. y y1 cnt m 1 k n 2 while cnt if y 0 y SCREEN_HEIGHT if x ContourX y 0 ContourX y 0 x if x ContourX y 1 ContourX y 1 x k n if k..