Detour

Windows
MacOS
Linux

Classes

Name

Description

Public struct

dtBVNode

Bounding volume node. @note This structure is rarely if ever used by the end user.

Public class

dtChunkArray

A simple dynamic array of integers.

Public struct

dtDynamicAreaCreateParams

Public class

dtIntArray

A simple dynamic array of integers.

Public struct

dtLink

Defines a link between polygons. @note This structure is rarely if ever used by the end user.

Public struct

dtMeshHeader

Provides high level information related to a dtMeshTile object.

Public struct

dtMeshTile

Defines a navigation mesh tile.

Public class

dtNavMesh

A navigation mesh based on tiles of convex polygons.

Public struct

dtNavMeshCreateParams

Represents the source data used to build an navigation mesh tile.

Public struct

dtNavMeshParams

Configuration parameters used to define multi-tile navigation meshes.

Public class

dtNavMeshQuery

Provides the ability to perform pathfinding related queries against a navigation mesh.

Public struct

dtNode

Public class

dtNodePool

Public class

dtNodeQueue

Public struct

dtOffMeshConnection

Defines an navigation mesh off-mesh connection within a dtMeshTile object.

Public struct

dtOffMeshLinkCreateParams

Copyright Epic Games, Inc.

Public struct

dtPoly

Defines a polyogn within a dtMeshTile object.

Public struct

dtPolyDetail

Defines the location of detail sub-mesh data within a dtMeshTile.

Public class

dtQueryFilter

Defines polygon filtering and traversal costs for navigation mesh query operations.

Public struct

dtQueryFilterData

[UE4: moved all filter variables to struct, DO NOT mess with virtual functions here!]

Public struct

dtQueryResult

Public struct

dtQueryResultPack

Public struct

dtQuerySpecialLinkFilter

By default dtQueryFilter will use virtual calls.

Public class

dtScopedDelete

A simple helper class used to delete an array when it goes out of scope.

Public struct

ReadTilesHelper

BEGIN: helper for reading tiles

Constants

Name

Description

DT_BUFFER_TOO_SMALL

DT_CONNECTION_INTERNAL

Flags use to annotate [dtLink::side](API\Runtime\Navmesh\Detour\dtLink\side) with addotional data

DT_EXT_LINK

A flag that indicates that an entity links to an external entity.

DT_FAILURE

High level status.

DT_IN_PROGRESS

DT_INVALID_CYCLE_PATH

DT_INVALID_PARAM

DT_LINK_FLAG_OFFMESH_CON

DT_LINK_FLAG_OFFMESH_CON_BACKTRACKER

DT_LINK_FLAG_OFFMESH_CON_BIDIR

DT_LINK_FLAG_OFFMESH_CON_ENABLED

DT_LINK_FLAG_SIDE_MASK

DT_MAX_AREAS

The maximum number of user defined area ids.

DT_MIN_SALT_BITS

Navmesh tiles' salt will have at least this much bits.

DT_NAVMESH_MAGIC

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

DT_NAVMESH_STATE_MAGIC

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

DT_NAVMESH_STATE_VERSION

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

DT_NAVMESH_VERSION

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

DT_NULL_IDX

DT_NULL_LINK

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

DT_OFFMESH_CON_BIDIR

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

DT_OFFMESH_CON_CHEAPAREA

DT_OFFMESH_CON_POINT

DT_OFFMESH_CON_SEGMENT

DT_OUT_OF_MEMORY

DT_OUT_OF_NODES

DT_PARTIAL_RESULT

DT_SALT_BASE

DT_STATUS_DETAIL_MASK

Detail information for status.

DT_SUCCESS

DT_VERTS_PER_POLYGON

The maximum number of vertices per navigation polygon.

DT_WRONG_MAGIC

DT_WRONG_VERSION

Typedefs

Name

Description

dtAllocFunc

A memory allocation function.

dtClusterRef

A handle to a cluster within a navigation mesh tile.

dtFreeFunc

A memory deallocation function.

dtNodeIndex

dtPolyRef

A handle to a polygon within a navigation mesh tile.

dtStatus

Copyright Epic Games, Inc.

dtTileRef

A handle to a tile within a navigation mesh.

UE4Type_uint64

Enums

Name

Description

Public enum

dtAllocHint

Copyright Epic Games, Inc.

Public enum

dtNodeFlags

Copyright Epic Games, Inc.

Public enum

dtPolyTypes

Flags representing the type of a navigation mesh polygon.

Public enum

dtRotation

BEGIN

Public enum

dtStraightPathFlags

Vertex flags returned by dtNavMeshQuery::findStraightPath.

Public enum

dtStraightPathOptions

Options for dtNavMeshQuery::findStraightPath.

Public enum

dtTileFlags

Tile flags used for various functions and fields.

Functions

Name Description

Public function

T

 

dtAbs

(
    T a
)

Returns the absolute value.

Public function

int

 

dtAlign4

(
    int x
)

Public function

void *

 

dtAlloc

(
    int size,
    dtAllocHint hint
)

Allocates a memory block.

