X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcreature%2FCreature.hpp;h=aaeb6cfb544387a654d5017483ee000caed1b10a;hb=25ea209f2732dfe643844f303d304dc3c6a5f4f0;hp=7c3d1ef0f924cad93614a7c8dba26a59d005fbf5;hpb=e59f3058d8786dc0a053c42bcec8f01b22ec25a9;p=blobs.git diff --git a/src/creature/Creature.hpp b/src/creature/Creature.hpp index 7c3d1ef..aaeb6cf 100644 --- a/src/creature/Creature.hpp +++ b/src/creature/Creature.hpp @@ -1,8 +1,10 @@ #ifndef BLOBS_CREATURE_CREATURE_HPP_ #define BLOBS_CREATURE_CREATURE_HPP_ +#include "Goal.hpp" #include "Need.hpp" #include "Situation.hpp" +#include "Steering.hpp" #include "../graphics/glm.hpp" #include "../graphics/SimpleVAO.hpp" @@ -47,11 +49,20 @@ public: void AddNeed(std::unique_ptr &&n) { needs.emplace_back(std::move(n)); } const std::vector> &Needs() const noexcept { return needs; } + void AddGoal(std::unique_ptr &&); + const std::vector> &Goals() const noexcept { return goals; } + void Tick(double dt); Situation &GetSituation() noexcept { return situation; } const Situation &GetSituation() const noexcept { return situation; } + Steering &GetSteering() noexcept { return steering; } + const Steering &GetSteering() const noexcept { return steering; } + + void Velocity(const glm::dvec3 &v) noexcept { vel = v; } + const glm::dvec3 &Velocity() const noexcept { return vel; } + glm::dmat4 LocalTransform() noexcept; void BuildVAO(); @@ -60,9 +71,14 @@ public: private: std::string name; double health; + std::vector> needs; + std::vector> goals; Situation situation; + Steering steering; + + glm::dvec3 vel; struct Attributes { glm::vec3 position;