Added camera abstraction.

This commit is contained in:
Miguel Angel Astor Romero
2017-01-12 17:23:11 -04:00
parent 991d339b65
commit 724a98f8a0
12 changed files with 215 additions and 93 deletions

View File

@@ -3,14 +3,13 @@
#include <glm/gtc/constants.hpp>
#include "path_tracer.hpp"
#include "sampling.hpp"
using std::numeric_limits;
using namespace glm;
PathTracer::~PathTracer() { }
static const float PDF = (1.0f / (2.0f * pi<float>()));
vec3 PathTracer::trace_ray(Ray & r, vector<Figure *> & v_figures, vector<Light *> & v_lights, unsigned int rec_level) const {
float t, _t;
Figure * _f;
@@ -121,5 +120,5 @@ vec3 PathTracer::trace_ray(Ray & r, vector<Figure *> & v_figures, vector<Light *
return clamp(color, 0.0f, 1.0f);
} else
return /*vec3(0.0f)*/ BCKG_COLOR;
return BCKG_COLOR;
}