VideoRecipe.h 759 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef ALMOND_VIDEORECIPE_H
  2. #define ALMOND_VIDEORECIPE_H
  3. #include <optional>
  4. #include "MandelUtil.h"
  5. #include "Gradient.h"
  6. namespace alm
  7. {
  8. enum class Interpolation
  9. {
  10. NONE,
  11. LINEAR,
  12. SINE
  13. };
  14. template<typename T>
  15. struct Change
  16. {
  17. T newValue;
  18. Interpolation interpolation;
  19. };
  20. template<typename T>
  21. using MaybeChange = std::optional<Change<T>>;
  22. struct VideoPoint;
  23. struct VideoRecipe;
  24. }
  25. struct alm::VideoPoint
  26. {
  27. MaybeChange<int> maxIterations;
  28. MaybeChange<mnd::MandelViewport> view;
  29. MaybeChange<Gradient> gradient;
  30. };
  31. struct alm::VideoRecipe
  32. {
  33. int width;
  34. int height;
  35. float fps;
  36. std::vector<VideoPoint> nodes;
  37. };
  38. #endif // ALMOND_VIDEORECIPE_H