Recast Navigation
Navigation-mesh Toolset for Games
DetourTileCacheBuilder.h File Reference
#include "DetourAlloc.h"
#include "DetourStatus.h"

Go to the source code of this file.

Classes

struct  dtTileCacheLayerHeader
 
struct  dtTileCacheLayer
 
struct  dtTileCacheContour
 
struct  dtTileCacheContourSet
 
struct  dtTileCachePolyMesh
 
struct  dtTileCacheAlloc
 
struct  dtTileCacheCompressor
 

Functions

dtStatus dtBuildTileCacheLayer (dtTileCacheCompressor *comp, dtTileCacheLayerHeader *header, const unsigned char *heights, const unsigned char *areas, const unsigned char *cons, unsigned char **outData, int *outDataSize)
 
void dtFreeTileCacheLayer (dtTileCacheAlloc *alloc, dtTileCacheLayer *layer)
 
dtStatus dtDecompressTileCacheLayer (dtTileCacheAlloc *alloc, dtTileCacheCompressor *comp, unsigned char *compressed, const int compressedSize, dtTileCacheLayer **layerOut)
 
dtTileCacheContourSetdtAllocTileCacheContourSet (dtTileCacheAlloc *alloc)
 
void dtFreeTileCacheContourSet (dtTileCacheAlloc *alloc, dtTileCacheContourSet *cset)
 
dtTileCachePolyMeshdtAllocTileCachePolyMesh (dtTileCacheAlloc *alloc)
 
void dtFreeTileCachePolyMesh (dtTileCacheAlloc *alloc, dtTileCachePolyMesh *lmesh)
 
dtStatus dtMarkCylinderArea (dtTileCacheLayer &layer, const float *orig, const float cs, const float ch, const float *pos, const float radius, const float height, const unsigned char areaId)
 
dtStatus dtMarkBoxArea (dtTileCacheLayer &layer, const float *orig, const float cs, const float ch, const float *bmin, const float *bmax, const unsigned char areaId)
 
dtStatus dtMarkBoxArea (dtTileCacheLayer &layer, const float *orig, const float cs, const float ch, const float *center, const float *halfExtents, const float *rotAux, const unsigned char areaId)
 
dtStatus dtBuildTileCacheRegions (dtTileCacheAlloc *alloc, dtTileCacheLayer &layer, const int walkableClimb)
 
dtStatus dtBuildTileCacheContours (dtTileCacheAlloc *alloc, dtTileCacheLayer &layer, const int walkableClimb, const float maxError, dtTileCacheContourSet &lcset)
 
dtStatus dtBuildTileCachePolyMesh (dtTileCacheAlloc *alloc, dtTileCacheContourSet &lcset, dtTileCachePolyMesh &mesh)
 
bool dtTileCacheHeaderSwapEndian (unsigned char *data, const int dataSize)
 Swaps the endianness of the compressed tile data's header (dtTileCacheLayerHeader). More...
 

Variables

static const int DT_TILECACHE_MAGIC = 'D'<<24 | 'T'<<16 | 'L'<<8 | 'R'
 'DTLR'; More...
 
static const int DT_TILECACHE_VERSION = 1
 
static const unsigned char DT_TILECACHE_NULL_AREA = 0
 
static const unsigned char DT_TILECACHE_WALKABLE_AREA = 63
 
static const unsigned short DT_TILECACHE_NULL_IDX = 0xffff
 

Function Documentation

◆ dtAllocTileCacheContourSet()

dtTileCacheContourSet* dtAllocTileCacheContourSet ( dtTileCacheAlloc alloc)

◆ dtAllocTileCachePolyMesh()

dtTileCachePolyMesh* dtAllocTileCachePolyMesh ( dtTileCacheAlloc alloc)

◆ dtBuildTileCacheContours()

dtStatus dtBuildTileCacheContours ( dtTileCacheAlloc alloc,
dtTileCacheLayer layer,
const int  walkableClimb,
const float  maxError,
dtTileCacheContourSet lcset 
)

◆ dtBuildTileCacheLayer()

dtStatus dtBuildTileCacheLayer ( dtTileCacheCompressor comp,
dtTileCacheLayerHeader header,
const unsigned char *  heights,
const unsigned char *  areas,
const unsigned char *  cons,
unsigned char **  outData,
int *  outDataSize 
)

◆ dtBuildTileCachePolyMesh()

dtStatus dtBuildTileCachePolyMesh ( dtTileCacheAlloc alloc,
dtTileCacheContourSet lcset,
dtTileCachePolyMesh mesh 
)

◆ dtBuildTileCacheRegions()

dtStatus dtBuildTileCacheRegions ( dtTileCacheAlloc alloc,
dtTileCacheLayer layer,
const int  walkableClimb 
)

◆ dtDecompressTileCacheLayer()

dtStatus dtDecompressTileCacheLayer ( dtTileCacheAlloc alloc,
dtTileCacheCompressor comp,
unsigned char *  compressed,
const int  compressedSize,
dtTileCacheLayer **  layerOut 
)

◆ dtFreeTileCacheContourSet()

void dtFreeTileCacheContourSet ( dtTileCacheAlloc alloc,
dtTileCacheContourSet cset 
)

◆ dtFreeTileCacheLayer()

void dtFreeTileCacheLayer ( dtTileCacheAlloc alloc,
dtTileCacheLayer layer 
)

◆ dtFreeTileCachePolyMesh()

void dtFreeTileCachePolyMesh ( dtTileCacheAlloc alloc,
dtTileCachePolyMesh lmesh 
)

◆ dtMarkBoxArea() [1/2]

dtStatus dtMarkBoxArea ( dtTileCacheLayer layer,
const float *  orig,
const float  cs,
const float  ch,
const float *  bmin,
const float *  bmax,
const unsigned char  areaId 
)

◆ dtMarkBoxArea() [2/2]

dtStatus dtMarkBoxArea ( dtTileCacheLayer layer,
const float *  orig,
const float  cs,
const float  ch,
const float *  center,
const float *  halfExtents,
const float *  rotAux,
const unsigned char  areaId 
)

◆ dtMarkCylinderArea()

dtStatus dtMarkCylinderArea ( dtTileCacheLayer layer,
const float *  orig,
const float  cs,
const float  ch,
const float *  pos,
const float  radius,
const float  height,
const unsigned char  areaId 
)

◆ dtTileCacheHeaderSwapEndian()

bool dtTileCacheHeaderSwapEndian ( unsigned char *  data,
const int  dataSize 
)

Swaps the endianness of the compressed tile data's header (dtTileCacheLayerHeader).

Tile layer data does not need endian swapping as it consist only of bytes.

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

Variable Documentation

◆ DT_TILECACHE_MAGIC

const int DT_TILECACHE_MAGIC = 'D'<<24 | 'T'<<16 | 'L'<<8 | 'R'
static

'DTLR';

◆ DT_TILECACHE_NULL_AREA

const unsigned char DT_TILECACHE_NULL_AREA = 0
static

◆ DT_TILECACHE_NULL_IDX

const unsigned short DT_TILECACHE_NULL_IDX = 0xffff
static

◆ DT_TILECACHE_VERSION

const int DT_TILECACHE_VERSION = 1
static

◆ DT_TILECACHE_WALKABLE_AREA

const unsigned char DT_TILECACHE_WALKABLE_AREA = 63
static