image.h 905 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef WALLENGINE_MODEL_H
  2. #define WALLENGINE_MODEL_H
  3. #include <nlohmann/json.hpp>
  4. #include <irrlicht/irrlicht.h>
  5. #include <wallpaperengine/fs/fileResolver.h>
  6. #include <wallpaperengine/texture.h>
  7. namespace wp
  8. {
  9. using json = nlohmann::json;
  10. class image : public object3d
  11. {
  12. public:
  13. image(json json_data, wp::scene* scene);
  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. wp::fs::fileResolver m_resolver;
  23. irr::core::vector3df m_origin;
  24. irr::io::path m_file;
  25. std::string m_content;
  26. std::vector<wp::texture*> m_textures;
  27. };
  28. };
  29. #endif //WALLENGINE_MODEL_H