The spica renderer
ppmprob.h
1 #ifdef _MSC_VER
2 #pragma once
3 #endif
4 
5 #ifndef _SPICA_PHOTON_MAPPING_H_
6 #define _SPICA_PHOTON_MAPPING_H_
7 
8 #include "../core/common.h"
9 #include "../core/forward_decl.h"
10 
11 #include "photon_map.h"
12 #include "integrator.h"
13 
14 namespace spica {
15 
19 class SPICA_EXPORTS PPMProbIntegrator : public SamplerIntegrator {
20 public:
22  PPMProbIntegrator(const std::shared_ptr<const Camera>& camera,
23  const std::shared_ptr<Sampler>& sampler,
24  double alpha = 0.8);
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  PhotonMap photonmap_;
50  double globalRadius_;
51  const double alpha_;
52 };
53 
54 } // namespace spica
55 
56 #endif // _SPICA_PHOTON_MAPPING_H_
Definition: photon_map.h:55
Progressive photon mapping: a probabilistic approach.
Definition: ppmprob.h:19
Random sampler class.
Definition: sampler.h:24
RGB spectrum.
Definition: spectrum.h:18
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