testpattern.h 607 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * DoRayMe - a quick and dirty Raytracer
  3. * Strip Pattern header
  4. *
  5. * Created by Manoël Trapier
  6. * Copyright (c) 2020 986-Studio.
  7. *
  8. */
  9. #ifndef DORAYME_TESTPATTERN_H
  10. #define DORAYME_TESTPATTERN_H
  11. #include <pattern.h>
  12. #include <stdio.h>
  13. class TestPattern : public Pattern
  14. {
  15. public:
  16. TestPattern() : Pattern(Colour(0, 0, 0), Colour(1, 1, 1)) { };
  17. Colour patternAt(Tuple point)
  18. {
  19. return Colour(point.x, point.y, point.z);
  20. }
  21. void dumpMe(FILE *fp) {
  22. fprintf(fp, "\"Type\": \"Test\",\n");
  23. Pattern::dumpMe(fp);
  24. }
  25. };
  26. #endif /* DORAYME_TESTPATTERN_H */