world.h 735 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * DoRayMe - a quick and dirty Raytracer
  3. * World header
  4. *
  5. * Created by Manoël Trapier
  6. * Copyright (c) 2020 986-Studio.
  7. *
  8. */
  9. #ifndef DORAYME_WORLD_H
  10. #define DORAYME_WORLD_H
  11. #include <stdint.h>
  12. #include <light.h>
  13. #include <shape.h>
  14. #include <intersect.h>
  15. #include <ray.h>
  16. class World
  17. {
  18. public:
  19. uint32_t objectCount;
  20. uint32_t lightCount;
  21. private:
  22. uint32_t allocatedObjectCount;
  23. uint32_t allocatedLightCount;
  24. Light* *lightList;
  25. Shape* *objectList;
  26. public:
  27. World();
  28. ~World();
  29. void addObject(Shape *s);
  30. void addLight(Light *l);
  31. /* Some debug things */
  32. bool lightIsIn(Light &l);
  33. bool objectIsIn(Shape &s);
  34. Intersect intersect(Ray r);
  35. };
  36. #endif //DORAYME_WORLD_H