Nori  24
integrator.h
1 /*
2  This file is part of Nori, a simple educational ray tracer
3 
4  Copyright (c) 2015 by Wenzel Jakob
5 
6  Nori is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License Version 3
8  as published by the Free Software Foundation.
9 
10  Nori is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #if !defined(__NORI_INTEGRATOR_H)
20 #define __NORI_INTEGRATOR_H
21 
22 #include <nori/object.h>
23 
24 NORI_NAMESPACE_BEGIN
25 
35 class Integrator : public NoriObject {
36 public:
38  virtual ~Integrator() { }
39 
41  virtual void preprocess(const Scene *scene) { }
42 
55  virtual Color3f Li(const Scene *scene, Sampler *sampler, const Ray3f &ray) const = 0;
56 
61  virtual EClassType getClassType() const override { return EIntegrator; }
62 };
63 
64 NORI_NAMESPACE_END
65 
66 #endif /* __NORI_INTEGRATOR_H */
Abstract integrator (i.e. a rendering technique)
Definition: integrator.h:35
virtual EClassType getClassType() const override
Return the type of object (i.e. Mesh/BSDF/etc.) provided by this instance.
Definition: integrator.h:61
virtual Color3f Li(const Scene *scene, Sampler *sampler, const Ray3f &ray) const =0
Sample the incident radiance along a ray.
virtual ~Integrator()
Release all memory.
Definition: integrator.h:38
virtual void preprocess(const Scene *scene)
Perform an (optional) preprocess step.
Definition: integrator.h:41
Base class of all objects.
Definition: object.h:32
Abstract sample generator.
Definition: sampler.h:63
Main scene data structure.
Definition: scene.h:34
Represents a linear RGB color value.
Definition: color.h:29