CAlphaRandom.h 875 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include "WallpaperEngine/Core/Core.h"
  3. #include "WallpaperEngine/Core/Objects/Particles/CInitializer.h"
  4. namespace WallpaperEngine::Core::Objects::Particles::Initializers {
  5. /**
  6. * Initializer for particles that decides the base alpha for the particles
  7. */
  8. class CAlphaRandom : CInitializer {
  9. public:
  10. /**
  11. * @return The minimum alpha value to be used
  12. */
  13. [[nodiscard]] double getMinimum () const;
  14. /**
  15. * @return The maximum alpha value to be used
  16. */
  17. [[nodiscard]] double getMaximum () const;
  18. protected:
  19. friend class CInitializer;
  20. static CAlphaRandom* fromJSON (json data, uint32_t id);
  21. CAlphaRandom (uint32_t id, double min, double max);
  22. private:
  23. /** Maximum alpha */
  24. double m_max;
  25. /** Minimum alpha */
  26. double m_min;
  27. };
  28. } // namespace WallpaperEngine::Core::Objects::Particles::Initializers