Nori  24
rfilter.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_RFILTER_H)
20 #define __NORI_RFILTER_H
21 
22 #include <nori/object.h>
23 
25 #define NORI_FILTER_RESOLUTION 32
26 
27 NORI_NAMESPACE_BEGIN
28 
42 public:
44  float getRadius() const { return m_radius; }
45 
47  virtual float eval(float x) const = 0;
48 
53  virtual EClassType getClassType() const override { return EReconstructionFilter; }
54 protected:
55  float m_radius;
56 };
57 
58 NORI_NAMESPACE_END
59 
60 #endif /* __NORI_RFILTER_H */
Base class of all objects.
Definition: object.h:32
Generic radially symmetric image reconstruction filter.
Definition: rfilter.h:41
virtual float eval(float x) const =0
Evaluate the filter function.
float getRadius() const
Return the filter radius in fractional pixels.
Definition: rfilter.h:44
virtual EClassType getClassType() const override
Return the type of object (i.e. Mesh/Camera/etc.) provided by this instance.
Definition: rfilter.h:53