UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DetourNavMeshBuilder.h File Reference

Go to the source code of this file.

Classes

struct  dtOffMeshLinkCreateParams
 
struct  dtDynamicAreaCreateParams
 
struct  dtNavMeshCreateParams
 

Functions

NAVMESH_API bool dtCreateNavMeshData (dtNavMeshCreateParams *params, unsigned char **outData, int *outDataSize)
 
NAVMESH_API bool dtNavMeshHeaderSwapEndian (unsigned char *data, const int dataSize)
 
NAVMESH_API bool dtNavMeshDataSwapEndian (unsigned char *data, const int dataSize)
 
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)
 
NAVMESH_API void dtComputeTileOffsetFromRotation (const dtReal *position, const dtReal *rotationCenter, const dtReal rotationDeg, const dtReal tileWidth, const dtReal tileHeight, int &deltaX, int &deltaY)
 

Function Documentation

◆ dtComputeTileOffsetFromRotation()

NAVMESH_API void dtComputeTileOffsetFromRotation ( const dtReal position,
const dtReal rotationCenter,
const dtReal  rotationDeg,
const dtReal  tileWidth,
const dtReal  tileHeight,
int &  deltaX,
int &  deltaY 
)

Compute XY offset caused by the given rotation

Parameters
[in]positionPosition to rotate. [(x, y, z)]
[in]rotationCenterRotation center. [(x, y, z)]
[in]rotationDegRotation in degrees.
[in]tileWidthTile width.
[in]tileHeightTile height.
[out]deltaXOffset X in tile coordinates.
[out]deltaYOffset Y in tile coordinates.

◆ dtNavMeshDataSwapEndian()

NAVMESH_API bool dtNavMeshDataSwapEndian ( unsigned char data,
const int  dataSize 
)

Swaps endianess of the tile data.

Parameters
[in,out]dataThe tile data array.
[in]dataSizeThe size of the data array.
Warning
This function assumes that the header is in the correct endianess already. Call dtNavMeshHeaderSwapEndian() first on the data if the data is expected to be in wrong endianess to start with. Call dtNavMeshHeaderSwapEndian() after the data has been swapped if converting from native to foreign endianess.

◆ dtNavMeshHeaderSwapEndian()

NAVMESH_API bool dtNavMeshHeaderSwapEndian ( unsigned char data,
const int  dataSize 
)

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

Parameters
[in,out]dataThe tile data array.
[in]dataSizeThe size of the data array.

◆ dtTransformTileData()

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 
)

Offset and rotate around center the data in the tile

Parameters
[in,out]dataData of the tile mesh. (See: dtCreateNavMeshData)
[in]dataSizeData size of the tile mesh.
[in]offsetXX offset in tile coordinates.
[in]offsetYY offset in tile coordinates.
[in]tileWidthTile width.
[in]tileHeightTile height.
[in]rotationDegRotation in degrees.