Recast Navigation
Navigation-mesh Toolset for Games
|
#include <DetourTileCache.h>
Public Member Functions | |
dtTileCache () | |
~dtTileCache () | |
struct dtTileCacheAlloc * | getAlloc () |
struct dtTileCacheCompressor * | getCompressor () |
const dtTileCacheParams * | getParams () const |
int | getTileCount () const |
const dtCompressedTile * | getTile (const int i) const |
int | getObstacleCount () const |
const dtTileCacheObstacle * | getObstacle (const int i) const |
const dtTileCacheObstacle * | getObstacleByRef (dtObstacleRef ref) |
dtObstacleRef | getObstacleRef (const dtTileCacheObstacle *obmin) const |
dtStatus | init (const dtTileCacheParams *params, struct dtTileCacheAlloc *talloc, struct dtTileCacheCompressor *tcomp, struct dtTileCacheMeshProcess *tmproc) |
int | getTilesAt (const int tx, const int ty, dtCompressedTileRef *tiles, const int maxTiles) const |
dtCompressedTile * | getTileAt (const int tx, const int ty, const int tlayer) |
dtCompressedTileRef | getTileRef (const dtCompressedTile *tile) const |
const dtCompressedTile * | getTileByRef (dtCompressedTileRef ref) const |
dtStatus | addTile (unsigned char *data, const int dataSize, unsigned char flags, dtCompressedTileRef *result) |
dtStatus | removeTile (dtCompressedTileRef ref, unsigned char **data, int *dataSize) |
dtStatus | addObstacle (const float *pos, const float radius, const float height, dtObstacleRef *result) |
dtStatus | addBoxObstacle (const float *bmin, const float *bmax, dtObstacleRef *result) |
dtStatus | addBoxObstacle (const float *center, const float *halfExtents, const float yRadians, dtObstacleRef *result) |
dtStatus | removeObstacle (const dtObstacleRef ref) |
dtStatus | queryTiles (const float *bmin, const float *bmax, dtCompressedTileRef *results, int *resultCount, const int maxResults) const |
dtStatus | update (const float dt, class dtNavMesh *navmesh, bool *upToDate=0) |
Updates the tile cache by rebuilding tiles touched by unfinished obstacle requests. More... | |
dtStatus | buildNavMeshTilesAt (const int tx, const int ty, class dtNavMesh *navmesh) |
dtStatus | buildNavMeshTile (const dtCompressedTileRef ref, class dtNavMesh *navmesh) |
void | calcTightTileBounds (const struct dtTileCacheLayerHeader *header, float *bmin, float *bmax) const |
void | getObstacleBounds (const struct dtTileCacheObstacle *ob, float *bmin, float *bmax) const |
dtCompressedTileRef | encodeTileId (unsigned int salt, unsigned int it) const |
Encodes a tile id. More... | |
unsigned int | decodeTileIdSalt (dtCompressedTileRef ref) const |
Decodes a tile salt. More... | |
unsigned int | decodeTileIdTile (dtCompressedTileRef ref) const |
Decodes a tile id. More... | |
dtObstacleRef | encodeObstacleId (unsigned int salt, unsigned int it) const |
Encodes an obstacle id. More... | |
unsigned int | decodeObstacleIdSalt (dtObstacleRef ref) const |
Decodes an obstacle salt. More... | |
unsigned int | decodeObstacleIdObstacle (dtObstacleRef ref) const |
Decodes an obstacle id. More... | |
dtTileCache::dtTileCache | ( | ) |
dtTileCache::~dtTileCache | ( | ) |
dtStatus dtTileCache::addBoxObstacle | ( | const float * | bmin, |
const float * | bmax, | ||
dtObstacleRef * | result | ||
) |
dtStatus dtTileCache::addBoxObstacle | ( | const float * | center, |
const float * | halfExtents, | ||
const float | yRadians, | ||
dtObstacleRef * | result | ||
) |
dtStatus dtTileCache::addObstacle | ( | const float * | pos, |
const float | radius, | ||
const float | height, | ||
dtObstacleRef * | result | ||
) |
dtStatus dtTileCache::addTile | ( | unsigned char * | data, |
const int | dataSize, | ||
unsigned char | flags, | ||
dtCompressedTileRef * | result | ||
) |
dtStatus dtTileCache::buildNavMeshTile | ( | const dtCompressedTileRef | ref, |
class dtNavMesh * | navmesh | ||
) |
void dtTileCache::calcTightTileBounds | ( | const struct dtTileCacheLayerHeader * | header, |
float * | bmin, | ||
float * | bmax | ||
) | const |
|
inline |
Decodes an obstacle id.
|
inline |
Decodes an obstacle salt.
|
inline |
Decodes a tile salt.
|
inline |
Decodes a tile id.
|
inline |
Encodes an obstacle id.
|
inline |
Encodes a tile id.
|
inline |
|
inline |
|
inline |
void dtTileCache::getObstacleBounds | ( | const struct dtTileCacheObstacle * | ob, |
float * | bmin, | ||
float * | bmax | ||
) | const |
const dtTileCacheObstacle * dtTileCache::getObstacleByRef | ( | dtObstacleRef | ref | ) |
|
inline |
dtObstacleRef dtTileCache::getObstacleRef | ( | const dtTileCacheObstacle * | obmin | ) | const |
|
inline |
|
inline |
dtCompressedTile * dtTileCache::getTileAt | ( | const int | tx, |
const int | ty, | ||
const int | tlayer | ||
) |
const dtCompressedTile * dtTileCache::getTileByRef | ( | dtCompressedTileRef | ref | ) | const |
|
inline |
dtCompressedTileRef dtTileCache::getTileRef | ( | const dtCompressedTile * | tile | ) | const |
int dtTileCache::getTilesAt | ( | const int | tx, |
const int | ty, | ||
dtCompressedTileRef * | tiles, | ||
const int | maxTiles | ||
) | const |
dtStatus dtTileCache::init | ( | const dtTileCacheParams * | params, |
struct dtTileCacheAlloc * | talloc, | ||
struct dtTileCacheCompressor * | tcomp, | ||
struct dtTileCacheMeshProcess * | tmproc | ||
) |
dtStatus dtTileCache::queryTiles | ( | const float * | bmin, |
const float * | bmax, | ||
dtCompressedTileRef * | results, | ||
int * | resultCount, | ||
const int | maxResults | ||
) | const |
dtStatus dtTileCache::removeObstacle | ( | const dtObstacleRef | ref | ) |
dtStatus dtTileCache::removeTile | ( | dtCompressedTileRef | ref, |
unsigned char ** | data, | ||
int * | dataSize | ||
) |
Updates the tile cache by rebuilding tiles touched by unfinished obstacle requests.
[in] | dt | The time step size. Currently not used. |
[in] | navmesh | The mesh to affect when rebuilding tiles. |
[out] | upToDate | Whether the tile cache is fully up to date with obstacle requests and tile rebuilds. If the tile cache is up to date another (immediate) call to update will have no effect; otherwise another call will continue processing obstacle requests and tile rebuilds. |