The spica renderer
irradcache.h
1 #ifdef _MSC_VER
2 #pragma once
3 #endif
4 
5 #ifndef _SPICA_IRRADCACHE_H_
6 #define _SPICA_IRRADCACHE_H_
7 
8 #include "../core/common.h"
9 #include "../core/interaction.h"
10 #include "../core/spectrum.h"
11 
12 #include "../core/kdtree.h"
13 #include "integrator.h"
14 
15 namespace spica {
16 
21 class SPICA_EXPORTS IrradCacheIntegrator : public SamplerIntegrator {
22 public:
23  // Public methods
24  IrradCacheIntegrator(const std::shared_ptr<const Camera>& camera,
25  const std::shared_ptr<Sampler>& sampler);
27 
28  void initialize(const Scene& scene,
29  const RenderParams& params,
30  Sampler& sampler) override;
31 
32  void loopStarted(const Scene& scene,
33  const RenderParams& params,
34  Sampler& sampler) override;
35 
36  void loopFinished(const Scene& scene,
37  const RenderParams& params,
38  Sampler& sampler) override;
39 
40  Spectrum Li(const Scene& scene,
41  const RenderParams& params,
42  const Ray& ray,
43  Sampler& sampler,
44  MemoryArena& arena,
45  int depth = 0) const override;
46 
47 private:
48  // Private methods
49 
50  // Private fields
51  int nGathering_;
52  bool cacheMode_;
53 
54  class IrradCache;
55  const std::unique_ptr<IrradCache> cache_;
56 
57 };
58 
59 } // namespace spica
60 
61 #endif // _SPICA_IRRADCACHE_H_
Irradiance caching.
Definition: irradcache.h:21
Random sampler class.
Definition: sampler.h:24
RGB spectrum.
Definition: spectrum.h:18
Ray class.
Definition: ray.h:24
Definition: irradcache.cc:78
Definition: renderparams.h:27
The sampler integrator interface.
Definition: integrator.h:45
Scene provides the interface for scene graph.
Definition: scene.h:23