Uniform Grids is implemented. As we are using Object-orient design, this new implement, though time-consuming on
debugging especially for the loop control, is quite straight forward, and actually require no changes to the BVH raytracer. I only need to write another class for Grids and Grid, implement their Hit(), and instead of creating BVHNode (a subtype of Surface) and pass the pointer to the Surface* member of the World object, now I just create Grids(also subtype of Surface).
The tests are carried out at the same machine. This time the BVH CPU time is a bit longer than the previous tests, perhaps because I changed the BBox::Hit(..double &tmin, double &tmax..) to BBox::Hit(..double tmin, double tmax..). However, the exact reason of this CPU change is not clear: address vs. double argu space? or change tmin and/or tmax will make later Hit() more efficient(which I realy dont think so)?
However, there is one significant conclusion based on the comparsion: uniform grids is more efficient(except the 10 sphers and 100 spheres), and most remarkably scales far better than BVH.
For the current uniform grids method, I do not cache the result of ray-object intersection. As one object may occupy simultaneously in more than one grids, caching will probably make it more efficient.