#include <DielectricMaterial.h>
Public Member Functions | |
DielectricMaterial (const float &realIOR=1, const RGBColor &absorb=RGBColor::BLACK) | |
virtual | ~DielectricMaterial () |
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 RGBColor | getEmitted (const Vec3D &wOut, Intersection &is) |
virtual ScatterEvent | scatterPhoton (Intersection &is, Photon *photon) |
virtual bool | hasDiffuse () const |
virtual bool | hasSpecular () const |
virtual bool | hasTransmissive () const |
virtual bool | refracts () const |
Definition at line 9 of file DielectricMaterial.h.
rcrt::DielectricMaterial::DielectricMaterial | ( | const float & | realIOR = 1 , |
|
const RGBColor & | absorb = RGBColor::BLACK | |||
) |
Definition at line 7 of file DielectricMaterial.cpp.
rcrt::DielectricMaterial::~DielectricMaterial | ( | ) | [virtual] |
Definition at line 11 of file DielectricMaterial.cpp.
RGBColor rcrt::DielectricMaterial::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 15 of file DielectricMaterial.cpp.
RGBColor rcrt::DielectricMaterial::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 DielectricMaterial.cpp.
RGBColor rcrt::DielectricMaterial::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 53 of file DielectricMaterial.cpp.
RGBColor rcrt::DielectricMaterial::getEmitted | ( | const Vec3D & | wOut, | |
Intersection & | is | |||
) | [virtual] |
wOut | the outgoing direction. | |
is | The Intersection data. |
Implements rcrt::Material.
Definition at line 41 of file DielectricMaterial.cpp.
ScatterEvent rcrt::DielectricMaterial::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 60 of file DielectricMaterial.cpp.
References rcrt::Intersection::backSide(), rcrt::frTDielectric(), rcrt::Photon::getDir(), rcrt::Intersection::getDistance(), rcrt::Intersection::getLastIOR(), rcrt::Intersection::getPosition(), rcrt::Material::getShadingNormal(), rcrt::INVALID, rcrt::Material::ior, rcrt::REFRACTED, rcrt::Photon::scalePower(), rcrt::Photon::setDir(), rcrt::Photon::setPos(), rcrt::snell(), and rcrt::RGBColor::WHITE.
bool rcrt::DielectricMaterial::hasDiffuse | ( | ) | const [virtual] |
bool rcrt::DielectricMaterial::hasSpecular | ( | ) | const [virtual] |
bool rcrt::DielectricMaterial::hasTransmissive | ( | ) | const [virtual] |
bool rcrt::DielectricMaterial::refracts | ( | ) | const [virtual] |