#include <MirrorMaterial.h>
Public Member Functions | |
MirrorMaterial (const RGBColor &refl) | |
virtual | ~MirrorMaterial () |
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 &) |
virtual ScatterEvent | scatterPhoton (Intersection &is, Photon *photon) |
virtual bool | refracts () const |
Private Attributes | |
RGBColor | reflectivity |
Definition at line 9 of file MirrorMaterial.h.
rcrt::MirrorMaterial::MirrorMaterial | ( | const RGBColor & | refl | ) |
Definition at line 6 of file MirrorMaterial.cpp.
rcrt::MirrorMaterial::~MirrorMaterial | ( | ) | [virtual] |
Definition at line 10 of file MirrorMaterial.cpp.
bool rcrt::MirrorMaterial::hasDiffuse | ( | ) | const [virtual] |
bool rcrt::MirrorMaterial::hasSpecular | ( | ) | const [virtual] |
bool rcrt::MirrorMaterial::hasTransmissive | ( | ) | const [virtual] |
RGBColor rcrt::MirrorMaterial::getEmitted | ( | const Vec3D & | wOut, | |
Intersection & | is | |||
) | [virtual] |
wOut | the outgoing direction. | |
is | The Intersection data. |
Implements rcrt::Material.
Definition at line 35 of file MirrorMaterial.cpp.
RGBColor rcrt::MirrorMaterial::sample | ( | const Vec3D & | wOut, | |
const Vec3D & | wInc, | |||
Intersection & | is | |||
) | [virtual] |
wOut | The outgoing direction. | |
wInc | The incoming direction. | |
is | The Intersection data. |
Implements rcrt::Material.
Definition at line 14 of file MirrorMaterial.cpp.
RGBColor rcrt::MirrorMaterial::sampleDiffuse | ( | const Vec3D & | wOut, | |
const Vec3D & | wInc, | |||
Intersection & | is | |||
) | [virtual] |
wOut | The outgoing direction. | |
wInc | The incoming direction. | |
is | The Intersection data. |
Implements rcrt::Material.
Definition at line 40 of file MirrorMaterial.cpp.
RGBColor rcrt::MirrorMaterial::sampleSpecular | ( | const Vec3D & | wOut, | |
const Vec3D & | wInc, | |||
Intersection & | is | |||
) | [virtual] |
wOut | The outgoing direction. Should be the reflected direction of wInc (and vice versa) | |
wInc | The incoming direction. | |
is | The Intersection data. |
Implements rcrt::Material.
Definition at line 45 of file MirrorMaterial.cpp.
References reflectivity.
ScatterEvent rcrt::MirrorMaterial::scatterPhoton | ( | Intersection & | is, | |
Photon * | photon | |||
) | [virtual] |
Scatters a Photon.
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 MirrorMaterial.cpp.
References rcrt::Photon::getDir(), rcrt::Intersection::getPosition(), rcrt::Intersection::getSNormalW(), rcrt::Vec3D::reflect(), reflectivity, rcrt::Photon::scalePower(), rcrt::Photon::setDir(), rcrt::Photon::setPos(), and rcrt::SPECULAR.
bool rcrt::MirrorMaterial::refracts | ( | ) | const [virtual] |
RGBColor rcrt::MirrorMaterial::reflectivity [private] |
Definition at line 12 of file MirrorMaterial.h.
Referenced by sampleSpecular(), and scatterPhoton().