5 #ifndef _SPICA_PHOTON_MAP_H_
6 #define _SPICA_PHOTON_MAP_H_
8 #include "core/common.h"
10 #include "core/spectrum.h"
11 #include "core/kdtree.h"
12 #include "core/uncopyable.h"
13 #include "core/stack.h"
15 #include "core/vector3d.h"
16 #include "core/point3d.h"
17 #include "core/normal3d.h"
18 #include "core/random.h"
34 double operator[](
int i)
const;
36 static double distance(
const Photon& p1,
const Photon& p2);
38 inline Point3d pos()
const {
return pos_; }
39 inline Spectrum beta()
const {
return beta_; }
40 inline Vector3d wi()
const {
return wi_; }
41 inline Normal3d normal()
const {
return normal_; }
42 inline const Material*
const material()
const {
return material_; }
62 virtual void construct(
const Scene& scene,
70 int gatherPhotons,
double gatherRadius)
const;
73 int gatherPhotons,
double gatherRadius)
const;
77 void knnFind(
const Photon& photon, std::vector<Photon>* photons,
78 int gatherPhotons,
double gatherRadius)
const;
80 void tracePhoton(
const Scene& scene,
86 std::vector<Photon>* photons);
94 #endif // _SPICA_PHOTON_MAP_H_
Definition: photon_map.h:55
Definition: interaction.h:68
Random sampler class.
Definition: sampler.h:24
RGB spectrum.
Definition: spectrum.h:18
Ray class.
Definition: ray.h:24
Definition: renderparams.h:27
Definition: photon_map.h:25
Definition: interaction.h:126
Interface class which forbids copy and assignment.
Definition: uncopyable.h:15
Scene provides the interface for scene graph.
Definition: scene.h:23
Definition: material.h:30