#include <DebugMaterial.h>
Public Member Functions | |
DebugMaterial () | |
virtual | ~DebugMaterial () |
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 |
Definition at line 9 of file DebugMaterial.h.
rcrt::DebugMaterial::DebugMaterial | ( | ) |
Definition at line 6 of file DebugMaterial.cpp.
rcrt::DebugMaterial::~DebugMaterial | ( | ) | [virtual] |
Definition at line 10 of file DebugMaterial.cpp.
bool rcrt::DebugMaterial::hasDiffuse | ( | ) | const [virtual] |
bool rcrt::DebugMaterial::hasSpecular | ( | ) | const [virtual] |
bool rcrt::DebugMaterial::hasTransmissive | ( | ) | const [virtual] |
RGBColor rcrt::DebugMaterial::getEmitted | ( | const Vec3D & | wOut, | |
Intersection & | is | |||
) | [virtual] |
wOut | the outgoing direction. | |
is | The Intersection data. |
Implements rcrt::Material.
Definition at line 41 of file DebugMaterial.cpp.
RGBColor rcrt::DebugMaterial::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 DebugMaterial.cpp.
References rcrt::Vec3D::abs(), rcrt::Intersection::backSide(), rcrt::Material::getShadingNormal(), rcrt::Vec3D::x(), rcrt::Vec3D::y(), and rcrt::Vec3D::z().
Referenced by sampleDiffuse().
RGBColor rcrt::DebugMaterial::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 46 of file DebugMaterial.cpp.
References sample().
RGBColor rcrt::DebugMaterial::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 51 of file DebugMaterial.cpp.
ScatterEvent rcrt::DebugMaterial::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 61 of file DebugMaterial.cpp.
References rcrt::Vec3D::abs(), rcrt::Intersection::getSNormalW(), rcrt::Photon::setPower(), rcrt::STORE, rcrt::Vec3D::x(), rcrt::Vec3D::y(), and rcrt::Vec3D::z().
bool rcrt::DebugMaterial::refracts | ( | ) | const [virtual] |