00001 /*************************************************************************** 00002 * Copyright (C) 1998-2007 by authors (see AUTHORS.txt ) * 00003 * * 00004 * This file is part of Lux Renderer. * 00005 * * 00006 * Lux Renderer is free software; you can redistribute it and/or modify * 00007 * it under the terms of the GNU General Public License as published by * 00008 * the Free Software Foundation; either version 3 of the License, or * 00009 * (at your option) any later version. * 00010 * * 00011 * Lux Renderer is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU General Public License * 00017 * along with this program. If not, see <http://www.gnu.org/licenses/>. * 00018 * * 00019 * This project is based on PBRT ; see http://www.pbrt.org * 00020 * Lux Renderer website : http://www.luxrender.org * 00021 ***************************************************************************/ 00022 00023 // debug.cpp* 00024 // Debug integrator by Greg Humphreys 00025 00026 // debug.cpp* 00027 00028 #include "lux.h" 00029 #include "transport.h" 00030 #include "scene.h" 00031 00032 namespace lux 00033 { 00034 00035 typedef enum { 00036 DEBUG_U, DEBUG_V, 00037 DEBUG_GEOM_NORMAL_X, 00038 DEBUG_GEOM_NORMAL_Y, 00039 DEBUG_GEOM_NORMAL_Z, 00040 DEBUG_SHAD_NORMAL_X, 00041 DEBUG_SHAD_NORMAL_Y, 00042 DEBUG_SHAD_NORMAL_Z, 00043 DEBUG_ONE, 00044 DEBUG_ZERO, 00045 DEBUG_HIT_SOMETHING 00046 } DebugVariable; 00047 00048 class DebugIntegrator : public SurfaceIntegrator { 00049 public: 00050 // DebugIntegrator Public Methods 00051 Spectrum Li(const Scene *scene, const RayDifferential &ray, 00052 const Sample *sample, float *alpha) const; 00053 DebugIntegrator( DebugVariable v[3] ) 00054 { 00055 debug_variable[0] = v[0]; 00056 debug_variable[1] = v[1]; 00057 debug_variable[2] = v[2]; 00058 } 00059 virtual DebugIntegrator* clone() const; // Lux (copy) constructor for multithreading 00060 IntegrationSampler* HasIntegrationSampler(IntegrationSampler *is) { return NULL; }; // Not implemented 00061 static SurfaceIntegrator *CreateSurfaceIntegrator(const ParamSet ¶ms); 00062 private: 00063 DebugVariable debug_variable[3]; 00064 }; 00065 00066 }//namespace lux 00067
1.6.2-20100208