Files
PhotonMF/figure.hpp

29 lines
444 B
C++
Raw Normal View History

2016-12-25 21:47:28 -04:00
#pragma once
#ifndef FIGURE_HPP
#define FIGURE_HPP
#include <glm/vec3.hpp>
#include "ray.hpp"
#include "material.hpp"
2016-12-25 21:47:28 -04:00
2016-12-26 15:41:29 -04:00
using glm::vec3;
2016-12-25 21:47:28 -04:00
class Figure {
public:
Material * m_mat;
2016-12-25 21:47:28 -04:00
2017-01-18 21:46:24 -04:00
Figure(Material * mat = NULL) {
m_mat = mat == NULL ? new Material() : mat;
}
virtual ~Figure() {
delete m_mat;
}
2016-12-25 21:47:28 -04:00
2016-12-26 19:14:21 -04:00
virtual bool intersect(Ray & r, float & t) const = 0;
virtual vec3 normal_at_int(Ray & r, float & t) const = 0;
2016-12-25 21:47:28 -04:00
};
#endif