Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
simplewayfind.h
1 #pragma once
2 
3 #include <unordered_set>
4 
5 #include "glm/glm.hpp"
6 #include "glm/gtc/quaternion.hpp"
7 
8 
9 class WorldObject;
10 
11 // Very simple wayfinding algorithm.
12 // Checks for an obstacle on the direct path to the target and aims next to it until the line is free again
14 public:
15  static glm::vec3 calculateTravelPoint(WorldObject& object, glm::vec3 targetPoint);
16 
17 protected:
18  static glm::vec3 calculateEvasionDirectionFor(WorldObject& self, WorldObject& obstacle, const glm::vec3& targetPoint);
19  static glm::vec3 calculateEvasionPointFor(WorldObject& self, WorldObject& obstacle, const glm::vec3& targetPoint);
20 };
21 
Definition: worldobject.h:43
Definition: simplewayfind.h:13