Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/recastnavigation/recast-capi.h')
-rw-r--r--extern/recastnavigation/recast-capi.h67
1 files changed, 57 insertions, 10 deletions
diff --git a/extern/recastnavigation/recast-capi.h b/extern/recastnavigation/recast-capi.h
index 54bf84931c4..306bf79c167 100644
--- a/extern/recastnavigation/recast-capi.h
+++ b/extern/recastnavigation/recast-capi.h
@@ -38,12 +38,13 @@ struct recast_polyMesh;
struct recast_polyMeshDetail;
struct recast_heightfield;
struct recast_compactHeightfield;
+struct recast_heightfieldLayerSet;
struct recast_contourSet;
-enum recast_SpanFlags
+enum recast_BuildContoursFlags
{
- RECAST_WALKABLE = 0x01,
- RECAST_REACHABLE = 0x02
+ RECAST_CONTOUR_TESS_WALL_EDGES = 0x01,
+ RECAST_CONTOUR_TESS_AREA_EDGES = 0x02,
};
int recast_buildMeshAdjacency(unsigned short* polys, const int npolys,
@@ -61,10 +62,22 @@ int recast_createHeightfield(struct recast_heightfield *hf, int width, int heigh
const float *bmin, const float* bmax, float cs, float ch);
void recast_markWalkableTriangles(const float walkableSlopeAngle,const float *verts, int nv,
- const int *tris, int nt, unsigned char *flags);
+ const int *tris, int nt, unsigned char *areas);
-void recast_rasterizeTriangles(const float *verts, int nv, const int *tris,
- const unsigned char *flags, int nt, struct recast_heightfield *solid);
+void recast_clearUnwalkableTriangles(const float walkableSlopeAngle, const float* verts, int nv,
+ const int* tris, int nt, unsigned char* areas);
+
+int recast_addSpan(struct recast_heightfield *hf, const int x, const int y,
+ const unsigned short smin, const unsigned short smax,
+ const unsigned char area, const int flagMergeThr);
+
+int recast_rasterizeTriangle(const float* v0, const float* v1, const float* v2,
+ const unsigned char area, struct recast_heightfield *solid,
+ const int flagMergeThr);
+
+int recast_rasterizeTriangles(const float *verts, const int nv, const int *tris,
+ const unsigned char *areas, const int nt, struct recast_heightfield *solid,
+ const int flagMergeThr);
void recast_filterLedgeSpans(const int walkableHeight, const int walkableClimb,
struct recast_heightfield *solid);
@@ -73,6 +86,12 @@ void recast_filterWalkableLowHeightSpans(int walkableHeight, struct recast_heigh
void recast_filterLowHangingWalkableObstacles(const int walkableClimb, struct recast_heightfield *solid);
+int recast_getHeightFieldSpanCount(struct recast_heightfield *hf);
+
+struct recast_heightfieldLayerSet *recast_newHeightfieldLayerSet(void);
+
+void recast_destroyHeightfieldLayerSet(struct recast_heightfieldLayerSet *lset);
+
struct recast_compactHeightfield *recast_newCompactHeightfield(void);
void recast_destroyCompactHeightfield(struct recast_compactHeightfield *compactHeightfield);
@@ -82,10 +101,31 @@ int recast_buildCompactHeightfield(const int walkableHeight, const int walkableC
int recast_erodeWalkableArea(int radius, struct recast_compactHeightfield *chf);
+int recast_medianFilterWalkableArea(struct recast_compactHeightfield *chf);
+
+void recast_markBoxArea(const float *bmin, const float *bmax, unsigned char areaId,
+ struct recast_compactHeightfield *chf);
+
+void recast_markConvexPolyArea(const float* verts, const int nverts,
+ const float hmin, const float hmax, unsigned char areaId,
+ struct recast_compactHeightfield *chf);
+
+int recast_offsetPoly(const float* verts, const int nverts,
+ const float offset, float *outVerts, const int maxOutVerts);
+
+void recast_markCylinderArea(const float* pos, const float r, const float h,
+ unsigned char areaId, struct recast_compactHeightfield *chf);
+
int recast_buildDistanceField(struct recast_compactHeightfield *chf);
-int recast_buildRegions(struct recast_compactHeightfield *chf, int borderSize,
- int minRegionSize, int mergeRegionSize);
+int recast_buildRegions(struct recast_compactHeightfield *chf,
+ const int borderSize, const int minRegionArea, const int mergeRegionArea);
+
+int recast_buildLayerRegions(struct recast_compactHeightfield *chf,
+ const int borderSize, const int minRegionArea);
+
+int recast_buildRegionsMonotone(struct recast_compactHeightfield *chf,
+ const int borderSize, const int minRegionArea, const int mergeRegionArea);
/* Contour set */
@@ -94,7 +134,8 @@ struct recast_contourSet *recast_newContourSet(void);
void recast_destroyContourSet(struct recast_contourSet *contourSet);
int recast_buildContours(struct recast_compactHeightfield *chf,
- const float maxError, const int maxEdgeLen, struct recast_contourSet *cset);
+ const float maxError, const int maxEdgeLen, struct recast_contourSet *cset,
+ const int buildFlags);
/* Poly mesh */
@@ -102,7 +143,11 @@ struct recast_polyMesh *recast_newPolyMesh(void);
void recast_destroyPolyMesh(struct recast_polyMesh *polyMesh);
-int recast_buildPolyMesh(struct recast_contourSet *cset, int nvp, struct recast_polyMesh *mesh);
+int recast_buildPolyMesh(struct recast_contourSet *cset, const int nvp, struct recast_polyMesh *mesh);
+
+int recast_mergePolyMeshes(struct recast_polyMesh **meshes, const int nmeshes, struct recast_polyMesh *mesh);
+
+int recast_copyPolyMesh(const struct recast_polyMesh *src, struct recast_polyMesh *dst);
unsigned short *recast_polyMeshGetVerts(struct recast_polyMesh *mesh, int *nverts);
@@ -121,6 +166,8 @@ void recast_destroyPolyMeshDetail(struct recast_polyMeshDetail *polyMeshDetail);
int recast_buildPolyMeshDetail(const struct recast_polyMesh *mesh, const struct recast_compactHeightfield *chf,
const float sampleDist, const float sampleMaxError, struct recast_polyMeshDetail *dmesh);
+int recast_mergePolyMeshDetails(struct recast_polyMeshDetail **meshes, const int nmeshes, struct recast_polyMeshDetail *mesh);
+
float *recast_polyMeshDetailGetVerts(struct recast_polyMeshDetail *mesh, int *nverts);
unsigned char *recast_polyMeshDetailGetTris(struct recast_polyMeshDetail *mesh, int *ntris);