feat: vertical movement and agent height
This commit is contained in:
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user