Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Raytracer Class Reference

Base class for raytracers, containinng basic functionality needed by the sub classes. More...

#include <raytracer.h>

Inherited by PathTracer, and WhittedTracer.

Inheritance diagram for Raytracer:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Raytracer (Scene *scene, Image *img)
 Creates a raytracer.
virtual ~Raytracer ()
 Destroys the raytracer and all the objects it contains.
void computeImage ()
 Raytraces the scene by calling tracePixel for every pixel in the output image.

Protected Member Functions

virtual Color trace (int x, int y)
 Compute the color of the pixel at (x,y) by raytracing.
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

ScenemScene
 Ptr to the scene.
ImagemImage
 Ptr to the output image.
CameramCamera
 Ptr to the camera used for rendering.

Detailed Description

Base class for raytracers, containinng basic functionality needed by the sub classes.

When the function trace() is called, the image is raytraced by calling tracePixel for each pixel in the output image. tracePixel should be overridden in the sub-class to apply the desired raytracing algorithm (Whitted, pathtracing).


The documentation for this class was generated from the following files:
Generated on Tue Mar 14 09:46:42 2006 for ASR by  doxygen 1.4.4