The "dof" value specifies the size of the circle of confusion and "focaldist" is the distance from the camera to the focal point.
Source Code
The following source code files are provided to help you with this and upcoming projects. You are not required to use them, but it is highly recommened that you use some of them. Some of these files include additional code as compared to the same files in the previous project, so make sure to download them all again.
scene.h: Includes changes to the Camera class to keep the depth of field related parameters.
xmlload.cpp: Includes the LoadScene() function that parses a given scene XML file using the TinyXML library.
viewport.cpp: OpenGL based preview and user interface launched by calling the ShowViewport() function based on the GLUT library (the Windows version is here). This version supports depth of field preview.
Test Scenes
The following scene files are provided to help you test your implementation. You can also prepare other scenes to show your work.
Test scene: Reflective balls and a teapot, using some of the previous models and textures.
Optional Feature Suggestions
Implement motion-blur for camera motion.
Implement motion-blur for objects moving with a constant speed.
References
[Cook et al. 1984]
Robert L. Cook, Thomas Porter, and Loren Carpenter. 1984. Distributed ray tracing. In Proceedings of the 11th annual conference on Computer graphics and interactive techniques (SIGGRAPH '84), Hank Christiansen (Ed.). ACM, New York, NY, USA, 137-145.