16 lines
246 B
C++
16 lines
246 B
C++
#ifndef HITTABLE_H
|
|
#define HITTABLE_H
|
|
|
|
#include "ray.h"
|
|
|
|
struct hit_record {
|
|
point3 p;
|
|
vec3 normal;
|
|
double t;
|
|
};
|
|
|
|
struct hittable {
|
|
virtual bool hit(const ray& r, double t_min, double t_max, hit_record& rec) const = 0;
|
|
};
|
|
|
|
#endif
|