Lightmetrica  0.0.1.50dbee3 (yosakoi)
 All Classes Functions Variables Typedefs Enumerations Enumerator
stub.film.h
1 /*
2  Lightmetrica : A research-oriented renderer
3 
4  Copyright (c) 2014 Hisanari Otsu
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #pragma once
21 #ifndef LIB_LIGHTMETRICA_TEST_STUB_FILM_H
22 #define LIB_LIGHTMETRICA_TEST_STUB_FILM_H
23 
24 #include "common.h"
25 #include <lightmetrica/film.h>
26 
27 LM_NAMESPACE_BEGIN
28 LM_TEST_NAMESPACE_BEGIN
29 
30 class StubFilm : public Film
31 {
32 public:
33 
34  LM_COMPONENT_IMPL_DEF("stub");
35 
36 public:
37 
38  virtual int Width() const { return 200; }
39  virtual int Height() const { return 100; }
40  virtual bool Save(const std::string& path) const { return true; }
41  virtual bool RescaleAndSave( const std::string& path, const Math::Float& weight ) const { return true; }
42  virtual void RecordContribution( const Math::Vec2& rasterPos, const Math::Vec3& contrb ) {}
43  virtual void AccumulateContribution( const Math::Vec2& rasterPos, const Math::Vec3& contrb ) {}
44  virtual void AccumulateContribution( const Film& film ) {}
45  virtual void Rescale( const Math::Float& weight ) {}
46  virtual bool Load( const ConfigNode& node, const Assets& assets ) { return true; }
47  virtual Film* Clone() const { return nullptr; }
48  virtual void Clear() {}
49 
50 };
51 
52 LM_TEST_NAMESPACE_END
53 LM_NAMESPACE_END
54 
55 #endif // LIB_LIGHTMETRICA_TEST_STUB_FILM_H
virtual bool Load(const ConfigNode &node, const Assets &assets)
Definition: stub.film.h:46
virtual void AccumulateContribution(const Film &film)
Definition: stub.film.h:44
virtual Film * Clone() const
Definition: stub.film.h:47
virtual int Width() const
Definition: stub.film.h:38
virtual void RecordContribution(const Math::Vec2 &rasterPos, const Math::Vec3 &contrb)
Definition: stub.film.h:42
Definition: assets.h:39
virtual int Height() const
Definition: stub.film.h:39
Definition: stub.film.h:30
virtual void AccumulateContribution(const Math::Vec2 &rasterPos, const Math::Vec3 &contrb)
Definition: stub.film.h:43
Definition: confignode.h:37
virtual void Rescale(const Math::Float &weight)
Definition: stub.film.h:45
Definition: film.h:34