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.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 engine-ocean/Game/Components/pathfindcomponent.cpp (limited to 'engine-ocean/Game/Components/pathfindcomponent.cpp') diff --git a/engine-ocean/Game/Components/pathfindcomponent.cpp b/engine-ocean/Game/Components/pathfindcomponent.cpp new file mode 100644 index 0000000..ad87e23 --- /dev/null +++ b/engine-ocean/Game/Components/pathfindcomponent.cpp @@ -0,0 +1,16 @@ +#include "pathfindcomponent.h" +#include "glm/glm.hpp" +#include + +PathfindComponent::PathfindComponent(std::vector vertices, std::vector triangles): + m_vertices(vertices), + m_triangles(triangles), + m_pathfinder(std::make_unique(vertices, triangles)) +{ + +} + + +std::vector PathfindComponent::getPath(const glm::vec3 &A, const glm::vec3 &B){ + return m_pathfinder->findPath(A,B); +} -- cgit v1.2.3-70-g09d2