UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DetourPathQueue.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2// Modified version of Recast/Detour's source file
3
4//
5// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
6//
7// This software is provided 'as-is', without any express or implied
8// warranty. In no event will the authors be held liable for any damages
9// arising from the use of this software.
10// Permission is granted to anyone to use this software for any purpose,
11// including commercial applications, and to alter it and redistribute it
12// freely, subject to the following restrictions:
13// 1. The origin of this software must not be misrepresented; you must not
14// claim that you wrote the original software. If you use this software
15// in a product, an acknowledgment in the product documentation would be
16// appreciated but is not required.
17// 2. Altered source versions must be plainly marked as such, and must not be
18// misrepresented as being the original software.
19// 3. This notice may not be removed or altered from any source distribution.
20//
21
22#ifndef DETOURPATHQUEUE_H
23#define DETOURPATHQUEUE_H
24
25#include "CoreMinimal.h"
29#include "Detour/DetourStatus.h"
31
32class dtNavMeshQuery;
33class dtQueryFilter;
35
36static const unsigned int DT_PATHQ_INVALID = 0;
37
38typedef unsigned int dtPathQueueRef;
39
41{
42 struct PathQuery
43 {
46 dtReal startPos[3], endPos[3];
47 dtPolyRef startRef, endRef;
48 dtReal costLimit;
49 unsigned char requireNavigableEndLocation : 1; // @UE
51 dtPolyRef* path;
52 const dtQueryFilter* filter;
54 int npath;
56 dtStatus status;
57 int keepAlive;
58 };
59
60 static const int MAX_QUEUE = 8;
61 PathQuery m_queue[MAX_QUEUE];
62 dtNavMeshQuery* m_navquery;
63 dtPathQueueRef m_nextHandle;
64 int m_maxPathSize;
65 int m_queueHead;
66
67 void purge();
68
69public:
72
73 bool init(const int maxPathSize, const int maxSearchNodeCount, dtNavMesh* nav);
74
75 void update(const int maxIters);
76
78 const dtReal* startPos, const dtReal* endPos, const dtReal costLimit, const bool requireNavigableEndLocation, //@UE
79 const dtQueryFilter* filter,
81
83
85
86 inline const dtNavMeshQuery* getNavQuery() const { return m_navquery; }
87
88};
89
90#endif // DETOURPATHQUEUE_H
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
double dtReal
Definition DetourLargeWorldCoordinates.h:15
unsigned int dtPathQueueRef
Definition DetourPathQueue.h:38
unsigned int dtStatus
Definition RecastGraphAStar.h:29
uint64 dtPolyRef
Definition RecastGraphAStar.h:28
Definition SharedPointer.h:692
Definition DetourNavMeshQuery.h:349
Definition DetourNavMesh.h:503
Definition DetourPathQueue.h:41
dtStatus getRequestStatus(dtPathQueueRef ref) const
Definition DetourPathQueue.cpp:174
~dtPathQueue()
Definition DetourPathQueue.cpp:35
const dtNavMeshQuery * getNavQuery() const
Definition DetourPathQueue.h:86
dtPathQueue()
Definition DetourPathQueue.cpp:25
dtStatus getPathResult(dtPathQueueRef ref, dtPolyRef *path, int *pathSize, const int maxPath)
Definition DetourPathQueue.cpp:184
dtPathQueueRef request(dtPolyRef startRef, dtPolyRef endRef, const dtReal *startPos, const dtReal *endPos, const dtReal costLimit, const bool requireNavigableEndLocation, const dtQueryFilter *filter, TSharedPtr< dtQuerySpecialLinkFilter > linkFilter)
Definition DetourPathQueue.cpp:135
void update(const int maxIters)
Definition DetourPathQueue.cpp:75
bool init(const int maxPathSize, const int maxSearchNodeCount, dtNavMesh *nav)
Definition DetourPathQueue.cpp:51
Definition DetourNavMeshQuery.h:96
Definition DetourNavMeshQuery.h:50