Public function

dtNavMesh &#...

 

dtAllocNavMesh()

Allocates a navigation mesh object using the Detour allocator.

Public function

dtNavMeshQue...

 

dtAllocNavMeshQuery()

Allocates a query object using the Detour allocator.

Public function

void

 

dtAllocSetCustom

(
    dtAllocFunc* allocFunc,
    dtFreeFunc* freeFunc
)

Sets the base custom allocation functions to be used by Detour.

Public function

void

 

dtCalcPolyCenter

(
    float* tc,
    const unsigned short* idx,
    int nidx,
    const float* verts
)

Derives the centroid of a convex polygon.

Public function

T

 

dtClamp

(
    T v,
    T mn,
    T mx
)

Clamps the value to the specified range.

Public function

bool

 

dtClosestHeightPointTriangle

(
    const float* p,
    const float* a,
    const float* b,
    const float* c,
    float& h
)

Derives the y-axis height of the closest point on the triangle from the specified reference point.

Public function

void

 

dtClosestPtPointTriangle

(
    float* closest,
    const float* p,
    const float* a,
    const float* b,
    const float* c
)

Derives the closest point on a triangle from the specified reference point.

Public function

void

 

dtComputeTileOffsetFromRotation

(
    const float* position,
    const float* rotationCenter,
    const float rotationDeg,
    const float tileWidth,
    const float tileHeight,
    int& deltaX,
    int& deltaY
)

Compute XY offset caused by the given rotation

Public function

bool

 

dtCreateNavMeshData

(
    dtNavMeshCreateParams* params,
    unsigned char** outData,
    int* outDataSize
)

Builds navigation mesh tile data from the provided tile creation data.

Public function

bool

 

dtDistancePtPolyEdgesSqr

(
    const float* pt,
    const float* verts,
    const int nverts,
    float* ed,
    float* et
)

Public function

float

 

dtDistancePtSegSqr

(
    const float* pt,
    const float* p,
    const float* q
)

Public function

float

 

dtDistancePtSegSqr2D

(
    const float* pt,
    const float* p,
    const float* q,
    float& t
)

Public function

void

 

dtFree

(
    void* ptr
)

Deallocates a memory block.

Public function

void

 

dtFreeNavMesh

(
    dtNavMesh* navmesh
)

Frees the specified navigation mesh object using the Detour allocator.

Public function

void

 

dtFreeNavMeshQuery

(
    dtNavMeshQuery* query
)

Frees the specified query object using the Detour allocator.

Public function

unsigned int

 

dtIlog2

(
    unsigned int v
)

Public function

bool

 

dtIntersectSegmentPoly2D

(
    const float* p0,
    const float* p1,
    const float* verts,
    int nverts,
    float& tmin,
    float& tmax,
    int& segMin,
    int& segMax
)

Public function

bool

 

dtIntersectSegSeg2D

(
    const float* ap,
    const float* aq,
    const float* bp,
    const float* bq,
    float& s,
    float& t
)

Public function

T

 

dtMax

(
    T a,
    T b
)

Returns the maximum of two values.

Public function

void

 

dtMemCpy

(
    void* dst,
    void* src,
    int size
)

Public function

T

 

dtMin

(
    T a,
    T b
)

Returns the minimum of two values.

Public function

bool

 

dtNavMeshDataSwapEndian

(
    unsigned char* data,
    const int dataSize
)

Swaps endianess of the tile data.

Public function

bool

 

dtNavMeshHeaderSwapEndian

(
    unsigned char* data,
    const int dataSize
)

Swaps the endianess of the tile data's header (dtMeshHeader).

Public function

unsigned int

 

dtNextPow2

(
    unsigned int v
)

Public function

int

 

dtOppositeTile

(
    int side
)

Public function

bool

 

dtOverlapBounds

(
    const float* amin,
    const float* amax,
    const float* bmin,
    const float* bmax
)

Determines if two axis-aligned bounding boxes overlap.

Public function

bool

 

dtOverlapPolyPoly2D

(
    const float* polya,
    const int npolya,
    const float* polyb,
    const int npolyb
)

Determines if the two convex polygons overlap on the xz-plane.

Public function

bool

 

dtOverlapQuantBounds

(
    const unsigned short amin,
    const unsigned short amax,
    const unsigned short bmin,
    const unsigned short bmax
)

Determines if two axis-aligned bounding boxes overlap.

Public function

bool

 

dtPointInPolygon

(
    const float* pt,
    const float* verts,
    const int nverts
)

Determines if the specified point is inside the convex polygon on the xz-plane.

Public function

void

 

dtRandomPointInConvexPoly

(
    const float* pts,
    const int npts,
    float* areas,
    const float s,
    const float t,
    float* out
)

Public function

void

 

dtRotate90

(
    unsigned short* dest,
    const unsigned short* v,
    const unsigned short* center,
    const dtRotation rot
)

Rotate vector around center position by increments of 90 degrees.

Public function

void

 

dtRotate90

(
    float* dest,
    const float* v,
    const float* center,
    const dtRotation rot
)

