Intersectable.cpp
Go to the documentation of this file.00001 /**<!--------------------------------------------------------------------> 00002 @file Intersectable.cpp 00003 @author Travis Fischer (fisch0920@gmail.com) 00004 @author Matthew Jacobs (jacobs.mh@gmail.com) 00005 @date Fall 2008 00006 00007 @brief 00008 Interface for an intersectable object in 3-space, with some extra 00009 functionality specific to accelerating spatial intersection queries 00010 <!-------------------------------------------------------------------->**/ 00011 00012 #include "Intersectable.h" 00013 #include <SurfacePoint.h> 00014 00015 void Intersectable::init() { 00016 // intentionally empty 00017 } 00018 00019 bool Intersectable::intersects(const Ray &ray, real_t tMax) { 00020 SurfacePoint pt; 00021 const real_t t = getIntersection(ray, pt); 00022 00023 return (t < tMax - EPSILON && t > EPSILON); 00024 } 00025
Generated on 28 Feb 2009 for Milton by
1.5.6