OrientedEmitter.cpp
Go to the documentation of this file.00001 /**<!--------------------------------------------------------------------> 00002 @file OrientedEmitter.h 00003 @author Travis Fischer (fisch0920@gmail.com) 00004 @author Matthew Jacobs (jacobs.mh@gmail.com) 00005 @date Fall 2008 00006 00007 @brief 00008 Area emitter/light which emits light uniformly across a 2D domain, 00009 defined at a single point in 3-space, and restricted to the local positive 00010 hemisphere (oriented along hemisphere about local surface normal) 00011 <!-------------------------------------------------------------------->**/ 00012 00013 #include "OrientedEmitter.h" 00014 #include "Material.h" 00015 00016 SpectralSampleSet OrientedEmitter::getLe(const Vector3 &wo) { 00017 if (m_pt.normal.dot(wo) > 0) 00018 return m_radiantExitance / M_PI; 00019 00020 return SpectralSampleSet::black(); 00021 } 00022 00023 void OrientedEmitter::setWi(const Vector3 &wi) { 00024 //((BSDF *)m_sampler)->setWi(wi); 00025 ((BSDF *)m_sampler)->setWi(-((BSDF *)m_sampler)->getSurfacePoint().normalS); 00026 // TODO: ??? 00027 00028 Emitter::setWi(wi); 00029 } 00030
Generated on 28 Feb 2009 for Milton by
1.5.6