Light Class Reference

#include <Light.h>

Inheritance diagram for Light:

PointLight QuadAreaLight

Detailed Description

The base class for all types of light.

Definition at line 20 of file Light.h.


Public Member Functions

 Light ()
 Initializes the light.
virtual ~Light ()
virtual bool Illuminate (Ray &ray, ColorRGBA &intensity, unsigned int index=0)=0
 Illuminate the light. The ray will be changed into a ray pointing to the light source, hence we call it shadow ray.
virtual unsigned int GetNumberOfRays () const

Protected Attributes

ScenemScene
 The scene the light belongs to.

Friends

class Scene

Constructor & Destructor Documentation

Light::Light (  )  [inline]

Initializes the light.

Definition at line 41 of file Light.h.

References mScene.

virtual Light::~Light (  )  [inline, virtual]

Definition at line 46 of file Light.h.


Member Function Documentation

bool Light::Illuminate ( Ray ray,
ColorRGBA intensity,
unsigned int  index = 0 
) [pure virtual]

Illuminate the light. The ray will be changed into a ray pointing to the light source, hence we call it shadow ray.

Parameters:
ray Here a new ray (shadow ray) will be stored
intensity The intensity of the ray (i.e. color) will be given back here
index Specify index value of the light ray. The value should be in the range [0; GetNumberOfRays).

Implemented in PointLight, and QuadAreaLight.

unsigned int Light::GetNumberOfRays (  )  const [inline, virtual]

Return number of rays required to accomplish the shading produced by this light. (i.e. Point light = 1 ray) area light = n rays)

Reimplemented in QuadAreaLight.

Definition at line 61 of file Light.h.


Friends And Related Function Documentation

friend class Scene [friend]

it is good to have friends ;-)

Definition at line 27 of file Light.h.


Field Documentation

Scene* Light::mScene [protected]

The scene the light belongs to.

Scene* mScene

Definition at line 33 of file Light.h.

Referenced by Scene::AddLight(), and Light().


The documentation for this class was generated from the following file:
Generated on Thu Jan 31 21:48:55 2008 for RayTracer by  doxygen 1.5.4