Files
0ad/source/simulation/PathfindEngine.h
T
Ykkrosh 5228800b73 # Fixed Linux build
Use noncopyable instead of boost::noncopyable. (But maybe this should be
changed to the NONCOPYABLE macro instead?)
Use boost::filesystem::wpath::file_string instead of
external_file_string, since the latter varies between std::string on
Linux and std::wstring on Windows.
Use wcstombs instead of wcstombs_s.
Use rtl_AllocateAligned instead of _mm_malloc.

This was SVN commit r6574.
2009-01-02 21:19:41 +00:00

80 lines
1.7 KiB
C++

// PathfindEngine.h
//
// The pathfinding engine singleton.
//
// Usage: g_Pathfinder.RequestPath( HEntity me, float x, float y );
//
// Mark Thompson mot20@cam.ac.uk / mark@wildfiregames.com
#ifndef INCLUDED_PATHFINDENGINE
#define INCLUDED_PATHFINDENGINE
#include "ps/Singleton.h"
#include "EntityHandles.h"
#include "ps/Vector2D.h"
//#include "AStarEngine.h"
#include "dcdt/se/se_dcdt.h"
#include "TRAStarEngine.h"
class TriangulationTerrainOverlay;
#define g_Pathfinder CPathfindEngine::GetSingleton()
class CEntityOrder;
enum EPathType
{
PF_STANDARD,
PF_ATTACK_MELEE,
};
class CPathfindEngine : public Singleton<CPathfindEngine>, noncopyable
{
public:
//Kai: added for dcdt
const float OABBBOUNDREDUCTION ;
const float CIRCLEBOUNDREDUCTION ;
const float RADIUSINCREMENT ;
static SrArray<SeBase*> processing;
bool dcdtInitialized;
SeDcdt dcdtPathfinder;
void initBoundary();
void insertObstacles();
void drawTriangulation();
//Kai:added tile overlay for pathfinding
TriangulationTerrainOverlay* triangulationOverlay;
CPathfindEngine();
~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 );
bool RequestAvoidPath( HEntity entity, CEntityOrder* current, float avoidRange );
void RequestTriangulationPath( HEntity entity, const CVector2D& destination, bool contact,
float radius, CEntityOrder::EOrderSource orderSource );
private:
CAStarEngineLowLevel mLowPathfinder;
CTRAStarEngine mTriangulationPathfinder;
};
#endif