00001 #include "Raycast.h" 00002 #include "DatPnt.h" 00003 00004 DatPnt::DatPnt() 00005 { 00006 reset(); 00007 } 00008 00009 DatPnt::~DatPnt() 00010 { 00011 } 00012 00013 void DatPnt::reset() 00014 { 00015 illum=0; 00016 len=0; 00017 } 00018 00019 void DatPnt::shade(vu1112113 &r) 00020 { 00021 float ndotl = normalVec().dot(r.lightdir); 00022 if(ndotl<0) ndotl=0; 00023 illum = ndotl*r.diffuse+r.brightness; 00024 }