The spica renderer
volphoto.h
1 #ifdef _MSC_VER
2 #pragma once
3 #endif
4 
5 #ifndef _SPICA_VOLPHOTO_H_
6 #define _SPICA_VOLPHOTO_H_
7 
8 #include <memory>
9 
10 #include "../core/common.h"
11 #include "../core/forward_decl.h"
12 
13 #include "integrator.h"
14 
15 namespace spica {
16 
20 class SPICA_EXPORTS VolPhotoIntegrator : public SamplerIntegrator {
21 public:
22  VolPhotoIntegrator(const std::shared_ptr<const Camera>& camera,
23  const std::shared_ptr<Sampler>& sampler,
24  double alpha = 0.8);
25 
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& parmas,
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 fields
49  class VPhotonMap;
50 
51  std::unique_ptr<VPhotonMap> photonmap_;
52  double globalRadius_;
53  const double alpha_;
54 };
55 
56 } // namespace spica
57 
58 #endif // _SPICA_VOLPHOTO_H_
Definition: volphoto.cc:30
Random sampler class.
Definition: sampler.h:24
RGB spectrum.
Definition: spectrum.h:18
Volumetric photon mapping.
Definition: volphoto.h:20
Ray class.
Definition: ray.h:24
Definition: renderparams.h:27
The sampler integrator interface.
Definition: integrator.h:45
Scene provides the interface for scene graph.
Definition: scene.h:23