diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2011-09-30 01:38:57 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2011-09-30 01:38:57 +0400 |
commit | e6a9b68c798457430698afbfc7dfcdd8b71ca596 (patch) | |
tree | 64cc1ff496d8b3df6a04dfac078905a312952d8e /extern/recastnavigation/recast-capi.h | |
parent | e21e7895071eaa7484679639f39bb7f413bb4dcc (diff) |
Recast: upgrade library.
- Upgrade Recast library to latest portable version
- Implement recast_qsort based on FreeBSD qsort.c to have
portable thread safe quick sort for use in conversion routine.
- Better default value for the Build Navigation Mesh operator
Diffstat (limited to 'extern/recastnavigation/recast-capi.h')
-rw-r--r-- | extern/recastnavigation/recast-capi.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/extern/recastnavigation/recast-capi.h b/extern/recastnavigation/recast-capi.h index 58fe08e6335..e8831bcdc58 100644 --- a/extern/recastnavigation/recast-capi.h +++ b/extern/recastnavigation/recast-capi.h @@ -28,6 +28,9 @@ #ifndef RECAST_C_API_H #define RECAST_C_API_H +// for size_t +#include <stddef.h> + #ifdef __cplusplus extern "C" { #endif @@ -69,16 +72,20 @@ void recast_filterLedgeSpans(const int walkableHeight, const int walkableClimb, void recast_filterWalkableLowHeightSpans(int walkableHeight, struct recast_heightfield *solid); +void recast_filterLowHangingWalkableObstacles(const int walkableClimb, struct recast_heightfield *solid); + struct recast_compactHeightfield *recast_newCompactHeightfield(void); void recast_destroyCompactHeightfield(struct recast_compactHeightfield *compactHeightfield); int recast_buildCompactHeightfield(const int walkableHeight, const int walkableClimb, - unsigned char flags, struct recast_heightfield *hf, struct recast_compactHeightfield *chf); + struct recast_heightfield *hf, struct recast_compactHeightfield *chf); + +int recast_erodeWalkableArea(int radius, struct recast_compactHeightfield *chf); int recast_buildDistanceField(struct recast_compactHeightfield *chf); -int recast_buildRegions(struct recast_compactHeightfield *chf, int walkableRadius, int borderSize, +int recast_buildRegions(struct recast_compactHeightfield *chf, int borderSize, int minRegionSize, int mergeRegionSize); /* Contour set */ @@ -119,7 +126,12 @@ float *recast_polyMeshDetailGetVerts(struct recast_polyMeshDetail *mesh, int *nv unsigned char *recast_polyMeshDetailGetTris(struct recast_polyMeshDetail *mesh, int *ntris); -unsigned short *recast_polyMeshDetailGetMeshes(struct recast_polyMeshDetail *mesh, int *nmeshes); +unsigned int *recast_polyMeshDetailGetMeshes(struct recast_polyMeshDetail *mesh, int *nmeshes); + +/* utility function: quick sort reentrant */ +typedef int recast_cmp_t(void *ctx, const void *a, const void *b); + +void recast_qsort(void *a, size_t n, size_t es, void *thunk, recast_cmp_t *cmp); #ifdef __cplusplus } |