#include <whittedtracer.h>
Inherits Raytracer.
Inheritance diagram for WhittedTracer:

Public Member Functions | |
| WhittedTracer (Scene *scene, Image *img) | |
| Creates a Whitted raytracer. | |
| virtual | ~WhittedTracer () |
| Destructor. | |
| void | computeImage () |
| Raytraces the scene by calling tracePixel for every pixel in the output image. | |
Protected Member Functions | |
| Color | trace (int x, int y) |
| Computes the color of the pixel at (x,y). | |
| Color | trace (const Ray &ray, int depth) |
| Computes the radiance returned by tracing the ray r. | |
| Color | directIllumination (const Intersection &is) |
| Computes the shading at an intersection point by adding the light from each light source. | |
| Ray | getShadowRay (const Intersection &is, PointLight *light) const |
| Sets up a shadow ray from an intersection point to a point light source. | |
| Ray | getReflectedRay (const Intersection &is) const |
| Helper function that computes the reflected view direction and sets up a ray with the correct parameters. | |
| Ray | getTransmittedRay (const Intersection &is) const |
| Helper function that computes the transmission direction and sets up a ray with the correct parameters. | |
Protected Attributes | |
| Scene * | mScene |
| Ptr to the scene. | |
| Image * | mImage |
| Ptr to the output image. | |
| Camera * | mCamera |
| Ptr to the camera used for rendering. | |
1.4.4