src/rcrt/tracing/BIHTracer.cpp

Go to the documentation of this file.
00001 #include "BIHTracer.h"
00002 #include "../Intersection.h"
00003 
00004 namespace rcrt
00005 {
00006 
00007 BIHTracer::BIHTracer(Scene* s):TracingStrategy(s)
00008 {
00009 }
00010 
00011 BIHTracer::~BIHTracer()
00012 {
00013 }
00014 
00015 RGBColor BIHTracer::trace(Ray& r) const
00016 {
00017         Intersection is = scene->intersect(r);
00018 //      if(is.isValid())
00019 //              std::cout << "shading Normal in IS: " << is.getSNormal() << std::endl;
00020         if(is.isValid()){
00021                 //std::cout << "[T]: Intersection at d=" << is.getDistance() << " pos="<<is.getPosition() << "tris=" <<r.tris << std::endl;
00022                 float lg = float(r.bihnodes)/200.0f;
00023                 //std::cout << "nodes=" << lg << std::endl;;
00024                 return RGBColor(lg,lg,lg);
00025         }
00026         //std::cout << "[T]: no intersection" << std::endl;
00027         return RGBColor::BLACK;
00028 }
00029 
00030 }

Generated on Thu Jan 31 19:26:20 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3