feat: vertical movement and agent height

This commit is contained in:
MihailRis
2025-08-01 23:32:35 +03:00
parent 1d31c33525
commit ec4b836b3c
2 changed files with 120 additions and 37 deletions
+12 -2
View File
@@ -6,6 +6,7 @@
#include <glm/vec3.hpp>
class Level;
class GlobalChunks;
namespace voxels {
struct RouteNode {
@@ -17,6 +18,10 @@ namespace voxels {
std::vector<RouteNode> nodes;
};
struct Agent {
int height;
};
struct Map {
int width;
int height;
@@ -40,9 +45,14 @@ namespace voxels {
class Pathfinding {
public:
Pathfinding(const Level& level);
Route perform(const glm::ivec3& start, const glm::ivec3& end);
Route perform(
const Agent& agent, const glm::ivec3& start, const glm::ivec3& end
);
private:
const Level& level;
const GlobalChunks& chunks;
int getSurfaceAt(const glm::ivec3& pos, int maxDelta);
};
}