From a556b45abf18f1bd509daaf63b66b7d55e9fd291 Mon Sep 17 00:00:00 2001 From: jjesswan Date: Mon, 22 Apr 2024 21:56:26 -0400 Subject: add engine version --- engine-ocean/Game/Components/PathfindComponent.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 engine-ocean/Game/Components/PathfindComponent.h (limited to 'engine-ocean/Game/Components/PathfindComponent.h') diff --git a/engine-ocean/Game/Components/PathfindComponent.h b/engine-ocean/Game/Components/PathfindComponent.h new file mode 100644 index 0000000..13f4e6d --- /dev/null +++ b/engine-ocean/Game/Components/PathfindComponent.h @@ -0,0 +1,22 @@ +#ifndef PATHFINDCOMPONENT_H +#define PATHFINDCOMPONENT_H + + +#include "Game/Systems/Pathfinding/pathfinder.h" +#include "glm/fwd.hpp" +#include +#include "Component.h" + +class PathfindComponent : public Component +{ +public: + PathfindComponent(std::vector vertices, std::vector triangles); + std::vector getPath(const glm::vec3 &A, const glm::vec3 &B); + +private: + std::vector m_vertices; + std::vector m_triangles; + std::unique_ptr m_pathfinder; +}; + +#endif // PATHFINDCOMPONENT_H -- cgit v1.2.3-70-g09d2