Files
PhotonMF/tracer.hpp
Miguel Angel Astor Romero 724a98f8a0 Added camera abstraction.
2017-01-12 17:23:11 -04:00

38 lines
679 B
C++

#pragma once
#ifndef TRACER_HPP
#define TRACER_HPP
#include <vector>
#include <glm/glm.hpp>
#include "figure.hpp"
#include "light.hpp"
#include "ray.hpp"
using std::vector;
using glm::vec2;
using glm::vec3;
extern const float BIAS;
extern const vec3 BCKG_COLOR;
class Tracer {
public:
unsigned int m_max_depth;
Tracer(): m_max_depth(5) { }
Tracer(unsigned int max_depth): m_max_depth(max_depth) { }
virtual ~Tracer() { }
virtual vec3 trace_ray(Ray & r, vector<Figure *> & v_figures, vector<Light *> & v_lights, unsigned int rec_level) const = 0;
protected:
float fresnel(const vec3 & i, const vec3 & n, const float ir1, const float ir2) const;
};
#endif