#include <Ray.h>
Public Member Functions | |
Ray (const Point3D &o, const Vec3D &dir, int d=0, float weight=1.0f, bool cull=false) | |
virtual | ~Ray () |
const Point3D & | org () const |
const Vec3D & | dir () const |
const Vec3D & | invDir () const |
void | setMinDist (float minD) |
void | setMaxDist (float maxD) |
void | setCurrDist (float currD) |
void | setDepth (int d) |
float | minDist () const |
float | maxDist () const |
float | currDist () const |
int | getDepth () const |
const int * | dirSign () const |
Point3D | atDistance (float d) const |
const bool & | cull () const |
void | setLastIOR (const std::complex< float > ior) |
const std::complex < float > & | getLastIOR () const |
void | setLastObject (Object *obj) |
Object * | getLastObject () |
const float & | getWeight () const |
Public Attributes | |
int | tris |
int | bihnodes |
Private Attributes | |
Point3D | origin |
Vec3D | direction |
Vec3D | invdir |
int | dirsign [3] |
float | minDistance |
float | maxDistance |
float | currDistance |
int | depth |
bool | cullBackFaces |
std::complex< float > | lastIOR |
Object * | lastObject |
float | weight |
Definition at line 15 of file Ray.h.
rcrt::Ray::Ray | ( | const Point3D & | o, | |
const Vec3D & | dir, | |||
int | d = 0 , |
|||
float | weight = 1.0f , |
|||
bool | cull = false | |||
) |
Definition at line 10 of file Ray.cpp.
References direction, dirsign, tris, rcrt::Vec3D::x(), rcrt::Vec3D::y(), and rcrt::Vec3D::z().
const Point3D & rcrt::Ray::org | ( | ) | const |
Definition at line 31 of file Ray.cpp.
References origin.
Referenced by rcrt::DisplacedTriangle::baseIntersect(), rcrt::Triangle::intersect(), rcrt::Sphere::intersect(), rcrt::DisplacedTriangle::intersect(), rcrt::ConvexQuad::intersect(), rcrt::AABB::intersect(), rcrt::AffineObject::intersect(), rcrt::BIHNode< rcrt::Traceable >::intersect(), rcrt::SAHKDtree< rcrt::Triangle >::intersectNode(), and rcrt::operator<<().
const Vec3D & rcrt::Ray::dir | ( | ) | const |
Definition at line 37 of file Ray.cpp.
References direction.
Referenced by rcrt::DisplacedTriangle::baseIntersect(), rcrt::Triangle::intersect(), rcrt::Sphere::intersect(), rcrt::DisplacedTriangle::intersect(), rcrt::ConvexQuad::intersect(), rcrt::AffineObject::intersect(), rcrt::BIHNode< rcrt::Traceable >::intersect(), rcrt::SAHKDtree< rcrt::Triangle >::intersectNode(), rcrt::operator<<(), rcrt::SimpleTracer::trace(), rcrt::RayCaster::trace(), and rcrt::PhotonTracer::trace().
const Vec3D & rcrt::Ray::invDir | ( | ) | const |
Definition at line 42 of file Ray.cpp.
References invdir.
Referenced by rcrt::AABB::intersect(), and rcrt::BIHNode< rcrt::Traceable >::intersect().
void rcrt::Ray::setMinDist | ( | float | minD | ) |
Definition at line 52 of file Ray.cpp.
References minDistance.
Referenced by rcrt::AffineObject::intersect(), rcrt::SAHKDtree< rcrt::Triangle >::intersectNode(), and rcrt::BIHNode< rcrt::Traceable >::leafIntersect().
void rcrt::Ray::setMaxDist | ( | float | maxD | ) |
Definition at line 58 of file Ray.cpp.
References maxDistance.
Referenced by rcrt::BIHNode< rcrt::Traceable >::intersect(), rcrt::SAHKDtree< rcrt::Triangle >::intersectNode(), and rcrt::BIHNode< rcrt::Traceable >::leafIntersect().
void rcrt::Ray::setCurrDist | ( | float | currD | ) |
Definition at line 64 of file Ray.cpp.
References currDistance.
Referenced by rcrt::SimpleTracer::trace(), and rcrt::PhotonTracer::trace().
float rcrt::Ray::minDist | ( | ) | const |
Definition at line 75 of file Ray.cpp.
References minDistance.
Referenced by rcrt::BIH< rcrt::Traceable >::intersect(), rcrt::SAHKDtree< rcrt::Triangle >::intersectNode(), rcrt::BIHNode< rcrt::Traceable >::leafIntersect(), and rcrt::operator<<().
float rcrt::Ray::maxDist | ( | ) | const |
Definition at line 81 of file Ray.cpp.
References maxDistance.
Referenced by rcrt::DisplacedTriangle::baseIntersect(), rcrt::Triangle::intersect(), rcrt::BIHNode< rcrt::Traceable >::intersect(), rcrt::BIH< rcrt::Traceable >::intersect(), rcrt::SAHKDtree< rcrt::Triangle >::intersectNode(), rcrt::BIHNode< rcrt::Traceable >::leafIntersect(), and rcrt::operator<<().
float rcrt::Ray::currDist | ( | ) | const |
int rcrt::Ray::getDepth | ( | ) | const |
Definition at line 92 of file Ray.cpp.
References depth.
Referenced by rcrt::SimpleTracer::trace(), and rcrt::PhotonTracer::trace().
const int * rcrt::Ray::dirSign | ( | ) | const |
Definition at line 47 of file Ray.cpp.
References dirsign.
Referenced by rcrt::BIHNode< rcrt::Traceable >::intersect().
Point3D rcrt::Ray::atDistance | ( | float | d | ) | const |
Definition at line 97 of file Ray.cpp.
References direction, and origin.
Referenced by rcrt::DisplacedTriangle::baseIntersect(), rcrt::Triangle::intersect(), rcrt::Sphere::intersect(), rcrt::ConvexQuad::intersect(), rcrt::AABB::intersect(), and rcrt::AffineObject::intersect().
const bool & rcrt::Ray::cull | ( | ) | const |
void rcrt::Ray::setLastIOR | ( | const std::complex< float > | ior | ) |
Definition at line 107 of file Ray.cpp.
References lastIOR.
Referenced by rcrt::PhotonMap::generateJob().
const complex< float > & rcrt::Ray::getLastIOR | ( | ) | const |
Definition at line 112 of file Ray.cpp.
References lastIOR.
Referenced by rcrt::SimpleTracer::trace(), and rcrt::PhotonTracer::trace().
void rcrt::Ray::setLastObject | ( | Object * | obj | ) |
Object * rcrt::Ray::getLastObject | ( | ) |
const float & rcrt::Ray::getWeight | ( | ) | const |
Definition at line 127 of file Ray.cpp.
References weight.
Referenced by rcrt::SimpleTracer::trace(), and rcrt::PhotonTracer::trace().
Point3D rcrt::Ray::origin [private] |
Vec3D rcrt::Ray::direction [private] |
Vec3D rcrt::Ray::invdir [private] |
int rcrt::Ray::dirsign[3] [private] |
float rcrt::Ray::minDistance [private] |
float rcrt::Ray::maxDistance [private] |
float rcrt::Ray::currDistance [private] |
int rcrt::Ray::depth [private] |
bool rcrt::Ray::cullBackFaces [private] |
std::complex<float> rcrt::Ray::lastIOR [private] |
Object* rcrt::Ray::lastObject [private] |
float rcrt::Ray::weight [private] |
int rcrt::Ray::tris |
Definition at line 56 of file Ray.h.
Referenced by rcrt::DisplacedTriangle::baseIntersect(), rcrt::Triangle::intersect(), rcrt::AffineObject::intersect(), Ray(), rcrt::TracingStrategy::trace(), rcrt::SuperMetaTracer::trace(), rcrt::RayCaster::trace(), and rcrt::DebugTracer::trace().
Definition at line 57 of file Ray.h.
Referenced by rcrt::BIHNode< rcrt::Traceable >::intersect(), and rcrt::BIHTracer::trace().