cube.h 526 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * DoRayMe - a quick and dirty Raytracer
  3. * Cube header
  4. *
  5. * Created by Manoël Trapier
  6. * Copyright (c) 2020 986-Studio.
  7. *
  8. */
  9. #ifndef DORAYME_CUBE_H
  10. #define DORAYME_CUBE_H
  11. #include <shape.h>
  12. #include <ray.h>
  13. #include <intersect.h>
  14. class Cube : public Shape {
  15. private:
  16. void checkAxis(double axeOrigine, double axeDirection, double *axeMin, double *axeMax);
  17. Intersect localIntersect(Ray r);
  18. Tuple localNormalAt(Tuple point);
  19. public:
  20. Cube() : Shape(SHAPE_CUBE) {};
  21. };
  22. #endif /* DORAYME_CUBE_H */