Planeshift
Classes | Functions | Variables

DetourTileCacheBuilder.h File Reference

#include "DetourAlloc.h"
#include "DetourStatus.h"

Go to the source code of this file.

Classes

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

Functions

dtTileCacheContourSetdtAllocTileCacheContourSet (dtTileCacheAlloc *alloc)
dtTileCachePolyMeshdtAllocTileCachePolyMesh (dtTileCacheAlloc *alloc)
dtStatus dtBuildTileCacheContours (dtTileCacheAlloc *alloc, dtTileCacheLayer &layer, const int walkableClimb, const float maxError, dtTileCacheContourSet &lcset)
dtStatus dtBuildTileCacheLayer (dtTileCacheCompressor *comp, dtTileCacheLayerHeader *header, const unsigned char *heights, const unsigned char *areas, const unsigned char *cons, unsigned char **outData, int *outDataSize)
dtStatus dtBuildTileCachePolyMesh (dtTileCacheAlloc *alloc, dtTileCacheContourSet &lcset, dtTileCachePolyMesh &mesh)
dtStatus dtBuildTileCacheRegions (dtTileCacheAlloc *alloc, dtTileCacheLayer &layer, const int walkableClimb)
dtStatus dtDecompressTileCacheLayer (dtTileCacheAlloc *alloc, dtTileCacheCompressor *comp, unsigned char *compressed, const int compressedSize, dtTileCacheLayer **layerOut)
void dtFreeTileCacheContourSet (dtTileCacheAlloc *alloc, dtTileCacheContourSet *cset)
void dtFreeTileCacheLayer (dtTileCacheAlloc *alloc, dtTileCacheLayer *layer)
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)
bool dtTileCacheHeaderSwapEndian (unsigned char *data, const int dataSize)
 Swaps the endianess of the compressed tile data's header (dtTileCacheLayerHeader). Tile layer data does not need endian swapping as it consits only of bytes.

Variables

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

Function Documentation

dtTileCacheContourSet* dtAllocTileCacheContourSet ( dtTileCacheAlloc alloc)
dtTileCachePolyMesh* dtAllocTileCachePolyMesh ( dtTileCacheAlloc alloc)
dtStatus dtBuildTileCacheContours ( dtTileCacheAlloc alloc,
dtTileCacheLayer layer,
const int  walkableClimb,
const float  maxError,
dtTileCacheContourSet lcset 
)
dtStatus dtBuildTileCacheLayer ( dtTileCacheCompressor comp,
dtTileCacheLayerHeader header,
const unsigned char *  heights,
const unsigned char *  areas,
const unsigned char *  cons,
unsigned char **  outData,
int outDataSize 
)
dtStatus dtBuildTileCachePolyMesh ( dtTileCacheAlloc alloc,
dtTileCacheContourSet lcset,
dtTileCachePolyMesh mesh 
)
dtStatus dtBuildTileCacheRegions ( dtTileCacheAlloc alloc,
dtTileCacheLayer layer,
const int  walkableClimb 
)
dtStatus dtDecompressTileCacheLayer ( dtTileCacheAlloc alloc,
dtTileCacheCompressor comp,
unsigned char *  compressed,
const int  compressedSize,
dtTileCacheLayer **  layerOut 
)
void dtFreeTileCacheContourSet ( dtTileCacheAlloc alloc,
dtTileCacheContourSet cset 
)
void dtFreeTileCacheLayer ( dtTileCacheAlloc alloc,
dtTileCacheLayer layer 
)
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 
)
bool dtTileCacheHeaderSwapEndian ( unsigned char *  data,
const int  dataSize 
)

Swaps the endianess of the compressed tile data's header (dtTileCacheLayerHeader). Tile layer data does not need endian swapping as it consits only of bytes.

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

Variable Documentation

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

'DTLR';

Definition at line 25 of file DetourTileCacheBuilder.h.

const unsigned char DT_TILECACHE_NULL_AREA = 0 [static]

Definition at line 28 of file DetourTileCacheBuilder.h.

const unsigned short DT_TILECACHE_NULL_IDX = 0xffff [static]

Definition at line 30 of file DetourTileCacheBuilder.h.

const int DT_TILECACHE_VERSION = 1 [static]

Definition at line 26 of file DetourTileCacheBuilder.h.

const unsigned char DT_TILECACHE_WALKABLE_AREA = 63 [static]

Definition at line 29 of file DetourTileCacheBuilder.h.