pathfinder_waypoint.h 932 B

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #include "pathfinder_interface.h"
  3. struct PathFileHeader;
  4. struct Node;
  5. struct FindPerson_Point {
  6. float y;
  7. float x;
  8. float z;
  9. };
  10. class PathfinderWaypoint : public IPathfinder
  11. {
  12. public:
  13. PathfinderWaypoint(const std::string &path);
  14. virtual ~PathfinderWaypoint();
  15. virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck, int flags = PathingNotDisabled);
  16. virtual glm::vec3 GetRandomLocation(const glm::vec3 &start);
  17. private:
  18. void Load(const std::string &filename);
  19. void LoadV2(FILE *f, const PathFileHeader &header);
  20. void LoadV3(FILE *f, const PathFileHeader &header);
  21. void ShowNodes();
  22. void ShowPath(Client *c, const glm::vec3 &start, const glm::vec3 &end);
  23. void NodeInfo(Client *c);
  24. Node *FindPathNodeByCoordinates(float x, float y, float z);
  25. void BuildGraph();
  26. void ShowNode(const Node &n);
  27. struct Implementation;
  28. std::unique_ptr<Implementation> m_impl;
  29. };