]> git.localhorst.tv Git - blobs.git/blobdiff - src/creature/Steering.hpp
fix AI
[blobs.git] / src / creature / Steering.hpp
index 51f2c63db710bc098d689f540ef00801a050cadb..cca757ee0b72763ec8b4f6558b8259d45ceedca2 100644 (file)
@@ -1,14 +1,13 @@
 #ifndef BLOBS_CREATURE_STEERING_HPP_
 #define BLOBS_CREATURE_STEERING_HPP_
 
+#include "Situation.hpp"
 #include "../math/glm.hpp"
 
 
 namespace blobs {
 namespace creature {
 
-class Creature;
-
 class Steering {
 
 public:
@@ -24,21 +23,24 @@ public:
 
 public:
        void Halt() noexcept;
+       void Pass(const glm::dvec3 &) noexcept;
        void GoTo(const glm::dvec3 &) noexcept;
 
-       glm::dvec3 Acceleration(Creature &) const noexcept;
+       glm::dvec3 Acceleration(const Situation::State &) const noexcept;
 
 private:
        bool SumForce(glm::dvec3 &out, const glm::dvec3 &in) const noexcept;
+       glm::dvec3 TargetVelocity(const Situation::State &, const glm::dvec3 &) const noexcept;
 
 private:
-       glm::dvec3 seek_target;
+       glm::dvec3 target;
 
        double max_accel = 1.0;
        double max_speed = 1.0;
 
        bool halting;
        bool seeking;
+       bool arriving;
 
 };