1 #ifndef BLOBS_WORLD_CREATURE_HPP_
2 #define BLOBS_WORLD_CREATURE_HPP_
4 #include "../graphics/glm.hpp"
5 #include "../graphics/SimpleVAO.hpp"
26 Creature(const Creature &) = delete;
27 Creature &operator =(const Creature &) = delete;
29 Creature(Creature &&) = delete;
30 Creature &operator =(Creature &&) = delete;
33 void SetBody(Body &b) noexcept { body = &b; }
34 Body &GetBody() noexcept { return *body; }
35 const Body &GetBody() const noexcept { return *body; }
37 void Surface(int s) noexcept { surface = s; }
38 void Position(const glm::dvec3 &p) noexcept { position = p; }
40 void RequireBreathing(int r) noexcept { breathes = r; }
41 int Breathes() const noexcept { return breathes; }
42 bool MustBreathe() const noexcept { return breathes > -1; }
44 void RequireDrinking(int r) noexcept { drinks = r; }
45 int Drinks() const noexcept { return drinks; }
46 bool MustDrink() const noexcept { return drinks > -1; }
48 void RequireEating(int r) noexcept { eats = r; }
49 int Eats() const noexcept { return eats; }
50 bool MustEat() const noexcept { return eats > -1; }
52 glm::dmat4 LocalTransform() noexcept;
55 void Draw(app::Assets &, graphics::Viewport &);
71 graphics::SimpleVAO<Attributes, unsigned short> vao;
75 /// put creature on planet and configure it to (hopefully) survive
76 void Spawn(Creature &, Planet &, app::Assets &);