1
1
forked from 0ad/0ad
0ad/source/simulation/PathfindEngine.h
Matei aa50820d9a #Unit AI: Aggressive, defensive and stand ground stances.
Also split Entity.cpp further, moving the rendering code to
EntityRendering.cpp and the JS interface code to
EntityScriptInterface.cpp. This makes each individual file smaller
(about 1000 lines still!) and lets them be compiled independently.

This was SVN commit r4314.
2006-09-09 00:00:23 +00:00

47 lines
1.0 KiB
C++

// PathfindEngine.h
//
// Mark Thompson mot20@cam.ac.uk / mark@wildfiregames.com
//
// The pathfinding engine singleton.
//
// Usage: g_Pathfinder.requestPath( HEntity me, float x, float y );
//
// Mark Thompson mot20@cam.ac.uk / mark@wildfiregames.com
#ifndef PATHFIND_ENGINE_INCLUDED
#define PATHFIND_ENGINE_INCLUDED
#include "ps/Singleton.h"
#include "EntityHandles.h"
#include "ps/Vector2D.h"
#include "AStarEngine.h"
#define g_Pathfinder CPathfindEngine::GetSingleton()
class CEntityOrder;
enum EPathType
{
PF_STANDARD,
PF_ATTACK_MELEE,
};
class CPathfindEngine : public Singleton<CPathfindEngine>
{
public:
CPathfindEngine();
void requestPath( HEntity entity, const CVector2D& destination,
CEntityOrder::EOrderSource orderSource );
void requestLowLevelPath( HEntity entity, const CVector2D& destination, bool contact,
float radius, CEntityOrder::EOrderSource orderSource );
void requestContactPath( HEntity entity, CEntityOrder* current, float range );
private:
CAStarEngineLowLevel mLowPathfinder;
};
#endif