TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DetourNavMeshBuilder.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2009-2010 Mikko Mononen [email protected]
3 //
4 // This software is provided 'as-is', without any express or implied
5 // warranty. In no event will the authors be held liable for any damages
6 // arising from the use of this software.
7 // Permission is granted to anyone to use this software for any purpose,
8 // including commercial applications, and to alter it and redistribute it
9 // freely, subject to the following restrictions:
10 // 1. The origin of this software must not be misrepresented; you must not
11 // claim that you wrote the original software. If you use this software
12 // in a product, an acknowledgment in the product documentation would be
13 // appreciated but is not required.
14 // 2. Altered source versions must be plainly marked as such, and must not be
15 // misrepresented as being the original software.
16 // 3. This notice may not be removed or altered from any source distribution.
17 //
18 
19 #ifndef DETOURNAVMESHBUILDER_H
20 #define DETOURNAVMESHBUILDER_H
21 
22 #include "DetourAlloc.h"
23 
27 {
28 
33 
34  const unsigned short* verts;
35  int vertCount;
36  const unsigned short* polys;
37  const unsigned short* polyFlags;
38  const unsigned char* polyAreas;
39  int polyCount;
40  int nvp;
41 
46 
47  const unsigned int* detailMeshes;
48  const float* detailVerts;
50  const unsigned char* detailTris;
52 
59 
61  const float* offMeshConVerts;
63  const float* offMeshConRad;
65  const unsigned short* offMeshConFlags;
67  const unsigned char* offMeshConAreas;
72  const unsigned char* offMeshConDir;
74  const unsigned int* offMeshConUserID;
77 
82 
83  unsigned int userId;
84  int tileX;
85  int tileY;
86  int tileLayer;
87  float bmin[3];
88  float bmax[3];
89 
93 
96  float walkableClimb;
97  float cs;
98  float ch;
99 
103 
105 };
106 
113 bool dtCreateNavMeshData(dtNavMeshCreateParams* params, unsigned char** outData, int* outDataSize);
114 
118 bool dtNavMeshHeaderSwapEndian(unsigned char* data, const int dataSize);
119 
123 bool dtNavMeshDataSwapEndian(unsigned char* data, const int dataSize);
124 
125 #endif // DETOURNAVMESHBUILDER_H
126 
127 // This section contains detailed documentation for members that don't have
128 // a source file. It reduces clutter in the main section of the header.
129 
int tileLayer
The tile's layer within the layered destination mesh. Limit: >= 0
Definition: DetourNavMeshBuilder.h:86
float cs
The xz-plane cell size of the polygon mesh. [Limit: > 0] [Unit: wu].
Definition: DetourNavMeshBuilder.h:97
const unsigned char * offMeshConDir
Definition: DetourNavMeshBuilder.h:72
const unsigned char * polyAreas
The user defined area ids assigned to each polygon. [Size: polyCount].
Definition: DetourNavMeshBuilder.h:38
const float * offMeshConVerts
Off-mesh connection vertices. [(ax, ay, az, bx, by, bz) * offMeshConCount] [Unit: wu]...
Definition: DetourNavMeshBuilder.h:61
const unsigned short * polys
The polygon data. [Size: polyCount * 2 * nvp].
Definition: DetourNavMeshBuilder.h:36
int nvp
Number maximum number of vertices per polygon. [Limit: >= 3].
Definition: DetourNavMeshBuilder.h:40
float walkableHeight
The agent height. [Unit: wu].
Definition: DetourNavMeshBuilder.h:94
Definition: DetourNavMeshBuilder.h:26
const unsigned char * detailTris
The detail mesh triangles. [Size: 4 * detailTriCount].
Definition: DetourNavMeshBuilder.h:50
float ch
The y-axis cell height of the polygon mesh. [Limit: > 0] [Unit: wu].
Definition: DetourNavMeshBuilder.h:98
float bmax[3]
The maximum bounds of the tile. [(x, y, z)] [Unit: wu].
Definition: DetourNavMeshBuilder.h:88
float walkableClimb
The agent maximum traversable ledge. (Up/Down) [Unit: wu].
Definition: DetourNavMeshBuilder.h:96
unsigned int userId
The user defined id of the tile.
Definition: DetourNavMeshBuilder.h:83
const unsigned short * offMeshConFlags
User defined flags assigned to the off-mesh connections. [Size: offMeshConCount]. ...
Definition: DetourNavMeshBuilder.h:65
bool buildBvTree
Definition: DetourNavMeshBuilder.h:102
int detailTriCount
The number of triangles in the detail mesh.
Definition: DetourNavMeshBuilder.h:51
bool dtNavMeshDataSwapEndian(unsigned char *data, const int dataSize)
Definition: DetourNavMeshBuilder.cpp:687
int offMeshConCount
The number of off-mesh connections. [Limit: >= 0].
Definition: DetourNavMeshBuilder.h:76
bool dtCreateNavMeshData(dtNavMeshCreateParams *params, unsigned char **outData, int *outDataSize)
Definition: DetourNavMeshBuilder.cpp:254
const unsigned short * verts
The polygon mesh vertices. [(x, y, z) * vertCount] [Unit: vx].
Definition: DetourNavMeshBuilder.h:34
float bmin[3]
The minimum bounds of the tile. [(x, y, z)] [Unit: wu].
Definition: DetourNavMeshBuilder.h:87
float walkableRadius
The agent radius. [Unit: wu].
Definition: DetourNavMeshBuilder.h:95
bool dtNavMeshHeaderSwapEndian(unsigned char *data, const int dataSize)
Definition: DetourNavMeshBuilder.cpp:635
const float * detailVerts
The detail mesh vertices. [Size: 3 * detailVertsCount] [Unit: wu].
Definition: DetourNavMeshBuilder.h:48
int tileY
The tile's y-grid location within the multi-tile desitation mesh. (Along the z-axis.)
Definition: DetourNavMeshBuilder.h:85
int polyCount
Number of polygons in the mesh. [Limit: >= 1].
Definition: DetourNavMeshBuilder.h:39
const unsigned int * detailMeshes
The height detail sub-mesh data. [Size: 4 * polyCount].
Definition: DetourNavMeshBuilder.h:47
int tileX
The tile's x-grid location within the multi-tile destination mesh. (Along the x-axis.)
Definition: DetourNavMeshBuilder.h:84
const unsigned short * polyFlags
The user defined flags assigned to each polygon. [Size: polyCount].
Definition: DetourNavMeshBuilder.h:37
int vertCount
The number vertices in the polygon mesh. [Limit: >= 3].
Definition: DetourNavMeshBuilder.h:35
const float * offMeshConRad
Off-mesh connection radii. [Size: offMeshConCount] [Unit: wu].
Definition: DetourNavMeshBuilder.h:63
const unsigned int * offMeshConUserID
The user defined ids of the off-mesh connection. [Size: offMeshConCount].
Definition: DetourNavMeshBuilder.h:74
std::set< uint32 > params[2]
Definition: DisableMgr.cpp:45
int detailVertsCount
The number of vertices in the detail mesh.
Definition: DetourNavMeshBuilder.h:49
const unsigned char * offMeshConAreas
User defined area ids assigned to the off-mesh connections. [Size: offMeshConCount].
Definition: DetourNavMeshBuilder.h:67