object.h 851 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef WALLENGINE_OBJECT_H
  2. #define WALLENGINE_OBJECT_H
  3. #include <iostream>
  4. #include <irrlicht/irrlicht.h>
  5. #include <nlohmann/json.hpp>
  6. #include <wallpaperengine/video/node.h>
  7. #include <wallpaperengine/effect.h>
  8. #include <wallpaperengine/scene.h>
  9. namespace wp
  10. {
  11. using json = nlohmann::json;
  12. class object3d;
  13. class scene;
  14. class object : public wp::video::node
  15. {
  16. public:
  17. object (json json_data, wp::scene* scene);
  18. ~object ();
  19. void render ();
  20. private:
  21. int m_id;
  22. wp::scene* m_scene;
  23. std::string m_name;
  24. irr::core::vector2df m_size;
  25. irr::core::vector3df m_scale;
  26. irr::core::vector3df m_origin;
  27. irr::core::vector3df m_angles;
  28. wp::object3d* m_object3d;
  29. std::vector<effect*> m_effects;
  30. };
  31. };
  32. #endif //WALLENGINE_OBJECT_H