light.h 811 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * DoRayMe - a quick and dirty Raytracer
  3. * Light header
  4. *
  5. * Created by Manoël Trapier
  6. * Copyright (c) 2020 986-Studio.
  7. *
  8. */
  9. #ifndef DORAYME_LIGHT_H
  10. #define DORAYME_LIGHT_H
  11. #include <tuple.h>
  12. #include <colour.h>
  13. enum LightType
  14. {
  15. POINT_LIGHT = 0,
  16. };
  17. class Light
  18. {
  19. public:
  20. Colour intensity;
  21. Tuple position;
  22. LightType type;
  23. public:
  24. Light(LightType type = POINT_LIGHT, Tuple position=Point(0, 0, 0),
  25. Colour intensity=Colour(1, 1, 1)) : type(type), position(position), intensity(intensity) { };
  26. bool operator==(const Light &b) const { return this->intensity == b.intensity &&
  27. this->position == b.position &&
  28. this->type == b.type; };
  29. };
  30. #endif //DORAYME_LIGHT_H