Find indices of raster cells that intersect with a polygon
if you want to do this manually you'll need to test each cell for: 
Square v Polygon intersection and
Square v Line intersection.  
If you treat each square as a 2d point this becomes easier - it's now a Point v Polygon problem.  Check in Game Dev forums for collision algorithms.
Good luck!
I want to get a list of indices (row,col) for all raster cells that fall within or are intersected by a polygon feature. Looking for a solution in python, ideally with gdal/ogr modules.
Other posts have suggested rasterizing the polygon, but I would rather have direct access to the cell indices if possible.