Nori
|
00001 /* 00002 This file is part of Nori, a simple educational ray tracer 00003 00004 Copyright (c) 2012 by Wenzel Jakob and Steve Marschner. 00005 00006 Nori is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License Version 3 00008 as published by the Free Software Foundation. 00009 00010 Nori is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 00019 #if !defined(__INTEGRATOR_H) 00020 #define __INTEGRATOR_H 00021 00022 #include <nori/object.h> 00023 #include <nori/dpdf.h> 00024 #include <nori/frame.h> 00025 00026 NORI_NAMESPACE_BEGIN 00027 00028 /** 00029 * \brief Abstract integrator (i.e. a rendering technique) 00030 * 00031 * In Nori, the different rendering techniques are collectively referred to as 00032 * integrators, since they perform integration over a high-dimensional 00033 * space. Each integrator represents a specific approach for solving 00034 * the light transport equation---usually favored in certain scenarios, but 00035 * at the same time affected by its own set of intrinsic limitations. 00036 */ 00037 class Integrator : public NoriObject { 00038 public: 00039 /// Release all memory 00040 virtual ~Integrator() { } 00041 00042 /** 00043 * \brief Sample the incident radiance along a ray 00044 * 00045 * \param scene 00046 * A pointer to the underlying scene 00047 * \param sampler 00048 * A pointer to a sample generator 00049 * \param ray 00050 * The ray in question 00051 * \return 00052 * A (usually) unbiased estimate of the radiance in this direction 00053 */ 00054 virtual Color3f Li(const Scene *scene, Sampler *sampler, const Ray3f &ray) const = 0; 00055 00056 /** 00057 * \brief Return the type of object (i.e. Mesh/BSDF/etc.) 00058 * provided by this instance 00059 * */ 00060 EClassType getClassType() const { return EIntegrator; } 00061 }; 00062 00063 NORI_NAMESPACE_END 00064 00065 #endif /* __INTEGRATOR_H */