I wrote a simple ray tracer, and now I try to implement an uniform grid. There is a lot of documentation on how to traverse the grid, but I don't know how to construct the grid.
I have my uniform grid and my triangles. How could I know, which cell(s) in the grid correspond(s) to my triangles ?
Thanks fo your answers.