LoLineRasterizer.H File Reference

Bresenham's line rasterization algorithm. More...

#include "Robots/LoBot/util/LoMath.H"
#include <algorithm>
Include dependency graph for LoLineRasterizer.H:
This graph shows which files directly or indirectly include this file:

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.

Detailed Description

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.

Generated on Sun May 8 08:42:49 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3