19#ifndef DETOURTILECACHEBUILDER_H
20#define DETOURTILECACHEBUILDER_H
85 virtual void*
alloc(
const size_t size)
90 virtual void free(
void* ptr)
102 unsigned char* compressed,
const int maxCompressedSize,
int* compressedSize) = 0;
104 unsigned char* buffer,
const int maxBufferSize,
int* bufferSize) = 0;
110 const unsigned char* heights,
111 const unsigned char* areas,
112 const unsigned char* cons,
113 unsigned char** outData,
int* outDataSize);
118 unsigned char* compressed,
const int compressedSize,
128 const float* pos,
const float radius,
const float height,
const unsigned char areaId);
131 const float* bmin,
const float* bmax,
const unsigned char areaId);
134 const float* center,
const float* halfExtents,
const float* rotAux,
const unsigned char areaId);
138 const int walkableClimb);
142 const int walkableClimb,
const float maxError,
@ DT_ALLOC_TEMP
Memory used temporarily within a function.
Definition DetourAlloc.h:29
void * dtAlloc(size_t size, dtAllocHint hint)
Allocates a memory block.
Definition DetourAlloc.cpp:41
void dtFree(void *ptr)
Deallocates a memory block.
Definition DetourAlloc.cpp:46
unsigned int dtStatus
Definition DetourStatus.h:22
static const int DT_TILECACHE_MAGIC
'DTLR';
Definition DetourTileCacheBuilder.h:25
dtStatus dtBuildTileCachePolyMesh(dtTileCacheAlloc *alloc, dtTileCacheContourSet &lcset, dtTileCachePolyMesh &mesh)
Definition DetourTileCacheBuilder.cpp:1735
dtTileCachePolyMesh * dtAllocTileCachePolyMesh(dtTileCacheAlloc *alloc)
Definition DetourTileCacheBuilder.cpp:86
dtStatus dtBuildTileCacheContours(dtTileCacheAlloc *alloc, dtTileCacheLayer &layer, const int walkableClimb, const float maxError, dtTileCacheContourSet &lcset)
Definition DetourTileCacheBuilder.cpp:748
dtStatus dtMarkBoxArea(dtTileCacheLayer &layer, const float *orig, const float cs, const float ch, const float *bmin, const float *bmax, const unsigned char areaId)
Definition DetourTileCacheBuilder.cpp:1999
void dtFreeTileCacheLayer(dtTileCacheAlloc *alloc, dtTileCacheLayer *layer)
Definition DetourTileCacheBuilder.cpp:2143
dtStatus dtDecompressTileCacheLayer(dtTileCacheAlloc *alloc, dtTileCacheCompressor *comp, unsigned char *compressed, const int compressedSize, dtTileCacheLayer **layerOut)
Definition DetourTileCacheBuilder.cpp:2150
void dtFreeTileCachePolyMesh(dtTileCacheAlloc *alloc, dtTileCachePolyMesh *lmesh)
Definition DetourTileCacheBuilder.cpp:95
static const int DT_TILECACHE_VERSION
Definition DetourTileCacheBuilder.h:26
dtTileCacheContourSet * dtAllocTileCacheContourSet(dtTileCacheAlloc *alloc)
Definition DetourTileCacheBuilder.cpp:66
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)
Definition DetourTileCacheBuilder.cpp:1944
dtStatus dtBuildTileCacheLayer(dtTileCacheCompressor *comp, dtTileCacheLayerHeader *header, const unsigned char *heights, const unsigned char *areas, const unsigned char *cons, unsigned char **outData, int *outDataSize)
Definition DetourTileCacheBuilder.cpp:2092
static const unsigned char DT_TILECACHE_NULL_AREA
Definition DetourTileCacheBuilder.h:28
void dtFreeTileCacheContourSet(dtTileCacheAlloc *alloc, dtTileCacheContourSet *cset)
Definition DetourTileCacheBuilder.cpp:75
static const unsigned char DT_TILECACHE_WALKABLE_AREA
Definition DetourTileCacheBuilder.h:29
dtStatus dtBuildTileCacheRegions(dtTileCacheAlloc *alloc, dtTileCacheLayer &layer, const int walkableClimb)
Definition DetourTileCacheBuilder.cpp:186
static const unsigned short DT_TILECACHE_NULL_IDX
Definition DetourTileCacheBuilder.h:30
bool dtTileCacheHeaderSwapEndian(unsigned char *data, const int dataSize)
Swaps the endianness of the compressed tile data's header (dtTileCacheLayerHeader).
Definition DetourTileCacheBuilder.cpp:2210
Definition DetourTileCacheBuilder.h:80
virtual void reset()
Definition DetourTileCacheBuilder.h:83
virtual ~dtTileCacheAlloc()
Definition DetourTileCacheBuilder.cpp:26
virtual void free(void *ptr)
Definition DetourTileCacheBuilder.h:90
virtual void * alloc(const size_t size)
Definition DetourTileCacheBuilder.h:85
Definition DetourTileCacheBuilder.h:97
virtual dtStatus decompress(const unsigned char *compressed, const int compressedSize, unsigned char *buffer, const int maxBufferSize, int *bufferSize)=0
virtual ~dtTileCacheCompressor()
Definition DetourTileCacheBuilder.cpp:31
virtual int maxCompressedSize(const int bufferSize)=0
virtual dtStatus compress(const unsigned char *buffer, const int bufferSize, unsigned char *compressed, const int maxCompressedSize, int *compressedSize)=0
Definition DetourTileCacheBuilder.h:62
dtTileCacheContour * conts
Definition DetourTileCacheBuilder.h:64
int nconts
Definition DetourTileCacheBuilder.h:63
Definition DetourTileCacheBuilder.h:54
int nverts
Definition DetourTileCacheBuilder.h:55
unsigned char area
Definition DetourTileCacheBuilder.h:58
unsigned char * verts
Definition DetourTileCacheBuilder.h:56
unsigned char reg
Definition DetourTileCacheBuilder.h:57
Definition DetourTileCacheBuilder.h:44
unsigned char * regs
Definition DetourTileCacheBuilder.h:50
unsigned char * cons
Definition DetourTileCacheBuilder.h:49
unsigned char regCount
Region count.
Definition DetourTileCacheBuilder.h:46
unsigned char * heights
Definition DetourTileCacheBuilder.h:47
dtTileCacheLayerHeader * header
Definition DetourTileCacheBuilder.h:45
unsigned char * areas
Definition DetourTileCacheBuilder.h:48
Definition DetourTileCacheBuilder.h:68
int npolys
Number of polygons.
Definition DetourTileCacheBuilder.h:71
unsigned short * polys
Polygons of the mesh, nvp*2 elements per polygon.
Definition DetourTileCacheBuilder.h:73
int nverts
Number of vertices.
Definition DetourTileCacheBuilder.h:70
unsigned char * areas
Area ID of polygons.
Definition DetourTileCacheBuilder.h:75
unsigned short * flags
Per polygon flags.
Definition DetourTileCacheBuilder.h:74
int nvp
Definition DetourTileCacheBuilder.h:69
unsigned short * verts
Vertices of the mesh, 3 elements per vertex.
Definition DetourTileCacheBuilder.h:72