/* * DoRayMe - a quick and dirty Raytracer * Cube header * * Created by Manoƫl Trapier * Copyright (c) 2020 986-Studio. * */ #ifndef DORAYME_CUBE_H #define DORAYME_CUBE_H #include #include #include #include #include class Cube : public Shape { protected: void checkAxis(double axeOrigin, double axeDirection, double *axeMin, double *axeMax); void localIntersect(Ray r, Intersect &xs); Tuple localNormalAt(Tuple point, Intersection *hit = nullptr); public: Cube() : Shape(Shape::CUBE) { stats.addCube(); }; void dumpMe(FILE *fp); }; #endif /* DORAYME_CUBE_H */