8#include <nlohmann/json.hpp>
30 this->
m_shape = std::move(p.m_shape);
37 this->
m_shape = std::move(p.m_shape);
49 nlohmann::json json =
"{}"_json;
63 const auto& col = json.at(
"colour");
70 const auto& pj = json.at(
"pos");
void deserialize(const nlohmann::json &json) override
Deserializes from object.
graphics::Point m_shape
Shape.
virtual ~Point()
Destructor.
Point & operator=(Point &&)
Move assignment operator.
nlohmann::json serialize() override
Serializes object.
void set_g(const std::uint8_t g)
Green.
void set_r(const std::uint8_t r)
Red.
void set_b(const std::uint8_t b)
Blue.
void set_a(const std::uint8_t a)
Alpha.
void create(const glm::vec2 &pos)
Initial point positon.
const glm::vec2 & pos() const
Get pos.
Colour m_colour
Used by all primitives.