UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DetourLocalBoundary.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 DETOURLOCALBOUNDARY_H
23#define DETOURLOCALBOUNDARY_H
24
25#include "CoreMinimal.h"
28
29class dtNavMeshQuery;
30class dtQueryFilter;
32
34{
35 static const int MAX_LOCAL_SEGS = 8;
36 static const int MAX_LOCAL_POLYS = 16;
37
38 struct Segment
39 {
40 dtReal s[6];
41 dtReal d;
42 int flags;
43 };
44
45 dtPolyRef m_polys[MAX_LOCAL_POLYS];
46 dtReal m_center[3];
47 Segment m_segs[MAX_LOCAL_SEGS];
48 int m_nsegs;
49 int m_npolys;
50
51 NAVMESH_API void addSegment(const dtReal dist, const dtReal* seg, int flags = 0);
52
53public:
56
57 NAVMESH_API void reset();
58
59 // [UE: new sections: link removal, path corridor, direction]
60 NAVMESH_API void update(dtPolyRef ref, const dtReal* pos, const dtReal collisionQueryRange,
61 const bool bIgnoreAtEnd, const dtReal* endPos,
62 const dtPolyRef* path, const int npath,
63 const dtReal* moveDir,
64 dtNavMeshQuery* navquery, const dtQueryFilter* filter);
65
67 const dtReal* pos, const dtReal collisionQueryRange,
68 const bool bIgnoreAtEnd, const dtReal* endPos,
69 const dtPolyRef* path, const int npath, const dtReal* moveDir,
70 dtNavMeshQuery* navquery, const dtQueryFilter* filter);
71
73
74 inline const dtReal* getCenter() const { return m_center; }
75 inline int getSegmentCount() const { return m_nsegs; }
76 inline const dtReal* getSegment(int i) const { return m_segs[i].s; }
77 inline const int getSegmentFlags(int i) const { return m_segs[i].flags; }
78};
79
80#endif // DETOURLOCALBOUNDARY_H
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
double dtReal
Definition DetourLargeWorldCoordinates.h:15
uint64 dtPolyRef
Definition RecastGraphAStar.h:28
Definition DetourLocalBoundary.h:34
int getSegmentCount() const
Definition DetourLocalBoundary.h:75
NAVMESH_API void reset()
Definition DetourLocalBoundary.cpp:38
const int getSegmentFlags(int i) const
Definition DetourLocalBoundary.h:77
NAVMESH_API void update(dtPolyRef ref, const dtReal *pos, const dtReal collisionQueryRange, const bool bIgnoreAtEnd, const dtReal *endPos, const dtPolyRef *path, const int npath, const dtReal *moveDir, dtNavMeshQuery *navquery, const dtQueryFilter *filter)
Definition DetourLocalBoundary.cpp:109
const dtReal * getSegment(int i) const
Definition DetourLocalBoundary.h:76
NAVMESH_API ~dtLocalBoundary()
Definition DetourLocalBoundary.cpp:34
const dtReal * getCenter() const
Definition DetourLocalBoundary.h:74
NAVMESH_API dtLocalBoundary()
Definition DetourLocalBoundary.cpp:27
NAVMESH_API bool isValid(dtNavMeshQuery *navquery, const dtQueryFilter *filter)
Definition DetourLocalBoundary.cpp:245
Definition DetourNavMeshQuery.h:349
Definition DetourNavMeshQuery.h:96
Definition DetourSharedBoundary.h:37