X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fai%2FAIController.hpp;fp=src%2Fai%2FAIController.hpp;h=53bdc827a5b3bc8df5b99b4c88553e6dfd5a5361;hb=150d065f431d665326fd8028748c48a74ad956bb;hp=0000000000000000000000000000000000000000;hpb=80a9a59d71a7b144c12f64cbef4644751bd54745;p=blank.git diff --git a/src/ai/AIController.hpp b/src/ai/AIController.hpp new file mode 100644 index 0000000..53bdc82 --- /dev/null +++ b/src/ai/AIController.hpp @@ -0,0 +1,44 @@ +#ifndef BLANK_AI_AICONTROLLER_HPP_ +#define BLANK_AI_AICONTROLLER_HPP_ + +#include "../world/EntityController.hpp" + +#include + + +namespace blank { + +class GaloisLFSR; + +class AIController +: public EntityController { + +public: + explicit AIController(GaloisLFSR &); + ~AIController(); + + void Update(Entity &, float dt) override; + + glm::vec3 ControlForce(const EntityState &) const override; + + static glm::vec3 Heading(const EntityState &) noexcept; + +private: + GaloisLFSR &random; + + float chase_speed; + float flee_speed; + float stop_dist; + float flee_dist; + + glm::vec3 wander_pos; + float wander_dist; + float wander_radius; + float wander_disp; + float wander_speed; + +}; + +} + +#endif