1 #ifndef BLOBS_CREATURE_STEERING_HPP_
2 #define BLOBS_CREATURE_STEERING_HPP_
4 #include "Situation.hpp"
5 #include "../math/glm.hpp"
16 explicit Steering(const Creature &);
20 /// factor in [0,1] of how fast you need to get there
21 void Haste(double h) noexcept { haste = h; }
22 double Haste() const noexcept { return haste; }
24 void MaxAcceleration(double a) noexcept { max_accel = a; }
25 double MaxAcceleration() const noexcept { return max_accel; }
27 void MaxSpeed(double s) noexcept { max_speed = s; }
28 double MaxSpeed() const noexcept { return max_speed; }
31 void Separate(double min_distance, double max_lookaround) noexcept;
32 void DontSeparate() noexcept;
34 void Pass(const glm::dvec3 &) noexcept;
35 void GoTo(const glm::dvec3 &) noexcept;
37 glm::dvec3 Acceleration(const Situation::State &) const noexcept;
40 bool SumForce(glm::dvec3 &out, const glm::dvec3 &in, double max) const noexcept;
41 glm::dvec3 TargetVelocity(const Situation::State &, const glm::dvec3 &, double acc) const noexcept;