#ifndef HITTABLE_LIST_H #define HITTABLE_LIST_H #include #include #include "bvh.h" #include "hittable.h" class Hittable_list : public Hittable { public: Hittable_list() {} Hittable_list(std::shared_ptr object) { add(object); } void clear() { objects.clear(); } void add(std::shared_ptr object) { objects.push_back(object); } virtual bool hit(const Ray& r, double tmin, double tmax, hit_record& rec) const; bool bounding_box(double t0, double t1, Aabb& output_box) const; Bvh_node generate_bvh(double t0, double t1); private: std::vector> objects; }; #endif // HITTABLE_LIST_H