rcrt::LightMaterial Class Reference

#include <LightMaterial.h>

Inheritance diagram for rcrt::LightMaterial:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LightMaterial (Light *l)
virtual ~LightMaterial ()
virtual bool hasDiffuse () const
virtual bool hasSpecular () const
virtual bool hasTransmissive () const
virtual RGBColor getEmitted (const Vec3D &wOut, Intersection &is)
virtual RGBColor sample (const Vec3D &wOut, const Vec3D &wInc, Intersection &is)
virtual RGBColor sampleDiffuse (const Vec3D &wOut, const Vec3D &wInc, Intersection &is)
virtual RGBColor sampleSpecular (const Vec3D &wOut, const Vec3D &wInc, Intersection &is)
virtual ScatterEvent scatterPhoton (Intersection &is, Photon *photon)
virtual bool refracts () const

Private Attributes

Lightlight


Detailed Description

Definition at line 10 of file LightMaterial.h.


Constructor & Destructor Documentation

rcrt::LightMaterial::LightMaterial ( Light l  ) 

Definition at line 6 of file LightMaterial.cpp.

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

Definition at line 10 of file LightMaterial.cpp.


Member Function Documentation

bool rcrt::LightMaterial::hasDiffuse (  )  const [virtual]

Implements rcrt::Material.

Definition at line 20 of file LightMaterial.cpp.

bool rcrt::LightMaterial::hasSpecular (  )  const [virtual]

Implements rcrt::Material.

Definition at line 25 of file LightMaterial.cpp.

bool rcrt::LightMaterial::hasTransmissive (  )  const [virtual]

Implements rcrt::Material.

Definition at line 30 of file LightMaterial.cpp.

RGBColor rcrt::LightMaterial::getEmitted ( const Vec3D wOut,
Intersection is 
) [virtual]

Parameters:
wOut the outgoing direction.
is The Intersection data.
Returns:
The amount of emitted light.

Implements rcrt::Material.

Definition at line 35 of file LightMaterial.cpp.

References rcrt::Light::getEmitted(), rcrt::Intersection::getPosition(), and light.

RGBColor rcrt::LightMaterial::sample ( const Vec3D wOut,
const Vec3D wInc,
Intersection is 
) [virtual]

Parameters:
wOut The outgoing direction.
wInc The incoming direction.
is The Intersection data.
Returns:
The percentage of each colorband reflected/transmitted along this direction.

Implements rcrt::Material.

Definition at line 14 of file LightMaterial.cpp.

RGBColor rcrt::LightMaterial::sampleDiffuse ( const Vec3D wOut,
const Vec3D wInc,
Intersection is 
) [virtual]

Parameters:
wOut The outgoing direction.
wInc The incoming direction.
is The Intersection data.
Returns:
The percentage of each colorband diffusely reflected/transmitted along this direction.

Implements rcrt::Material.

Definition at line 40 of file LightMaterial.cpp.

RGBColor rcrt::LightMaterial::sampleSpecular ( const Vec3D wOut,
const Vec3D wInc,
Intersection is 
) [virtual]

Parameters:
wOut The outgoing direction. Should be the reflected direction of wInc (and vice versa)
wInc The incoming direction.
is The Intersection data.
Returns:
The percentage of each colorband specularily reflected/transmitted along this direction.

Implements rcrt::Material.

Definition at line 45 of file LightMaterial.cpp.

ScatterEvent rcrt::LightMaterial::scatterPhoton ( Intersection is,
Photon photon 
) [virtual]

Scatters a Photon.

Parameters:
is The Intersection data. Currently this also includes a previous IOR. //TODO refactor the ior stuff
photon A photon, this should be set to the intersection point, a new outgoing direction and should be scaled in power according to the sampling process.

Implements rcrt::Material.

Definition at line 55 of file LightMaterial.cpp.

References rcrt::INVALID.

bool rcrt::LightMaterial::refracts (  )  const [virtual]

Reimplemented from rcrt::Material.

Definition at line 50 of file LightMaterial.cpp.


Member Data Documentation

Light* rcrt::LightMaterial::light [private]

Definition at line 13 of file LightMaterial.h.

Referenced by getEmitted().


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