object.h 690 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <nlohmann/json.hpp>
  3. #include <irrlicht/irrlicht.h>
  4. namespace wp::core
  5. {
  6. using json = nlohmann::json;
  7. class object
  8. {
  9. public:
  10. static object* fromJSON (json data);
  11. protected:
  12. object (
  13. bool visible,
  14. irr::u32 id,
  15. std::string name,
  16. const irr::core::vector3df& origin,
  17. const irr::core::vector3df& scale,
  18. const irr::core::vector3df& angles
  19. );
  20. private:
  21. bool m_visible;
  22. irr::u32 m_id;
  23. std::string m_name;
  24. irr::core::vector3df m_origin;
  25. irr::core::vector3df m_scale;
  26. irr::core::vector3df m_angles;
  27. };
  28. };