plane.h 542 B

1234567891011121314151617181920212223242526
  1. /*
  2. * DoRayMe - a quick and dirty Raytracer
  3. * Plane header
  4. *
  5. * Created by Manoël Trapier
  6. * Copyright (c) 2020 986-Studio.
  7. *
  8. */
  9. #ifndef DORAYME_PLANE_H
  10. #define DORAYME_PLANE_H
  11. #include <renderstat.h>
  12. class Plane : public Shape
  13. {
  14. protected:
  15. void localIntersect(Ray r, Intersect &xs);
  16. Tuple localNormalAt(Tuple point, Intersection *hit = nullptr);
  17. public:
  18. Plane() : Shape(Shape::PLANE) { stats.addPlane(); };
  19. BoundingBox getLocalBounds();
  20. bool haveFiniteBounds() { return false; };
  21. };
  22. #endif //DORAYME_PLANE_H