X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fai%2FAIController.hpp;h=15645a256dd66aa604b70b491214da8e24e1e3c3;hb=fa3c4a14546d73ddc2671cd5cc58208839bf7173;hp=cda3e8a08086465f694b020f6615c4c58ebd1271;hpb=8e9e2bb4b2dd5a4100f4531628ab58002fe253c1;p=blank.git diff --git a/src/ai/AIController.hpp b/src/ai/AIController.hpp index cda3e8a..15645a2 100644 --- a/src/ai/AIController.hpp +++ b/src/ai/AIController.hpp @@ -2,6 +2,7 @@ #define BLANK_AI_AICONTROLLER_HPP_ #include "../app/IntervalTimer.hpp" +#include "../geometry/primitive.hpp" #include "../world/EntityController.hpp" #include @@ -54,6 +55,11 @@ public: void SetHaltSpeed(float) noexcept; glm::vec3 GetHaltForce(const Entity &, const EntityState &) const noexcept; + void StartAvoidingObstacles() noexcept; + void StopAvoidingObstacles() noexcept; + bool IsAvoidingObstacles() const noexcept; + glm::vec3 GetObstacleAvoidanceForce(const Entity &, const EntityState &) const noexcept; + void StartFleeing() noexcept; void StopFleeing() noexcept; bool IsFleeing() const noexcept; @@ -122,6 +128,10 @@ private: bool halted; float halt_speed; + bool avoid_obstacles; + AABB obstacle_box; + glm::mat4 obstacle_transform; + bool fleeing; Entity *flee_target; float flee_speed;