#include <Intersection.h>

Public Member Functions | |
| Intersection () | |
| Intersection (const float dist, const Primitive *p, const Point3D &pos, const float param1, const float param2, bool bs=false) | |
| virtual | ~Intersection () |
| void | setUV (const Point2D &uv) |
| bool | isValid () const |
| float | getDistance () const |
| const Primitive *const | getPrimitive () const |
| const Point3D & | getPosition () const |
| const Vec3D & | getSNormalW () |
| const Vec3D & | getGNormalW () |
| const Vec3D & | getSNormalL () |
| const Vec3D & | getGNormalL () |
| void | setSNormalW (const Vec3D &no) |
| void | setGNormalW (const Vec3D &no) |
| void | setSNormalL (const Vec3D &no) |
| void | setGNormalL (const Vec3D &no) |
| void | setPrimitive (const Primitive *p) |
| void | setLastIOR (const std::complex< float > &ior) |
| void | setLastIOR (const float &real, const float &imag=0) |
| const std::complex < float > & | getLastIOR () const |
| const Point2D & | getUV () |
| const Point2D & | getParams () const |
| const bool & | backSide () const |
Private Attributes | |
| float | distance |
| const Primitive * | prim |
| Point3D | position |
| Point2D | parameters |
| Vec3D | shadingNormal |
| Vec3D | geomNormal |
| Vec3D | shadingNormalLocal |
| Vec3D | geomNormalLocal |
| Point2D | uv |
| bool | initSNo |
| bool | initGNo |
| bool | initSNoL |
| bool | initGNoL |
| bool | initUV |
| bool | backside |
| std::complex< float > | lastIOR |
Definition at line 17 of file Intersection.h.
| rcrt::Intersection::Intersection | ( | ) |
Definition at line 12 of file Intersection.cpp.
| rcrt::Intersection::Intersection | ( | const float | dist, | |
| const Primitive * | p, | |||
| const Point3D & | pos, | |||
| const float | param1, | |||
| const float | param2, | |||
| bool | bs = false | |||
| ) |
Constructs an Intersection.
| dist | The distance to the point of intersection. | |
| p | The primitive that was hit. | |
| pos | The point of intersection. | |
| param1 | 2D Parameterization of the surface. E.g. barycentric coordinates for triangles. | |
| param2 | see param1 | |
| bs | Whether this point was hit from the backside. |
Definition at line 16 of file Intersection.cpp.
| rcrt::Intersection::~Intersection | ( | ) | [virtual] |
Definition at line 28 of file Intersection.cpp.
| void rcrt::Intersection::setUV | ( | const Point2D & | uv | ) |
| uv | The texture uv coordinates of this intersection point. |
Definition at line 32 of file Intersection.cpp.
References uv.
Referenced by rcrt::Triangle::intersect(), and rcrt::ConvexQuad::isInside().
| bool rcrt::Intersection::isValid | ( | ) | const |
Definition at line 37 of file Intersection.cpp.
References prim.
Referenced by rcrt::SAHKDtree< rcrt::Triangle >::intersect(), rcrt::DisplacedTriangle::intersect(), rcrt::DynamicObject::intersect(), rcrt::AffineObject::intersect(), rcrt::BIHNode< rcrt::Traceable >::intersect(), rcrt::SAHKDtree< rcrt::Triangle >::intersectNode(), rcrt::Scene::isOccluded(), rcrt::BIHNode< rcrt::Traceable >::leafIntersect(), rcrt::SimpleTracer::trace(), rcrt::RayCaster::trace(), rcrt::PhotonTracer::trace(), rcrt::DebugTracer::trace(), and rcrt::BIHTracer::trace().
| float rcrt::Intersection::getDistance | ( | ) | const |
Definition at line 42 of file Intersection.cpp.
References distance.
Referenced by rcrt::DisplacedTriangle::intersect(), rcrt::BIHNode< rcrt::Traceable >::intersect(), rcrt::SAHKDtree< rcrt::Triangle >::intersectNode(), rcrt::Scene::isOccluded(), rcrt::BIHNode< rcrt::Traceable >::leafIntersect(), rcrt::DielectricMaterial::scatterPhoton(), rcrt::SimpleTracer::trace(), rcrt::RayCaster::trace(), rcrt::PhotonTracer::trace(), and rcrt::DebugTracer::trace().
| const Primitive *const rcrt::Intersection::getPrimitive | ( | ) | const |
Definition at line 46 of file Intersection.cpp.
References prim.
Referenced by rcrt::SimpleTracer::directLight(), rcrt::PhotonTracer::directLight(), rcrt::PhotonMap::getRadiance(), rcrt::Material::getShadingNormal(), rcrt::DisplacedTriangle::intersect(), rcrt::AffineObject::intersect(), rcrt::Scene::isOccluded(), rcrt::SimpleTracer::trace(), rcrt::RayCaster::trace(), and rcrt::PhotonTracer::trace().
| const Point3D & rcrt::Intersection::getPosition | ( | ) | const |
Definition at line 51 of file Intersection.cpp.
References position.
Referenced by rcrt::WallMaterial::calcDistNormal(), rcrt::SimpleTracer::directLight(), rcrt::PhotonTracer::directLight(), rcrt::LightMaterial::getEmitted(), rcrt::PhotonMap::getRadiance(), rcrt::WoodMaterial::getShadingNormal(), rcrt::DisplacedTriangle::intersect(), rcrt::AffineObject::intersect(), rcrt::ConvexQuad::isInside(), rcrt::WoodMaterial::sample(), rcrt::WallMaterial::sample(), rcrt::WoodMaterial::scatterPhoton(), rcrt::MirrorMaterial::scatterPhoton(), rcrt::ImageMaterial::scatterPhoton(), rcrt::DielectricMaterial::scatterPhoton(), rcrt::BSDFMaterial::scatterPhoton(), rcrt::SimpleTracer::trace(), rcrt::RayCaster::trace(), and rcrt::PhotonTracer::trace().
| const Vec3D & rcrt::Intersection::getSNormalW | ( | ) |
Definition at line 56 of file Intersection.cpp.
References rcrt::Primitive::getSNormalWorld(), initSNo, initSNoL, rcrt::Primitive::normalToWorld(), parameters, prim, shadingNormal, shadingNormalLocal, rcrt::Point2D::x(), and rcrt::Point2D::y().
Referenced by rcrt::WallMaterial::calcDistNormal(), rcrt::PhotonTracer::directLight(), rcrt::WoodMaterial::getShadingNormal(), rcrt::WallMaterial::getShadingNormal(), rcrt::Material::getShadingNormal(), rcrt::MirrorMaterial::scatterPhoton(), rcrt::DebugMaterial::scatterPhoton(), rcrt::RayCaster::trace(), and rcrt::DebugTracer::trace().
| const Vec3D & rcrt::Intersection::getGNormalW | ( | ) |
Definition at line 70 of file Intersection.cpp.
References geomNormal, geomNormalLocal, rcrt::Primitive::getGNormalWorld(), initGNo, initGNoL, rcrt::Primitive::normalToWorld(), parameters, prim, rcrt::Point2D::x(), and rcrt::Point2D::y().
Referenced by rcrt::BSDFMaterial::sample(), rcrt::BSDFMaterial::sampleDiffuse(), and rcrt::BSDFMaterial::sampleSpecular().
| const Vec3D & rcrt::Intersection::getSNormalL | ( | ) |
Definition at line 84 of file Intersection.cpp.
References rcrt::Primitive::getSNormal(), initSNoL, parameters, prim, shadingNormalLocal, rcrt::Point2D::x(), and rcrt::Point2D::y().
Referenced by rcrt::AffineObject::intersect().
| const Vec3D & rcrt::Intersection::getGNormalL | ( | ) |
Definition at line 93 of file Intersection.cpp.
References geomNormalLocal, rcrt::Primitive::getGNormal(), initGNoL, parameters, prim, rcrt::Point2D::x(), and rcrt::Point2D::y().
Referenced by rcrt::AffineObject::intersect().
| void rcrt::Intersection::setSNormalW | ( | const Vec3D & | no | ) |
Definition at line 102 of file Intersection.cpp.
References initSNo, and shadingNormal.
Referenced by rcrt::WallMaterial::distortNormal().
| void rcrt::Intersection::setGNormalW | ( | const Vec3D & | no | ) |
| void rcrt::Intersection::setSNormalL | ( | const Vec3D & | no | ) |
Definition at line 114 of file Intersection.cpp.
References initSNoL, and shadingNormalLocal.
Referenced by rcrt::Sphere::intersect(), and rcrt::DisplacedTriangle::intersect().
| void rcrt::Intersection::setGNormalL | ( | const Vec3D & | no | ) |
Definition at line 120 of file Intersection.cpp.
References geomNormalLocal, and initGNoL.
Referenced by rcrt::Sphere::intersect(), and rcrt::DisplacedTriangle::intersect().
| void rcrt::Intersection::setPrimitive | ( | const Primitive * | p | ) |
Definition at line 126 of file Intersection.cpp.
References prim.
Referenced by rcrt::DisplacedTriangle::intersect().
| void rcrt::Intersection::setLastIOR | ( | const std::complex< float > & | ior | ) |
TODO needs refactoring, should not be inside the Intersection
| The | ior of a previous intersection. |
Definition at line 150 of file Intersection.cpp.
References lastIOR.
| void rcrt::Intersection::setLastIOR | ( | const float & | real, | |
| const float & | imag = 0 | |||
| ) |
| const complex< float > & rcrt::Intersection::getLastIOR | ( | ) | const |
Definition at line 161 of file Intersection.cpp.
References lastIOR.
Referenced by rcrt::DielectricMaterial::scatterPhoton(), and rcrt::BSDFMaterial::scatterPhoton().
| const Point2D & rcrt::Intersection::getUV | ( | ) |
Definition at line 131 of file Intersection.cpp.
References rcrt::Primitive::getUV(), initUV, parameters, prim, uv, rcrt::Point2D::x(), and rcrt::Point2D::y().
Referenced by rcrt::Material::getShadingNormal(), rcrt::ImageMaterial::sample(), rcrt::ImageMaterial::sampleDiffuse(), rcrt::ImageMaterial::sampleSpecular(), and rcrt::ImageMaterial::scatterPhoton().
| const Point2D & rcrt::Intersection::getParams | ( | ) | const |
Definition at line 140 of file Intersection.cpp.
References parameters.
Referenced by rcrt::DisplacedTriangle::intersect(), and rcrt::AffineObject::intersect().
| const bool & rcrt::Intersection::backSide | ( | ) | const |
Definition at line 145 of file Intersection.cpp.
References backside.
Referenced by rcrt::WoodMaterial::getShadingNormal(), rcrt::Material::getShadingNormal(), rcrt::AffineObject::intersect(), rcrt::DebugMaterial::sample(), rcrt::DielectricMaterial::scatterPhoton(), rcrt::BSDFMaterial::scatterPhoton(), rcrt::SimpleTracer::trace(), rcrt::PhotonTracer::trace(), and rcrt::DebugTracer::trace().
float rcrt::Intersection::distance [private] |
const Primitive* rcrt::Intersection::prim [private] |
Definition at line 21 of file Intersection.h.
Referenced by getGNormalL(), getGNormalW(), getPrimitive(), getSNormalL(), getSNormalW(), getUV(), isValid(), and setPrimitive().
Point3D rcrt::Intersection::position [private] |
Point2D rcrt::Intersection::parameters [private] |
Definition at line 23 of file Intersection.h.
Referenced by getGNormalL(), getGNormalW(), getParams(), getSNormalL(), getSNormalW(), and getUV().
Vec3D rcrt::Intersection::shadingNormal [private] |
Vec3D rcrt::Intersection::geomNormal [private] |
Vec3D rcrt::Intersection::shadingNormalLocal [private] |
Definition at line 26 of file Intersection.h.
Referenced by getSNormalL(), getSNormalW(), and setSNormalL().
Vec3D rcrt::Intersection::geomNormalLocal [private] |
Definition at line 27 of file Intersection.h.
Referenced by getGNormalL(), getGNormalW(), and setGNormalL().
Point2D rcrt::Intersection::uv [private] |
bool rcrt::Intersection::initSNo [private] |
bool rcrt::Intersection::initGNo [private] |
bool rcrt::Intersection::initSNoL [private] |
Definition at line 29 of file Intersection.h.
Referenced by getSNormalL(), getSNormalW(), and setSNormalL().
bool rcrt::Intersection::initGNoL [private] |
Definition at line 29 of file Intersection.h.
Referenced by getGNormalL(), getGNormalW(), and setGNormalL().
bool rcrt::Intersection::initUV [private] |
bool rcrt::Intersection::backside [private] |
std::complex<float> rcrt::Intersection::lastIOR [private] |
1.5.3