1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 08:49:55 +00:00
openmw-tes3mp/apps/openmw/mwmechanics/pathfinding.hpp

31 lines
836 B
C++
Raw Normal View History

2013-03-31 17:30:03 +00:00
#ifndef GAME_MWMECHANICS_PATHFINDING_H
#define GAME_MWMECHANICS_PATHFINDING_H
#include <components/esm/loadpgrd.hpp>
#include <list>
namespace MWMechanics
{
class PathFinder
{
public:
PathFinder();
2013-03-31 17:30:03 +00:00
void clearPath();
void buildPath(ESM::Pathgrid::Point startPoint,ESM::Pathgrid::Point endPoint,
const ESM::Pathgrid* pathGrid,float xCell = 0,float yCell = 0);
2013-03-31 17:30:03 +00:00
bool checkIfNextPointReached(float x,float y,float z);//returns true if the last point of the path has been reached.
float getZAngleToNext(float x,float y,float z);
2013-03-31 17:30:03 +00:00
std::list<ESM::Pathgrid::Point> getPath();
bool isPathConstructed();
2013-03-31 17:30:03 +00:00
private:
std::list<ESM::Pathgrid::Point> mPath;
bool mIsPathConstructed;
2013-03-31 17:30:03 +00:00
};
}
#endif