Building a BVH and using it for rendering a image