X-Git-Url: http://git.localhorst.tv/?p=blobs.git;a=blobdiff_plain;f=src%2Fcreature%2FSteering.hpp;h=d8f2cebfb7ba91fe1e35d736ea1261746d76448d;hp=470031dd170a4ec16e201068265e9ad8807a68e8;hb=b03c2f42ba325ab909b159a4bc8e7568defdc4c5;hpb=da5e275f10252813b4de3af5e58f0c7975468962 diff --git a/src/creature/Steering.hpp b/src/creature/Steering.hpp index 470031d..d8f2ceb 100644 --- a/src/creature/Steering.hpp +++ b/src/creature/Steering.hpp @@ -17,6 +17,10 @@ public: ~Steering(); public: + /// factor in [0,1] of how fast you need to get there + void Haste(double h) noexcept { haste = h; } + double Haste() const noexcept { return haste; } + void MaxAcceleration(double a) noexcept { max_accel = a; } double MaxAcceleration() const noexcept { return max_accel; } @@ -33,13 +37,14 @@ public: 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; + bool SumForce(glm::dvec3 &out, const glm::dvec3 &in, double max) const noexcept; + glm::dvec3 TargetVelocity(const Situation::State &, const glm::dvec3 &, double acc) const noexcept; private: const Creature &c; glm::dvec3 target; + double haste; double max_accel; double max_speed; double min_dist;