#ifndef BOX_H #define BOX_H #include "primitive/primitive.h" class Box : public Primitive { public: // Constructor Box(std::shared_ptr const &shader); Box(Vector3d const ¢er, Vector3d const &size, std::shared_ptr const &shader); // Set void setCenter(Vector3d const ¢er) { this->center = center; } void setSize(Vector3d const &size) { this->size = size; } // Primitive functions bool intersect(Ray &ray) const override; // Bounding box float minimumBounds(int dimension) const override; float maximumBounds(int dimension) const override; protected: Vector3d center; Vector3d size; }; #endif