13 #include "../FastRandom.h"
14 #ifdef COMPILING_PATHFIND_DEBUGGER
17 #include "PathFinderIrrlicht_Head.h"
82 const Vector3d & a_StartingPoint,
const Vector3d & a_EndingPoint,
int a_MaxSteps,
83 double a_BoundingBoxWidth,
double a_BoundingBoxHeight
174 std::unordered_map<Vector3i, cPathCell, VectorHasher<int>>
m_Map;
202 #ifdef COMPILING_PATHFIND_DEBUGGER
203 #include "../path_irrlicht.cpp"
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
unsigned char BLOCKTYPE
The datatype used by blockdata.
Vector3< double > Vector3d
The pathfinder has 3 types of cells (cPathCell).
bool operator()(cPathCell *&a_V1, cPathCell *&a_V2)
cPath(const cPath &a_other)=delete
delete default constructors
cPathCell * m_NearestPointToTarget
bool ProcessIfWalkable(const Vector3i &a_Location, cPathCell *a_Source, int a_Cost)
cPath & operator=(const cPath &a_other)=delete
bool IsFirstPoint() const
Returns true if GetNextPoint() was never called for this Path.
bool BodyFitsIn(const Vector3i &a_Location, const Vector3i &a_Source)
bool NoMoreWayPoints() const
Checks if we have no more waypoints to return.
cPath & operator=(cPath &&a_other)=delete
void AttemptToFindAlternative()
cPathCell * GetCell(const Vector3i &a_location)
void ProcessCell(cPathCell *a_Cell, cPathCell *a_Caller, int a_GDelta)
bool HasSolidBelow(const Vector3i &a_Location)
std::unordered_map< Vector3i, cPathCell, VectorHasher< int > > m_Map
bool IsWalkable(const Vector3i &a_Location, const Vector3i &a_Source)
void OpenListAdd(cPathCell *a_Cell)
cPath(cPath &&a_other)=delete
ePathFinderStatus m_Status
cPathCell * OpenListPop()
bool IsValid() const
Returns true if this path is properly initialized.
void FillCellAttributes(cPathCell &a_Cell)
bool BlockTypeIsSpecial(BLOCKTYPE a_Type)
Vector3d GetNextPoint()
Returns the next point in the path.
std::priority_queue< cPathCell *, std::vector< cPathCell * >, compareHeuristics > m_OpenList
size_t WayPointsLeft() const
The amount of waypoints left to return.
std::vector< Vector3i > m_PathPoints
cPath()
Creates an invalid path which is not usable.
Vector3i AcceptNearbyPath()
Called after the PathFinder's step returns NEARBY_FOUND.
ePathFinderStatus CalculationStep(cChunk &a_Chunk)
Performs part of the path calculation and returns the appropriate status.
bool SpecialIsSolidFromThisDirection(BLOCKTYPE a_Type, NIBBLETYPE a_Meta, const Vector3i &a_Direction)