1 #ifndef BLOBS_CREATURE_CREATURE_HPP_
2 #define BLOBS_CREATURE_CREATURE_HPP_
5 #include "../graphics/glm.hpp"
6 #include "../graphics/SimpleVAO.hpp"
31 Creature(const Creature &) = delete;
32 Creature &operator =(const Creature &) = delete;
34 Creature(Creature &&) = delete;
35 Creature &operator =(Creature &&) = delete;
38 void SetBody(world::Body &b) noexcept { body = &b; }
39 world::Body &GetBody() noexcept { return *body; }
40 const world::Body &GetBody() const noexcept { return *body; }
42 void Surface(int s) noexcept { surface = s; }
43 void Position(const glm::dvec3 &p) noexcept { position = p; }
45 void Name(const std::string &n) noexcept { name = n; }
46 const std::string &Name() const noexcept { return name; }
48 void Health(double h) noexcept { health = h; }
49 double Health() const noexcept { return health; }
51 void AddNeed(const Need &n) { needs.push_back(n); }
52 const std::vector<Need> &Needs() const noexcept { return needs; }
56 glm::dmat4 LocalTransform() noexcept;
59 void Draw(app::Assets &, graphics::Viewport &);
68 std::vector<Need> needs;
75 graphics::SimpleVAO<Attributes, unsigned short> vao;
79 /// put creature on planet and configure it to (hopefully) survive
80 void Spawn(Creature &, world::Planet &, app::Assets &);