CImage.h 1015 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. #include <nlohmann/json.hpp>
  3. #include <irrlicht/irrlicht.h>
  4. #include "wallpaperengine/core/CObject.h"
  5. #include "Images/CMaterial.h"
  6. namespace wp::core::Objects
  7. {
  8. using json = nlohmann::json;
  9. class CImage : CObject
  10. {
  11. protected:
  12. friend class CObject;
  13. static CObject* fromJSON (
  14. json data,
  15. bool visible,
  16. irr::u32 id,
  17. std::string name,
  18. const irr::core::vector3df& origin,
  19. const irr::core::vector3df& scale,
  20. const irr::core::vector3df& angles
  21. );
  22. CImage (
  23. Images::CMaterial* material,
  24. bool visible,
  25. irr::u32 id,
  26. std::string name,
  27. const irr::core::vector3df& origin,
  28. const irr::core::vector3df& scale,
  29. const irr::core::vector3df& angles,
  30. const irr::core::vector2df& size
  31. );
  32. private:
  33. irr::core::vector2df m_size;
  34. };
  35. };