rcrt::Ray Class Reference

#include <Ray.h>

Collaboration diagram for rcrt::Ray:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Ray (const Point3D &o, const Vec3D &dir, int d=0, float weight=1.0f, bool cull=false)
virtual ~Ray ()
const Point3Dorg () const
const Vec3Ddir () const
const Vec3DinvDir () 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)
ObjectgetLastObject ()
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
ObjectlastObject
float weight


Detailed Description

The ray class.

Definition at line 15 of file Ray.h.


Constructor & Destructor Documentation

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().

rcrt::Ray::~Ray (  )  [virtual]

Definition at line 26 of file Ray.cpp.


Member Function Documentation

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().

void rcrt::Ray::setDepth ( int  d  ) 

Definition at line 69 of file Ray.cpp.

References depth.

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

Definition at line 87 of file Ray.cpp.

References currDistance.

Referenced by rcrt::operator<<().

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

Definition at line 102 of file Ray.cpp.

References cullBackFaces.

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  ) 

Definition at line 117 of file Ray.cpp.

References lastObject.

Object * rcrt::Ray::getLastObject (  ) 

Definition at line 122 of file Ray.cpp.

References lastObject.

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().


Member Data Documentation

Point3D rcrt::Ray::origin [private]

Definition at line 18 of file Ray.h.

Referenced by atDistance(), and org().

Vec3D rcrt::Ray::direction [private]

Definition at line 19 of file Ray.h.

Referenced by atDistance(), dir(), and Ray().

Vec3D rcrt::Ray::invdir [private]

Definition at line 20 of file Ray.h.

Referenced by invDir().

int rcrt::Ray::dirsign[3] [private]

Definition at line 21 of file Ray.h.

Referenced by dirSign(), and Ray().

float rcrt::Ray::minDistance [private]

Definition at line 22 of file Ray.h.

Referenced by minDist(), and setMinDist().

float rcrt::Ray::maxDistance [private]

Definition at line 23 of file Ray.h.

Referenced by maxDist(), and setMaxDist().

float rcrt::Ray::currDistance [private]

Definition at line 24 of file Ray.h.

Referenced by currDist(), and setCurrDist().

int rcrt::Ray::depth [private]

Definition at line 25 of file Ray.h.

Referenced by getDepth(), and setDepth().

bool rcrt::Ray::cullBackFaces [private]

Definition at line 26 of file Ray.h.

Referenced by cull().

std::complex<float> rcrt::Ray::lastIOR [private]

Definition at line 27 of file Ray.h.

Referenced by getLastIOR(), and setLastIOR().

Object* rcrt::Ray::lastObject [private]

Definition at line 28 of file Ray.h.

Referenced by getLastObject(), and setLastObject().

float rcrt::Ray::weight [private]

Definition at line 29 of file Ray.h.

Referenced by getWeight().

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().

int rcrt::Ray::bihnodes

Definition at line 57 of file Ray.h.

Referenced by rcrt::BIHNode< rcrt::Traceable >::intersect(), and rcrt::BIHTracer::trace().


The documentation for this class was generated from the following files:
Generated on Thu Jan 31 19:33:14 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3