Bresenham's line rasterization algorithm. More...
#include "Robots/LoBot/util/LoMath.H"
#include <algorithm>
Go to the source code of this file.
Functions | |
template<typename visitor_fn > | |
void | lobot::rasterize_line (int x0, int y0, int x1, int y1, visitor_fn set_pixel) |
Rasterize a line using Bresenham's algorithm. |
Bresenham's line rasterization algorithm.
This file defines a function that rasterizes a line given its two end points. The whole thing works entirely with integer math and ought to be a fairly quick way of performing ray casting operations (for example).
Definition in file LoLineRasterizer.H.