Grid utils for ray tracing and range boundaries