Implemented most of the IPR functionality using abstract raytracer interface.