Nori  23
texture.h
1 /*
2  This file is part of Nori, a simple educational ray tracer
3 
4  Copyright (c) 2015 by Romain Prévost
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_TEXTURE_H)
20 #define __NORI_TEXTURE_H
21 
22 #include <nori/object.h>
23 
24 NORI_NAMESPACE_BEGIN
25 
29 template <typename T>
30 class Texture : public NoriObject {
31 public:
32  Texture() {}
33  virtual ~Texture() {}
34 
39  virtual EClassType getClassType() const override { return ETexture; }
40 
41  virtual T eval(const Point2f & uv) = 0;
42 };
43 
44 NORI_NAMESPACE_END
45 
46 #endif /* __NORI_TEXTURE_H */
Base class of all objects.
Definition: object.h:32
Superclass of all texture.
Definition: texture.h:30
virtual EClassType getClassType() const override
Return the type of object (i.e. Mesh/Emitter/etc.) provided by this instance.
Definition: texture.h:39