NullSensor.cpp

Go to the documentation of this file.
00001 /**<!-------------------------------------------------------------------->
00002    @file   NullSensor.h
00003    @author Travis Fischer (fisch0920@gmail.com)
00004    @author Matthew Jacobs (jacobs.mh@gmail.com)
00005    @date   Fall 2008
00006    
00007    @brief
00008       Null sensor which doesn't emit any importance
00009    <!-------------------------------------------------------------------->**/
00010 
00011 #include "NullSensor.h"
00012 #include "Material.h"
00013 
00014 void NullSensor::init() {
00015    m_camera = NULL;
00016 }
00017 
00018 bool NullSensor::isSensor() {
00019    return false;
00020 }
00021 
00022 SpectralSampleSet NullSensor::getWe(const Vector3 &wo) {
00023    return SpectralSampleSet::black();
00024 }
00025 
00026 SpectralSampleSet NullSensor::getImportance() {
00027    return SpectralSampleSet::black();
00028 }
00029 
00030 // TODO: modify Camera interface / implementation to accomodate stochastic 
00031 // sampling w/ deterministic Pinhole camera as a special-case
00032 Event NullSensor::sample() {
00033    return Event(this);
00034 }
00035 
00036 real_t NullSensor::getPdf(const Event &event) {
00037    return 0;
00038 }
00039 
00040 SpectralSampleSet NullSensor::getBSDF(const Vector3 &/* wi unused */, 
00041                              const Vector3 &/* wo unused */)
00042 {
00043    return SpectralSampleSet::black();
00044 }
00045 

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6