Rotate vector around center position by increments of 90 degrees.

Public function

dtRotation

 

dtSelectRotation

(
    float rotationDeg
)

Select a 90 degree increment value from an input angle in degree.

Public function

T

 

dtSqr

(
    T a
)

Returns the square of the value.

Public function

float

 

dtSqrt

(
    float x
)

Returns the square root of the value.

Public function

bool

 

dtStatusDetail

(
    dtStatus status,
    unsigned int detail
)

Returns true if specific detail is set.

Public function

bool

 

dtStatusFailed

(
    dtStatus status
)

Returns true of status is failure.

Public function

bool

 

dtStatusInProgress

(
    dtStatus status
)

Returns true of status is in progress.

Public function

bool

 

dtStatusSucceed

(
    dtStatus status
)

Returns true of status is success.

Public function

void

 

dtSwap

(
    T& a,
    T& b
)

Swaps the values of the two parameters.

Public function

void

 

dtSwapByte

(
    unsigned char* a,
    unsigned char* b
)

Public function

void

 

dtSwapEndian

(
    unsigned short* v
)

Public function

void

 

dtSwapEndian

(
    short* v
)

Public function

void

 

dtSwapEndian

(
    unsigned int* v
)

Public function

void

 

dtSwapEndian

(
    int* v
)

Public function

void

 

dtSwapEndian

(
    float* v
)

Public function

bool

 

dtTransformTileData

(
    unsigned char* data,
    const int dataSize,
    const int offsetX,
    const int offsetY,
    const float tileWidth,
    const float tileHeight,
    const float rotationDeg
)

BEGIN Offset and rotate around center the data in the tile

Public function

float

 

dtTriArea2D

(
    const float* a,
    const float* b,
    const float* c
)

Derives the signed xz-plane area of the triangle ABC, or the relationship of line AB to point C.

Public function

void

 

dtVadd

(
    float* dest,
    const float* v1,
    const float* v2
)

Performs a vector addition. (v1_ + v2_)

Public function

void

 

dtVcopy

(
    float* dest,
    const float* a
)

Performs a vector copy.

Public function

void

 

dtVcross

(
    float* dest,
    const float* v1,
    const float* v2
)

Derives the cross product of two vectors. (v1_ x v2_)

Public function

float

 

dtVdist

(
    const float* v1,
    const float* v2
)

Returns the distance between two points.

Public function

float

 

dtVdist2D

(
    const float* v1,
    const float* v2
)

Derives the distance between the specified points on the xz-plane.

Public function

float

 

dtVdist2DSqr

(
    const float* v1,
    const float* v2
)

Derives the square of the distance between the specified points on the xz-plane.

Public function

float

 

dtVdistSqr

(
    const float* v1,
    const float* v2
)

Returns the square of the distance between two points.

Public function

float

 

dtVdot

(
    const float* v1,
    const float* v2
)

Derives the dot product of two vectors. (v1_ . v2_)

Public function

float

 

dtVdot2D

(
    const float* u,
    const float* v
)

Derives the dot product of two vectors on the xz-plane.

Public function

bool

 

dtVequal

(
    const float* p0,
    const float* p1
)

Performs a 'sloppy' colocation check of the specified points.

Public function

float

 

dtVlen

(
    const float* v
)

Derives the scalar length of the vector.

Public function

float

 

dtVlenSqr

(
    const float* v
)

Derives the square of the scalar length of the vector. (len * len)

Public function

void

 

dtVlerp

(
    float* dest,
    const float* v1,
    const float* v2,
    const float t
)

Performs a linear interpolation between two vectors. (v1_ toward v2_)

Public function

void

 

dtVmad

(
    float* dest,
    const float* v1,
    const float* v2,
    const float s
)

Performs a scaled vector addition. (v1_ + (v2 * `s))

Public function

void

 

dtVmax

(
    float* mx,
    const float* v
)

Selects the maximum value of each element from the specified vectors.

Public function

void

 

dtVmin

(
    float* mn,
    const float* v
)

Selects the minimum value of each element from the specified vectors.

Public function

void

 

dtVnormalize

(
    float* v
)

Normalizes the vector.

Public function

float

 

dtVperp2D

(
    const float* u,
    const float* v
)

Derives the xz-plane 2D perp product of the two vectors.

Public function

void

 

dtVRot90

(
    float* dest,
    const float* v,
    const dtRotation rot
)

Rotate by 90 degree increments.

Public function

void

 

dtVRot90

(
    unsigned short* dest,
    const unsigned short* v,
    const dtRotation rot
)

Rotate by 90 degree increments.

Public function

void

 

dtVscale

(
    float* dest,
    const float* v,
    const float t
)

Scales the vector by the specified value. (v_ * t_)

Public function

void

 

dtVset

(
    float* dest,
    const float x,
    const float y,
    const float z
)

Sets the vector elements to the specified values.

Public function

void

 

dtVsub

(
    float* dest,
    const float* v1,
    const float* v2
)

Performs a vector subtraction. (v1_ - v2_)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss