TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DetourNavMesh.h File Reference
#include "DetourAlloc.h"
#include "DetourStatus.h"
#include <stdint.h>
+ Include dependency graph for DetourNavMesh.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dtPoly
 
struct  dtPolyDetail
 Defines the location of detail sub-mesh data within a dtMeshTile. More...
 
struct  dtLink
 
struct  dtBVNode
 
struct  dtOffMeshConnection
 
struct  dtMeshHeader
 
struct  dtMeshTile
 
struct  dtNavMeshParams
 
class  dtNavMesh
 

Typedefs

typedef uint64_t uint64_d
 Do not rename back to uint64. Otherwise mac complains about typedef redefinition. More...
 
typedef uint64_d dtPolyRef
 
typedef uint64_d dtTileRef
 

Enumerations

enum  dtTileFlags { DT_TILE_FREE_DATA = 0x01 }
 
enum  dtStraightPathFlags { DT_STRAIGHTPATH_START = 0x01, DT_STRAIGHTPATH_END = 0x02, DT_STRAIGHTPATH_OFFMESH_CONNECTION = 0x04 }
 Vertex flags returned by dtNavMeshQuery::findStraightPath. More...
 
enum  dtStraightPathOptions { DT_STRAIGHTPATH_AREA_CROSSINGS = 0x01, DT_STRAIGHTPATH_ALL_CROSSINGS = 0x02 }
 Options for dtNavMeshQuery::findStraightPath. More...
 
enum  dtFindPathOptions { DT_FINDPATH_LOW_QUALITY_FAR = 0x01, DT_FINDPATH_ANY_ANGLE = 0x02 }
 Options for dtNavMeshQuery::findPath. More...
 
enum  dtRaycastOptions { DT_RAYCAST_USE_COSTS = 0x01 }
 Options for dtNavMeshQuery::raycast. More...
 
enum  dtPolyTypes { DT_POLYTYPE_GROUND = 0, DT_POLYTYPE_OFFMESH_CONNECTION = 1 }
 Flags representing the type of a navigation mesh polygon. More...
 

Functions

dtNavMeshdtAllocNavMesh ()
 
void dtFreeNavMesh (dtNavMesh *navmesh)
 

Variables

static const int DT_VERTS_PER_POLYGON = 6
 
static const unsigned short DT_EXT_LINK = 0x8000
 
static const unsigned int DT_NULL_LINK = 0xffffffff
 A value that indicates the entity does not link to anything. More...
 
static const unsigned int DT_OFFMESH_CON_BIDIR = 1
 A flag that indicates that an off-mesh connection can be traversed in both directions. (Is bidirectional.) More...
 
static const int DT_MAX_AREAS = 64
 
static const int STATIC_SALT_BITS = 12
 
static const int STATIC_TILE_BITS = 21
 
static const int STATIC_POLY_BITS = 31
 
static const float DT_RAY_CAST_LIMIT_PROPORTIONS = 50.0f
 
Tile Serialization Constants

These constants are used to detect whether a navigation tile's data and state format is compatible with the current build.

static const int DT_NAVMESH_MAGIC = 'D'<<24 | 'N'<<16 | 'A'<<8 | 'V'
 A magic number used to detect compatibility of navigation tile data. More...
 
static const int DT_NAVMESH_VERSION = 7
 A version number used to detect compatibility of navigation tile data. More...
 
static const int DT_NAVMESH_STATE_MAGIC = 'D'<<24 | 'N'<<16 | 'M'<<8 | 'S'
 A magic number used to detect the compatibility of navigation tile states. More...
 
static const int DT_NAVMESH_STATE_VERSION = 1
 A version number used to detect compatibility of navigation tile states. More...
 

Typedef Documentation

typedef uint64_t uint64_d

Do not rename back to uint64. Otherwise mac complains about typedef redefinition.

Enumeration Type Documentation

Options for dtNavMeshQuery::findPath.

Enumerator
DT_FINDPATH_LOW_QUALITY_FAR 

[provisional] trade quality for performance far from the origin. The idea is that by then a new query will be issued

DT_FINDPATH_ANY_ANGLE 

use raycasts during pathfind to "shortcut" (raycast still consider costs)

