image.h 867 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef WALLENGINE_MODEL_H
  2. #define WALLENGINE_MODEL_H
  3. #include <nlohmann/json.hpp>
  4. #include <irrlicht/irrlicht.h>
  5. #include <WallpaperEngine/FileSystem/utils.h>
  6. #include <WallpaperEngine/texture.h>
  7. namespace WallpaperEngine
  8. {
  9. using json = nlohmann::json;
  10. class image : public object3d
  11. {
  12. public:
  13. image(json json_data, WallpaperEngine::object* parent);
  14. irr::video::SMaterial& getMaterial ();
  15. void setFlag(irr::video::E_MATERIAL_FLAG flag, bool newvalue);
  16. void setType(irr::video::E_MATERIAL_TYPE newType);
  17. void render ();
  18. private:
  19. bool m_visible;
  20. irr::video::S3DVertex m_vertices [4];
  21. irr::video::SMaterial m_material;
  22. irr::io::path m_file;
  23. std::string m_content;
  24. std::vector<WallpaperEngine::texture*> m_textures;
  25. };
  26. };
  27. #endif //WALLENGINE_MODEL_H