UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DetourNavMeshBuilder.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 DETOURNAVMESHBUILDER_H
23#define DETOURNAVMESHBUILDER_H
24
25#include "CoreMinimal.h"
26#include "Detour/DetourAlloc.h"
28
30{
41 unsigned long long int userID;
43 unsigned short polyFlag;
45 unsigned char area;
47 unsigned char type;
48};
49
50// @todo: This appears unused
61
65{
66
71
72 const unsigned short* verts;
74 const unsigned short* polys;
75 const unsigned short* polyFlags;
76 const unsigned char* polyAreas;
78 int nvp;
79
80 // @UE BEGIN
81#if WITH_NAVMESH_CLUSTER_LINKS
85 unsigned short* polyClusters;
86 unsigned short clusterCount;
87#endif // WITH_NAVMESH_CLUSTER_LINKS
88 // @UE END
89
94
95 const unsigned int* detailMeshes;
98 const unsigned char* detailTris;
100
107
112
117
119 const dtDynamicAreaCreateParams* dynamicAreas; // @todo: this appears unused
122
123
128
129 unsigned int userId;
130 int tileX;
131 int tileY;
135
139
145
146 unsigned char tileResolutionLevel;
147
151
153};
154
161NAVMESH_API bool dtCreateNavMeshData(dtNavMeshCreateParams* params, unsigned char** outData, int* outDataSize);
162
166NAVMESH_API bool dtNavMeshHeaderSwapEndian(unsigned char* data, const int dataSize);
167
171NAVMESH_API bool dtNavMeshDataSwapEndian(unsigned char* data, const int dataSize);
172
173// @UE BEGIN
182NAVMESH_API bool dtTransformTileData(unsigned char* data, const int dataSize, const int offsetX, const int offsetY, const dtReal tileWidth, const dtReal tileHeight, const dtReal rotationDeg, const dtReal bvQuantFactor);
183
192NAVMESH_API void dtComputeTileOffsetFromRotation(const dtReal* position, const dtReal* rotationCenter, const dtReal rotationDeg, const dtReal tileWidth, const dtReal tileHeight, int& deltaX, int& deltaY);
193// @UE END
194
195#endif // DETOURNAVMESHBUILDER_H
196
197// This section contains detailed documentation for members that don't have
198// a source file. It reduces clutter in the main section of the header.
199
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
double dtReal
Definition DetourLargeWorldCoordinates.h:15
NAVMESH_API bool dtTransformTileData(unsigned char *data, const int dataSize, const int offsetX, const int offsetY, const dtReal tileWidth, const dtReal tileHeight, const dtReal rotationDeg, const dtReal bvQuantFactor)
Definition DetourNavMeshBuilder.cpp:1047
NAVMESH_API bool dtNavMeshDataSwapEndian(unsigned char *data, const int dataSize)
Definition DetourNavMeshBuilder.cpp:907
NAVMESH_API bool dtNavMeshHeaderSwapEndian(unsigned char *data, const int dataSize)
Definition DetourNavMeshBuilder.cpp:851
NAVMESH_API void dtComputeTileOffsetFromRotation(const dtReal *position, const dtReal *rotationCenter, const dtReal rotationDeg, const dtReal tileWidth, const dtReal tileHeight, int &deltaX, int &deltaY)
Definition DetourNavMeshBuilder.cpp:1230
A simple dynamic array of integers.
Definition DetourAlloc.h:168
NAVMESH_API bool dtCreateNavMeshData(dtNavMeshCreateParams *params, unsigned char **outData, int *outDataSize)
Definition DetourNavMeshBuilder.cpp:279
Definition DetourNavMeshBuilder.h:52
dtReal minH
Covex min,max height.
Definition DetourNavMeshBuilder.h:56
dtChunkArray< dtReal > verts
X,Z coords of covex.
Definition DetourNavMeshBuilder.h:59
dtReal maxH
Definition DetourNavMeshBuilder.h:57
unsigned char area
Area id.
Definition DetourNavMeshBuilder.h:54
Definition DetourNavMeshBuilder.h:65
const unsigned short * verts
The polygon mesh vertices. [(x, y, z) * vertCount] [Unit: vx].
Definition DetourNavMeshBuilder.h:72
const dtReal * detailVerts
The detail mesh vertices. [Size: 3 * detailVertsCount] [Unit: wu].
Definition DetourNavMeshBuilder.h:96
dtReal walkableRadius
The agent radius. [Unit: wu].
Definition DetourNavMeshBuilder.h:141
const unsigned int * detailMeshes
The height detail sub-mesh data. [Size: 4 * polyCount].
Definition DetourNavMeshBuilder.h:95
int detailTriCount
The number of triangles in the detail mesh.
Definition DetourNavMeshBuilder.h:99
const dtDynamicAreaCreateParams * dynamicAreas
Dynamic Area data. [Size: dynamicAreaCount] [Unit: wu].
Definition DetourNavMeshBuilder.h:119
const unsigned short * polys
The polygon data. [Size: polyCount * 2 * nvp].
Definition DetourNavMeshBuilder.h:74
bool buildBvTree
Definition DetourNavMeshBuilder.h:150
const unsigned char * detailTris
The detail mesh triangles. [Size: 4 * detailTriCount].
Definition DetourNavMeshBuilder.h:98
int dynamicAreaCount
The number of dynamic areas. [Limit: >= 0].
Definition DetourNavMeshBuilder.h:121
unsigned char tileResolutionLevel
Tile resolution index //@UE.
Definition DetourNavMeshBuilder.h:146
dtReal cs
The xz-plane cell size of the polygon mesh. [Limit: > 0] [Unit: wu].
Definition DetourNavMeshBuilder.h:143
int tileLayer
The tile's layer within the layered destination mesh. (Along the y-axis.) [Limit: >= 0].
Definition DetourNavMeshBuilder.h:132
int vertCount
The number vertices in the polygon mesh. [Limit: >= 3].
Definition DetourNavMeshBuilder.h:73
const unsigned short * polyFlags
The user defined flags assigned to each polygon. [Size: polyCount].
Definition DetourNavMeshBuilder.h:75
const unsigned char * polyAreas
The user defined area ids assigned to each polygon. [Size: polyCount].
Definition DetourNavMeshBuilder.h:76
dtReal bmax[3]
The maximum bounds of the tile. [(x, y, z)] [Unit: wu].
Definition DetourNavMeshBuilder.h:134
dtReal walkableClimb
The agent maximum traversable ledge. (Up/Down) [Unit: wu].
Definition DetourNavMeshBuilder.h:142
int nvp
Number maximum number of vertices per polygon. [Limit: >= 3].
Definition DetourNavMeshBuilder.h:78
dtReal bmin[3]
The minimum bounds of the tile. [(x, y, z)] [Unit: wu].
Definition DetourNavMeshBuilder.h:133
int tileX
The tile's x-grid location within the multi-tile destination mesh. (Along the x-axis....
Definition DetourNavMeshBuilder.h:130
dtReal ch
The y-axis cell height of the polygon mesh. [Limit: > 0] [Unit: wu].
Definition DetourNavMeshBuilder.h:144
dtReal walkableHeight
The agent height. [Unit: wu].
Definition DetourNavMeshBuilder.h:140
int polyCount
Number of polygons in the mesh. [Limit: >= 1].
Definition DetourNavMeshBuilder.h:77
int offMeshConCount
The number of off-mesh connections. [Limit: >= 0].
Definition DetourNavMeshBuilder.h:111
unsigned int userId
The user defined id of the tile.
Definition DetourNavMeshBuilder.h:129
int detailVertsCount
The number of vertices in the detail mesh.
Definition DetourNavMeshBuilder.h:97
const dtOffMeshLinkCreateParams * offMeshCons
Off-mesh connection data. [Size: offMeshConCount] [Unit: wu].
Definition DetourNavMeshBuilder.h:109
int tileY
The tile's y-grid location within the multi-tile desitation mesh. (Along the z-axis....
Definition DetourNavMeshBuilder.h:131
Definition DetourNavMeshBuilder.h:30
unsigned char type
Off-mesh connection type (point to point, segment to segment, bidirectional)
Definition DetourNavMeshBuilder.h:47
dtReal vertsA0[3]
Off-mesh connection vertices (point-point = A0 <> B0, segment-segment = A0-A1 <> B0-B1 ) [Unit: wu].
Definition DetourNavMeshBuilder.h:32
dtReal vertsB0[3]
Definition DetourNavMeshBuilder.h:34
unsigned char area
User defined area ids assigned to the off-mesh connections.
Definition DetourNavMeshBuilder.h:45
dtReal snapHeight
Off-mesh connection height, less than 0 = use step height [Unit: wu].
Definition DetourNavMeshBuilder.h:39
dtReal snapRadius
Off-mesh connection radii. [Unit: wu].
Definition DetourNavMeshBuilder.h:37
dtReal vertsA1[3]
Definition DetourNavMeshBuilder.h:33
unsigned long long int userID
The user defined ids of the off-mesh connection.
Definition DetourNavMeshBuilder.h:41
dtReal vertsB1[3]
Definition DetourNavMeshBuilder.h:35
unsigned short polyFlag
User defined flags assigned to the polys of off-mesh connections.
Definition DetourNavMeshBuilder.h:43