125 {
127  DT_FINDPATH_ANY_ANGLE = 0x02,
128 };
[provisional] trade quality for performance far from the origin. The idea is that by then a new query...
Definition: DetourNavMesh.h:126
use raycasts during pathfind to "shortcut" (raycast still consider costs)
Definition: DetourNavMesh.h:127

Flags representing the type of a navigation mesh polygon.

Enumerator
DT_POLYTYPE_GROUND 

The polygon is a standard convex polygon that is part of the surface of the mesh.

DT_POLYTYPE_OFFMESH_CONNECTION 

The polygon is an off-mesh connection consisting of two vertices.

143 {
145  DT_POLYTYPE_GROUND = 0,
148 };
The polygon is an off-mesh connection consisting of two vertices.
Definition: DetourNavMesh.h:147
The polygon is a standard convex polygon that is part of the surface of the mesh. ...
Definition: DetourNavMesh.h:145

Options for dtNavMeshQuery::raycast.

Enumerator
DT_RAYCAST_USE_COSTS 

Raycast should calculate movement cost along the ray and fill RaycastHit::cost.

132 {
133  DT_RAYCAST_USE_COSTS = 0x01,
134 };
Raycast should calculate movement cost along the ray and fill RaycastHit::cost.
Definition: DetourNavMesh.h:133

Vertex flags returned by dtNavMeshQuery::findStraightPath.

Enumerator
DT_STRAIGHTPATH_START 

The vertex is the start position in the path.

DT_STRAIGHTPATH_END 

The vertex is the end position in the path.

DT_STRAIGHTPATH_OFFMESH_CONNECTION 

The vertex is the start of an off-mesh connection.

109 {
110  DT_STRAIGHTPATH_START = 0x01,
111  DT_STRAIGHTPATH_END = 0x02,
113 };
The vertex is the start position in the path.
Definition: DetourNavMesh.h:110
The vertex is the end position in the path.
Definition: DetourNavMesh.h:111
The vertex is the start of an off-mesh connection.
Definition: DetourNavMesh.h:112

Options for dtNavMeshQuery::findStraightPath.

Enumerator
DT_STRAIGHTPATH_AREA_CROSSINGS 

Add a vertex at every polygon edge crossing where area changes.

DT_STRAIGHTPATH_ALL_CROSSINGS 

Add a vertex at every polygon edge crossing.

117 {
120 };
Add a vertex at every polygon edge crossing.
Definition: DetourNavMesh.h:119
Add a vertex at every polygon edge crossing where area changes.
Definition: DetourNavMesh.h:118

Tile flags used for various functions and fields. For an example, see dtNavMesh::addTile().

Enumerator
DT_TILE_FREE_DATA 

The navigation mesh owns the tile memory and is responsible for freeing it.

102 {
104  DT_TILE_FREE_DATA = 0x01,
105 };
The navigation mesh owns the tile memory and is responsible for freeing it.
Definition: DetourNavMesh.h:104

Variable Documentation

const unsigned short DT_EXT_LINK = 0x8000
static

A flag that indicates that an entity links to an external entity. (E.g. A polygon edge is a portal that links to another polygon.)

const int DT_NAVMESH_MAGIC = 'D'<<24 | 'N'<<16 | 'A'<<8 | 'V'
static

A magic number used to detect compatibility of navigation tile data.

const int DT_NAVMESH_STATE_MAGIC = 'D'<<24 | 'N'<<16 | 'M'<<8 | 'S'
static

A magic number used to detect the compatibility of navigation tile states.

const int DT_NAVMESH_STATE_VERSION = 1
static

A version number used to detect compatibility of navigation tile states.

const int DT_NAVMESH_VERSION = 7
static

A version number used to detect compatibility of navigation tile data.

const unsigned int DT_NULL_LINK = 0xffffffff
static

A value that indicates the entity does not link to anything.

const unsigned int DT_OFFMESH_CON_BIDIR = 1
static

A flag that indicates that an off-mesh connection can be traversed in both directions. (Is bidirectional.)

const float DT_RAY_CAST_LIMIT_PROPORTIONS = 50.0f
static

Limit raycasting during any angle pahfinding The limit is given as a multiple of the character radius

const int STATIC_POLY_BITS = 31
static
const int STATIC_SALT_BITS = 12
static
const int STATIC_TILE_BITS = 21
static