intersect.h 536 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * DoRayMe - a quick and dirty Raytracer
  3. * Intersect header
  4. *
  5. * Created by Manoël Trapier
  6. * Copyright (c) 2020 986-Studio.
  7. *
  8. */
  9. #ifndef DORAYME_INTERSECT_H
  10. #define DORAYME_INTERSECT_H
  11. #include <stdint.h>
  12. #include <intersection.h>
  13. class Intersect
  14. {
  15. private:
  16. Intersection **list;
  17. uint32_t num;
  18. uint32_t allocated;
  19. public:
  20. Intersect();
  21. void add(Intersection *i);
  22. int count() { return this->num; };
  23. Intersection *operator[](const int p) { return this->list[p]; }
  24. };
  25. #endif //DORAYME_INTERSECT_H