#pragma once #include "hittable.h" #include "vec3.h" class sphere : public hittable { public: sphere() {} sphere(point3 centre, double r, std::shared_ptr m) : centre_(centre), radius_(r), mat_ptr_(m) {}; virtual bool hit(const ray& r, double t_min, double t_max, hit_record& rec) const; private: point3 centre_; double radius_; std::shared_ptr mat_ptr_; };