diff --git a/Recast_8h_source.html b/Recast_8h_source.html index 982afc84..1055f461 100644 --- a/Recast_8h_source.html +++ b/Recast_8h_source.html @@ -628,103 +628,103 @@ $(document).ready(function(){initNavTree('Recast_8h_source.html',''); initResiza
1000  const float* verts, const unsigned char* triAreaIDs, int numTris,
1001  rcHeightfield& heightfield, int flagMergeThreshold = 1);
1002 
-
1018 void rcFilterLowHangingWalkableObstacles(rcContext* context, int walkableClimb, rcHeightfield& heightfield);
-
1019 
-
1038 void rcFilterLedgeSpans(rcContext* context, int walkableHeight, int walkableClimb, rcHeightfield& heightfield);
-
1039 
-
1054 void rcFilterWalkableLowHeightSpans(rcContext* context, int walkableHeight, rcHeightfield& heightfield);
-
1055 
-
1061 int rcGetHeightFieldSpanCount(rcContext* context, const rcHeightfield& heightfield);
-
1062 
-
1067 
-
1087 bool rcBuildCompactHeightfield(rcContext* context, int walkableHeight, int walkableClimb,
-
1088  const rcHeightfield& heightfield, rcCompactHeightfield& compactHeightfield);
-
1089 
-
1104 bool rcErodeWalkableArea(rcContext* context, int erosionRadius, rcCompactHeightfield& compactHeightfield);
-
1105 
-
1117 bool rcMedianFilterWalkableArea(rcContext* context, rcCompactHeightfield& compactHeightfield);
-
1118 
-
1129 void rcMarkBoxArea(rcContext* context, const float* boxMinBounds, const float* boxMaxBounds, unsigned char areaId,
-
1130  rcCompactHeightfield& compactHeightfield);
-
1131 
-
1149 void rcMarkConvexPolyArea(rcContext* context, const float* verts, int numVerts,
-
1150  float minY, float maxY, unsigned char areaId,
-
1151  rcCompactHeightfield& compactHeightfield);
-
1152 
-
1166 int rcOffsetPoly(const float* verts, int numVerts, float offset, float* outVerts, int maxOutVerts);
-
1167 
-
1180 void rcMarkCylinderArea(rcContext* context, const float* position, float radius, float height,
-
1181  unsigned char areaId, rcCompactHeightfield& compactHeightfield);
-
1182 
-
1188 bool rcBuildDistanceField(rcContext* ctx, rcCompactHeightfield& chf);
-
1189 
-
1201 bool rcBuildRegions(rcContext* ctx, rcCompactHeightfield& chf, int borderSize, int minRegionArea, int mergeRegionArea);
-
1202 
-
1212 bool rcBuildLayerRegions(rcContext* ctx, rcCompactHeightfield& chf, int borderSize, int minRegionArea);
-
1213 
-
1225 bool rcBuildRegionsMonotone(rcContext* ctx, rcCompactHeightfield& chf,
-
1226  int borderSize, int minRegionArea, int mergeRegionArea);
-
1227 
-
1232 inline void rcSetCon(rcCompactSpan& span, int direction, int neighborIndex)
-
1233 {
-
1234  const unsigned int shift = (unsigned int)direction * 6;
-
1235  const unsigned int con = span.con;
-
1236  span.con = (con & ~(0x3f << shift)) | (((unsigned int)neighborIndex & 0x3f) << shift);
-
1237 }
-
1238 
-
1243 inline int rcGetCon(const rcCompactSpan& span, int direction)
-
1244 {
-
1245  const unsigned int shift = (unsigned int)direction * 6;
-
1246  return (span.con >> shift) & 0x3f;
-
1247 }
-
1248 
-
1252 inline int rcGetDirOffsetX(int direction)
-
1253 {
-
1254  static const int offset[4] = { -1, 0, 1, 0, };
-
1255  return offset[direction & 0x03];
-
1256 }
-
1257 
-
1258 // TODO (graham): Rename this to rcGetDirOffsetZ
-
1262 inline int rcGetDirOffsetY(int direction)
-
1263 {
-
1264  static const int offset[4] = { 0, 1, 0, -1 };
-
1265  return offset[direction & 0x03];
-
1266 }
-
1267 
-
1272 inline int rcGetDirForOffset(int offsetX, int offsetZ)
-
1273 {
-
1274  static const int dirs[5] = { 3, 0, -1, 2, 1 };
-
1275  return dirs[((offsetZ + 1) << 1) + offsetX];
-
1276 }
-
1277 
-
1282 
-
1293 bool rcBuildHeightfieldLayers(rcContext* ctx, const rcCompactHeightfield& chf,
-
1294  int borderSize, int walkableHeight,
-
1295  rcHeightfieldLayerSet& lset);
-
1296 
-
1308 bool rcBuildContours(rcContext* ctx, const rcCompactHeightfield& chf,
-
1309  float maxError, int maxEdgeLen,
-
1310  rcContourSet& cset, int buildFlags = RC_CONTOUR_TESS_WALL_EDGES);
-
1311 
-
1320 bool rcBuildPolyMesh(rcContext* ctx, const rcContourSet& cset, const int nvp, rcPolyMesh& mesh);
-
1321 
-
1329 bool rcMergePolyMeshes(rcContext* ctx, rcPolyMesh** meshes, const int nmeshes, rcPolyMesh& mesh);
-
1330 
-
1341 bool rcBuildPolyMeshDetail(rcContext* ctx, const rcPolyMesh& mesh, const rcCompactHeightfield& chf,
-
1342  float sampleDist, float sampleMaxError,
-
1343  rcPolyMeshDetail& dmesh);
-
1344 
-
1351 bool rcCopyPolyMesh(rcContext* ctx, const rcPolyMesh& src, rcPolyMesh& dst);
-
1352 
-
1360 bool rcMergePolyMeshDetails(rcContext* ctx, rcPolyMeshDetail** meshes, const int nmeshes, rcPolyMeshDetail& mesh);
-
1361 
-
1363 
-
1364 #endif // RECAST_H
-
1365 
-
1367 
-
1368 // Due to the large amount of detail documentation for this file,
-
1369 // the content normally located at the end of the header file has been separated
-
1370 // out to a file in /Docs/Extern.
+
1019 void rcFilterLowHangingWalkableObstacles(rcContext* context, int walkableClimb, rcHeightfield& heightfield);
+
1020 
+
1039 void rcFilterLedgeSpans(rcContext* context, int walkableHeight, int walkableClimb, rcHeightfield& heightfield);
+
1040 
+
1055 void rcFilterWalkableLowHeightSpans(rcContext* context, int walkableHeight, rcHeightfield& heightfield);
+
1056 
+
1062 int rcGetHeightFieldSpanCount(rcContext* context, const rcHeightfield& heightfield);
+
1063 
+
1068 
+
1088 bool rcBuildCompactHeightfield(rcContext* context, int walkableHeight, int walkableClimb,
+
1089  const rcHeightfield& heightfield, rcCompactHeightfield& compactHeightfield);
+
1090 
+
1105 bool rcErodeWalkableArea(rcContext* context, int erosionRadius, rcCompactHeightfield& compactHeightfield);
+
1106 
+
1118 bool rcMedianFilterWalkableArea(rcContext* context, rcCompactHeightfield& compactHeightfield);
+
1119 
+
1130 void rcMarkBoxArea(rcContext* context, const float* boxMinBounds, const float* boxMaxBounds, unsigned char areaId,
+
1131  rcCompactHeightfield& compactHeightfield);
+
1132 
+
1150 void rcMarkConvexPolyArea(rcContext* context, const float* verts, int numVerts,
+
1151  float minY, float maxY, unsigned char areaId,
+
1152  rcCompactHeightfield& compactHeightfield);
+
1153 
+
1167 int rcOffsetPoly(const float* verts, int numVerts, float offset, float* outVerts, int maxOutVerts);
+
1168 
+
1181 void rcMarkCylinderArea(rcContext* context, const float* position, float radius, float height,
+
1182  unsigned char areaId, rcCompactHeightfield& compactHeightfield);
+
1183 
+
1189 bool rcBuildDistanceField(rcContext* ctx, rcCompactHeightfield& chf);
+
1190 
+
1202 bool rcBuildRegions(rcContext* ctx, rcCompactHeightfield& chf, int borderSize, int minRegionArea, int mergeRegionArea);
+
1203 
+
1213 bool rcBuildLayerRegions(rcContext* ctx, rcCompactHeightfield& chf, int borderSize, int minRegionArea);
+
1214 
+
1226 bool rcBuildRegionsMonotone(rcContext* ctx, rcCompactHeightfield& chf,
+
1227  int borderSize, int minRegionArea, int mergeRegionArea);
+
1228 
+
1233 inline void rcSetCon(rcCompactSpan& span, int direction, int neighborIndex)
+
1234 {
+
1235  const unsigned int shift = (unsigned int)direction * 6;
+
1236  const unsigned int con = span.con;
+
1237  span.con = (con & ~(0x3f << shift)) | (((unsigned int)neighborIndex & 0x3f) << shift);
+
1238 }
+
1239 
+
1244 inline int rcGetCon(const rcCompactSpan& span, int direction)
+
1245 {
+
1246  const unsigned int shift = (unsigned int)direction * 6;
+
1247  return (span.con >> shift) & 0x3f;
+
1248 }
+
1249 
+
1253 inline int rcGetDirOffsetX(int direction)
+
1254 {
+
1255  static const int offset[4] = { -1, 0, 1, 0, };
+
1256  return offset[direction & 0x03];
+
1257 }
+
1258 
+
1259 // TODO (graham): Rename this to rcGetDirOffsetZ
+
1263 inline int rcGetDirOffsetY(int direction)
+
1264 {
+
1265  static const int offset[4] = { 0, 1, 0, -1 };
+
1266  return offset[direction & 0x03];
+
1267 }
+
1268 
+
1273 inline int rcGetDirForOffset(int offsetX, int offsetZ)
+
1274 {
+
1275  static const int dirs[5] = { 3, 0, -1, 2, 1 };
+
1276  return dirs[((offsetZ + 1) << 1) + offsetX];
+
1277 }
+
1278 
+
1283 
+
1294 bool rcBuildHeightfieldLayers(rcContext* ctx, const rcCompactHeightfield& chf,
+
1295  int borderSize, int walkableHeight,
+
1296  rcHeightfieldLayerSet& lset);
+
1297 
+
1309 bool rcBuildContours(rcContext* ctx, const rcCompactHeightfield& chf,
+
1310  float maxError, int maxEdgeLen,
+
1311  rcContourSet& cset, int buildFlags = RC_CONTOUR_TESS_WALL_EDGES);
+
1312 
+
1321 bool rcBuildPolyMesh(rcContext* ctx, const rcContourSet& cset, const int nvp, rcPolyMesh& mesh);
+
1322 
+
1330 bool rcMergePolyMeshes(rcContext* ctx, rcPolyMesh** meshes, const int nmeshes, rcPolyMesh& mesh);
+
1331 
+
1342 bool rcBuildPolyMeshDetail(rcContext* ctx, const rcPolyMesh& mesh, const rcCompactHeightfield& chf,
+
1343  float sampleDist, float sampleMaxError,
+
1344  rcPolyMeshDetail& dmesh);
+
1345 
+
1352 bool rcCopyPolyMesh(rcContext* ctx, const rcPolyMesh& src, rcPolyMesh& dst);
+
1353 
+
1361 bool rcMergePolyMeshDetails(rcContext* ctx, rcPolyMeshDetail** meshes, const int nmeshes, rcPolyMeshDetail& mesh);
+
1362 
+
1364 
+
1365 #endif // RECAST_H
+
1366 
+
1368 
+
1369 // Due to the large amount of detail documentation for this file,
+
1370 // the content normally located at the end of the header file has been separated
+
1371 // out to a file in /Docs/Extern.
rcVdot
float rcVdot(const float *v1, const float *v2)
Derives the dot product of two vectors.
Definition: Recast.h:710
rcTimerLabel
rcTimerLabel
Recast performance timer categories.
Definition: Recast.h:40
RC_TIMER_BUILD_REGIONS_FILTER
@ RC_TIMER_BUILD_REGIONS_FILTER
The time to filter out small regions. (See: rcBuildRegions, rcBuildRegionsMonotone)
Definition: Recast.h:90
@@ -817,7 +817,7 @@ $(document).ready(function(){initNavTree('Recast_8h_source.html',''); initResiza
rcScopedTimer::~rcScopedTimer
~rcScopedTimer()
Definition: Recast.h:203
rcScopedTimer::rcScopedTimer
rcScopedTimer(rcContext *ctx, const rcTimerLabel label)
Constructs an instance and starts the timer.
Definition: Recast.h:202
rcFilterLowHangingWalkableObstacles
void rcFilterLowHangingWalkableObstacles(rcContext *context, int walkableClimb, rcHeightfield &heightfield)
Marks non-walkable spans as walkable if their maximum is within walkableClimb of the span below them.
Definition: RecastFilter.cpp:29
-
rcFilterWalkableLowHeightSpans
void rcFilterWalkableLowHeightSpans(rcContext *context, int walkableHeight, rcHeightfield &heightfield)
Marks walkable spans as not walkable if the clearance above the span is less than the specified walka...
Definition: RecastFilter.cpp:162
+
rcFilterWalkableLowHeightSpans
void rcFilterWalkableLowHeightSpans(rcContext *context, int walkableHeight, rcHeightfield &heightfield)
Marks walkable spans as not walkable if the clearance above the span is less than the specified walka...
Definition: RecastFilter.cpp:176
rcMarkConvexPolyArea
void rcMarkConvexPolyArea(rcContext *context, const float *verts, int numVerts, float minY, float maxY, unsigned char areaId, rcCompactHeightfield &compactHeightfield)
Applies the area id to the all spans within the specified convex polygon.
Definition: RecastArea.cpp:432
rcAllocPolyMesh
rcPolyMesh * rcAllocPolyMesh()
Allocates a polygon mesh object using the Recast allocator.
Definition: Recast.cpp:222
rcRasterizeTriangle
bool rcRasterizeTriangle(rcContext *context, const float *v0, const float *v1, const float *v2, unsigned char areaID, rcHeightfield &heightfield, int flagMergeThreshold=1)
Rasterizes a single triangle into the specified heightfield.
Definition: RecastRasterization.cpp:457
@@ -838,13 +838,13 @@ $(document).ready(function(){initNavTree('Recast_8h_source.html',''); initResiza
rcFreeHeightfieldLayerSet
void rcFreeHeightfieldLayerSet(rcHeightfieldLayerSet *layerSet)
Frees the specified heightfield layer set using the Recast allocator.
Definition: Recast.cpp:165
rcBuildHeightfieldLayers
bool rcBuildHeightfieldLayers(rcContext *ctx, const rcCompactHeightfield &chf, int borderSize, int walkableHeight, rcHeightfieldLayerSet &lset)
Builds a layer set from the specified compact heightfield.
Definition: RecastLayers.cpp:104
rcMergePolyMeshDetails
bool rcMergePolyMeshDetails(rcContext *ctx, rcPolyMeshDetail **meshes, const int nmeshes, rcPolyMeshDetail &mesh)
Merges multiple detail meshes into a single detail mesh.
Definition: RecastMeshDetail.cpp:1401
-
rcGetDirOffsetY
int rcGetDirOffsetY(int direction)
Gets the standard height (z-axis) offset for the specified direction.
Definition: Recast.h:1262
-
rcGetDirOffsetX
int rcGetDirOffsetX(int direction)
Gets the standard width (x-axis) offset for the specified direction.
Definition: Recast.h:1252
+
rcGetDirOffsetY
int rcGetDirOffsetY(int direction)
Gets the standard height (z-axis) offset for the specified direction.
Definition: Recast.h:1263
+
rcGetDirOffsetX
int rcGetDirOffsetX(int direction)
Gets the standard width (x-axis) offset for the specified direction.
Definition: Recast.h:1253
rcMedianFilterWalkableArea
bool rcMedianFilterWalkableArea(rcContext *context, rcCompactHeightfield &compactHeightfield)
Applies a median filter to walkable area types (based on area id), removing noise.
Definition: RecastArea.cpp:289
rcBuildPolyMesh
bool rcBuildPolyMesh(rcContext *ctx, const rcContourSet &cset, const int nvp, rcPolyMesh &mesh)
Builds a polygon mesh from the provided contours.
Definition: RecastMesh.cpp:990
rcAddSpan
bool rcAddSpan(rcContext *context, rcHeightfield &heightfield, int x, int z, unsigned short spanMin, unsigned short spanMax, unsigned char areaID, int flagMergeThreshold)
Adds a span to the specified heightfield.
Definition: RecastRasterization.cpp:191
rcCalcGridSize
void rcCalcGridSize(const float *minBounds, const float *maxBounds, float cellSize, int *sizeX, int *sizeZ)
Calculates the grid size based on the bounding box and grid cell size.
Definition: Recast.cpp:300
-
rcSetCon
void rcSetCon(rcCompactSpan &span, int direction, int neighborIndex)
Sets the neighbor connection data for the specified direction.
Definition: Recast.h:1232
+
rcSetCon
void rcSetCon(rcCompactSpan &span, int direction, int neighborIndex)
Sets the neighbor connection data for the specified direction.
Definition: Recast.h:1233
rcCalcBounds
void rcCalcBounds(const float *verts, int numVerts, float *minBounds, float *maxBounds)
Calculates the bounding box of an array of vertices.
Definition: Recast.cpp:287
rcFreeCompactHeightfield
void rcFreeCompactHeightfield(rcCompactHeightfield *compactHeightfield)
Frees the specified compact heightfield object using the Recast allocator.
Definition: Recast.cpp:127
rcMergePolyMeshes
bool rcMergePolyMeshes(rcContext *ctx, rcPolyMesh **meshes, const int nmeshes, rcPolyMesh &mesh)
Merges multiple polygon meshes into a single mesh.
Definition: RecastMesh.cpp:1309
@@ -852,7 +852,7 @@ $(document).ready(function(){initNavTree('Recast_8h_source.html',''); initResiza
rcGetHeightFieldSpanCount
int rcGetHeightFieldSpanCount(rcContext *context, const rcHeightfield &heightfield)
Returns the number of spans contained in the specified heightfield.
Definition: Recast.cpp:384
rcBuildRegionsMonotone
bool rcBuildRegionsMonotone(rcContext *ctx, rcCompactHeightfield &chf, int borderSize, int minRegionArea, int mergeRegionArea)
Builds region data for the heightfield using simple monotone partitioning.
Definition: RecastRegion.cpp:1357
rcClearUnwalkableTriangles
void rcClearUnwalkableTriangles(rcContext *context, float walkableSlopeAngle, const float *verts, int numVerts, const int *tris, int numTris, unsigned char *triAreaIDs)
Sets the area id of all triangles with a slope greater than or equal to the specified value to RC_NUL...
Definition: Recast.cpp:360
-
rcGetCon
int rcGetCon(const rcCompactSpan &span, int direction)
Gets neighbor connection data for the specified direction.
Definition: Recast.h:1243
+
rcGetCon
int rcGetCon(const rcCompactSpan &span, int direction)
Gets neighbor connection data for the specified direction.
Definition: Recast.h:1244
rcFilterLedgeSpans
void rcFilterLedgeSpans(rcContext *context, int walkableHeight, int walkableClimb, rcHeightfield &heightfield)
Marks spans that are ledges as not-walkable.
Definition: RecastFilter.cpp:67
rcRasterizeTriangles
bool rcRasterizeTriangles(rcContext *context, const float *verts, int numVerts, const int *tris, const unsigned char *triAreaIDs, int numTris, rcHeightfield &heightfield, int flagMergeThreshold=1)
Rasterizes an indexed triangle mesh into the specified heightfield.
Definition: RecastRasterization.cpp:477
rcAllocHeightfieldLayerSet
rcHeightfieldLayerSet * rcAllocHeightfieldLayerSet()
Allocates a heightfield layer set using the Recast allocator.
Definition: Recast.cpp:160
@@ -860,7 +860,7 @@ $(document).ready(function(){initNavTree('Recast_8h_source.html',''); initResiza
rcBuildContours
bool rcBuildContours(rcContext *ctx, const rcCompactHeightfield &chf, float maxError, int maxEdgeLen, rcContourSet &cset, int buildFlags=RC_CONTOUR_TESS_WALL_EDGES)
Builds a contour set from the region outlines in the provided compact heightfield.
Definition: RecastContour.cpp:823
rcFreeContourSet
void rcFreeContourSet(rcContourSet *contourSet)
Frees the specified contour set using the Recast allocator.
Definition: Recast.cpp:193
rcErodeWalkableArea
bool rcErodeWalkableArea(rcContext *context, int erosionRadius, rcCompactHeightfield &compactHeightfield)
Erodes the walkable area within the heightfield by the specified radius.
Definition: RecastArea.cpp:75
-
rcGetDirForOffset
int rcGetDirForOffset(int offsetX, int offsetZ)
Gets the direction for the specified offset.
Definition: Recast.h:1272
+
rcGetDirForOffset
int rcGetDirForOffset(int offsetX, int offsetZ)
Gets the direction for the specified offset.
Definition: Recast.h:1273
rcBuildRegions
bool rcBuildRegions(rcContext *ctx, rcCompactHeightfield &chf, int borderSize, int minRegionArea, int mergeRegionArea)
Builds region data for the heightfield using watershed partitioning.
Definition: RecastRegion.cpp:1530
rcOffsetPoly
int rcOffsetPoly(const float *verts, int numVerts, float offset, float *outVerts, int maxOutVerts)
Expands a convex polygon along its vertex normals by the given offset amount.
Definition: RecastArea.cpp:532
rcCompactCell
Provides information on the content of a cell column in a compact heightfield.
Definition: Recast.h:337
diff --git a/group__recast.html b/group__recast.html index b75c2c67..6f28b049 100644 --- a/group__recast.html +++ b/group__recast.html @@ -1508,7 +1508,7 @@ Classes

Marks non-walkable spans as walkable if their maximum is within walkableClimb of the span below them.

-

This removes small obstacles that the agent would be able to walk over such as curbs, and also allows agents to move up structures such as stairs.

+

This removes small obstacles and rasterization artifacts that the agent would be able to walk over such as curbs. It also allows agents to move up terraced structures like stairs.

Obstacle spans are marked walkable if: obstacleSpan.smax - walkableSpan.smax < walkableClimb

Warning
Will override the effect of rcFilterLedgeSpans. If both filters are used, call rcFilterLedgeSpans only after applying this filter.
See also
rcHeightfield, rcConfig
diff --git a/structrcCompactHeightfield.html b/structrcCompactHeightfield.html index d3d42597..82c11e5b 100644 --- a/structrcCompactHeightfield.html +++ b/structrcCompactHeightfield.html @@ -227,9 +227,9 @@ Direction 3 = (0, -1)
static const unsigned char RC_NULL_AREA
Represents the null area.
Definition: Recast.h:635
static const unsigned char RC_WALKABLE_AREA
The default area id used to indicate a walkable polygon.
Definition: Recast.h:640
static const int RC_NOT_CONNECTED
The value returned by rcGetCon if the specified direction is not connected to another span.
Definition: Recast.h:644
-
int rcGetDirOffsetY(int direction)
Gets the standard height (z-axis) offset for the specified direction.
Definition: Recast.h:1262
-
int rcGetDirOffsetX(int direction)
Gets the standard width (x-axis) offset for the specified direction.
Definition: Recast.h:1252
-
int rcGetCon(const rcCompactSpan &span, int direction)
Gets neighbor connection data for the specified direction.
Definition: Recast.h:1243
+
int rcGetDirOffsetY(int direction)
Gets the standard height (z-axis) offset for the specified direction.
Definition: Recast.h:1263
+
int rcGetDirOffsetX(int direction)
Gets the standard width (x-axis) offset for the specified direction.
Definition: Recast.h:1253
+
int rcGetCon(const rcCompactSpan &span, int direction)
Gets neighbor connection data for the specified direction.
Definition: Recast.h:1244
Provides information on the content of a cell column in a compact heightfield.
Definition: Recast.h:337
unsigned int count
Number of spans in the column.
Definition: Recast.h:339
unsigned int index
Index to the first span in the column.
Definition: Recast.h:338