Adding intersection test for spheres and rays