rcrt::DirLight Class Reference

#include <DirLight.h>

Inheritance diagram for rcrt::DirLight:

Inheritance graph
[legend]
Collaboration diagram for rcrt::DirLight:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DirLight (const RGBColor &p, const Vec3D &dir)
virtual ~DirLight ()
const Vec3DgetDirection () const
virtual LightSample illuminate (const Point3D &p, const Vec3D &no) const
virtual void illuminate (const Point3D &p, const Vec3D &no, std::vector< LightSample > &samples, const int &noSamples, Scene *s) const
virtual RGBColor getEmitted (const Vec3D &dir, const Point3D &pos) const
virtual void emitPhoton (Photon *photon) const

Private Attributes

Vec3D direction


Detailed Description

Definition at line 10 of file DirLight.h.


Constructor & Destructor Documentation

rcrt::DirLight::DirLight ( const RGBColor p,
const Vec3D dir 
)

Definition at line 6 of file DirLight.cpp.

rcrt::DirLight::~DirLight (  )  [virtual]

Definition at line 10 of file DirLight.cpp.


Member Function Documentation

const Vec3D & rcrt::DirLight::getDirection (  )  const

Definition at line 14 of file DirLight.cpp.

References direction.

LightSample rcrt::DirLight::illuminate ( const Point3D p,
const Vec3D no 
) const [virtual]

Parameters:
p the point to illuminate
no the normal at the point
Returns:
A single sample of the light source.

Implements rcrt::Light.

Definition at line 19 of file DirLight.cpp.

References direction, and rcrt::Light::power.

Referenced by illuminate().

void rcrt::DirLight::illuminate ( const Point3D p,
const Vec3D no,
std::vector< LightSample > &  samples,
const int &  noSamples,
Scene s 
) const [virtual]

Parameters:
p the point to illuminate
no the normal at the given point
samples the vector to be filled with samples
noSamples the number of samples to generate
s (Optional) if used, it is up to the light to decide whether to cast shadow rays and what to use to test for occlusion.

Implements rcrt::Light.

Definition at line 30 of file DirLight.cpp.

References illuminate().

RGBColor rcrt::DirLight::getEmitted ( const Vec3D dir,
const Point3D pos 
) const [virtual]

Parameters:
pos the position on the light
dir the direction in which to emit
Returns:
the emitted light on the given point in the given direction

Implements rcrt::Light.

Definition at line 36 of file DirLight.cpp.

References rcrt::Light::power.

void rcrt::DirLight::emitPhoton ( Photon photon  )  const [virtual]

Emits a (random) photon.

Parameters:
photon the photon in which to store initial position, direction and power

Implements rcrt::Light.

Definition at line 41 of file DirLight.cpp.


Member Data Documentation

Vec3D rcrt::DirLight::direction [private]

Definition at line 13 of file DirLight.h.

Referenced by getDirection(), and illuminate().


The documentation for this class was generated from the following files:
Generated on Thu Jan 31 19:32:31 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3