Nori  23
camera.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_CAMERA_H)
20 #define __NORI_CAMERA_H
21 
22 #include <nori/object.h>
23 
24 NORI_NAMESPACE_BEGIN
25 
35 class Camera : public NoriObject {
36 public:
57  virtual Color3f sampleRay(Ray3f &ray,
58  const Point2f &samplePosition,
59  const Point2f &apertureSample) const = 0;
60 
62  const Vector2i &getOutputSize() const { return m_outputSize; }
63 
65  const ReconstructionFilter *getReconstructionFilter() const { return m_rfilter; }
66 
71  virtual EClassType getClassType() const override { return ECamera; }
72 protected:
73  Vector2i m_outputSize;
74  ReconstructionFilter *m_rfilter;
75 };
76 
77 NORI_NAMESPACE_END
78 
79 #endif /* __NORI_CAMERA_H */
Generic camera interface.
Definition: camera.h:35
const Vector2i & getOutputSize() const
Return the size of the output image in pixels.
Definition: camera.h:62
virtual Color3f sampleRay(Ray3f &ray, const Point2f &samplePosition, const Point2f &apertureSample) const =0
Importance sample a ray according to the camera's response function.
virtual EClassType getClassType() const override
Return the type of object (i.e. Mesh/Camera/etc.) provided by this instance.
Definition: camera.h:71
const ReconstructionFilter * getReconstructionFilter() const
Return the camera's reconstruction filter in image space.
Definition: camera.h:65
Base class of all objects.
Definition: object.h:32
Generic radially symmetric image reconstruction filter.
Definition: rfilter.h:41
Represents a linear RGB color value.
Definition: color.h:29