Added photon tracing.

This commit is contained in:
2017-02-22 15:12:01 -04:00
parent 2efb8b33d4
commit 9bb6c0b759
9 changed files with 188 additions and 38 deletions

View File

@@ -8,14 +8,16 @@
class PhotonTracer: public Tracer {
public:
PhotonTracer(): Tracer() { }
PhotonTracer(unsigned int max_depth): Tracer(max_depth) { };
virtual ~PhotonTracer();
virtual vec3 trace_ray(Ray & r, Scene * s, unsigned int rec_level) const;
void build_photon_map(kdTree & photon_map, Scene * s, const unsigned int rec_level, const size_t n_photons_per_ligth = 10000, const bool specular = false) const;
void build_photon_map(Scene * s, const size_t n_photons_per_ligth = 10000, const bool specular = false);
private:
kdTree m_photon_map;
vec3 trace_photon(Ray &r, Scene * s, const unsigned int rec_level, const bool specular = false);
};
#endif