I have to find all tiles that intersected by line segment but Bresenham’s line algorithm doesnt fit to my requirements. I need to find all cells. I dont need to know intersection points, only the fact of intersection. Thanks for help.
I thought to find direction vector of line and step by step find cells by division on tile size. But i dont know how to select correct step size. 1 px step is bad i think.
Here is article of Amanatides and Woo “A Fast Voxel Traversal Algorithm for Ray Tracing” for 2D and 3D cases. Practical implementation.