UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DetourNavMeshBuilder.cpp File Reference
#include "Detour/DetourNavMeshBuilder.h"
#include "Detour/DetourNavMesh.h"
#include "Detour/DetourCommon.h"
#include <limits>

Classes

struct  BVItem
 

Functions

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

Function Documentation

◆ dtComputeTileOffsetFromRotation()

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()

bool dtNavMeshDataSwapEndian ( unsigned char data,
const int  dataSize 
)
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()

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()

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.

◆ longestAxis()

int longestAxis ( unsigned short  x,
unsigned short  y,
unsigned short  z 
)
inline