A Class Library for Global Illumination