@@ -171,10 +187,10 @@ Functions
- | static int pointInPoly |
+ static bool pointInPoly |
( |
int |
- nvert, |
+ numVerts, |
|
@@ -186,7 +202,7 @@ Functions
|
|
const float * |
- p |
+ point |
|
@@ -201,6 +217,74 @@ Functions
+ Checks if a point is contained within a polygon.
+ - Parameters
-
+
+ | [in] | numVerts | Number of vertices in the polygon |
+ | [in] | verts | The polygon vertices |
+ | [in] | point | The point to check |
+
+
+
+ - Returns
- true if the point lies within the polygon, false otherwise.
+
+
+
+
+◆ rcVsafeNormalize()
+
+
+
+
+
+
+
+
+ | static void rcVsafeNormalize |
+ ( |
+ float * |
+ v | ) |
+ |
+
+
+ |
+
+static |
+
+
+
+
+ Normalizes the vector if the length is greater than zero.
+ If the magnitude is zero, the vector is unchanged. - Parameters
-
+
+ | [in,out] | v | The vector to normalize. [(x, y, z)] |
+
+
+
+
+
+
+
+
+◆ EPSILON
+
+
+
+
+
+
+
+
+ | const float EPSILON = 1e-6f |
+
+
+ |
+
+static |
+
+
+
+
diff --git a/RecastArea_8cpp.js b/RecastArea_8cpp.js
index 407eb63a..2c9b70e0 100644
--- a/RecastArea_8cpp.js
+++ b/RecastArea_8cpp.js
@@ -1,11 +1,13 @@
var RecastArea_8cpp =
[
- [ "insertSort", "RecastArea_8cpp.html#a1071db3bfc13a7c581093d1f448f5e40", null ],
- [ "pointInPoly", "RecastArea_8cpp.html#aec57aa531152be79fa4a68bd4b2782f0", null ],
- [ "rcErodeWalkableArea", "group__recast.html#ga466672bb756c401fbf6dd1e99c920ebb", null ],
- [ "rcMarkBoxArea", "group__recast.html#ga527b4c24537e47bcc472f28965c7b7bf", null ],
- [ "rcMarkConvexPolyArea", "group__recast.html#ga1e8f3c9c2cb664fb2874d01448a1f223", null ],
- [ "rcMarkCylinderArea", "group__recast.html#gac2de1bc06b5804dd4304a90f39829948", null ],
- [ "rcMedianFilterWalkableArea", "group__recast.html#ga793672ade7833e916dd3c0e7a5bd6cc5", null ],
- [ "rcOffsetPoly", "group__recast.html#gad71d03bb37c1a16700d57c5f7dff4057", null ]
+ [ "insertSort", "RecastArea_8cpp.html#a544f2c39b38253edc9d12e2f6567ae11", null ],
+ [ "pointInPoly", "RecastArea_8cpp.html#a1499638887cce3274469f05084c60f5d", null ],
+ [ "rcErodeWalkableArea", "group__recast.html#gaf2bf6010fc80e9b6e8f4c0c1fef7a97f", null ],
+ [ "rcMarkBoxArea", "group__recast.html#gab76182beff7fc231b489c414b26e8638", null ],
+ [ "rcMarkConvexPolyArea", "group__recast.html#ga0dee8037963c1452a25b3835f3e8d902", null ],
+ [ "rcMarkCylinderArea", "group__recast.html#ga2c4bba9a06ae30ac063fba1a69a68cd9", null ],
+ [ "rcMedianFilterWalkableArea", "group__recast.html#ga80e89976e7d6388f1a78ad622ef57bdf", null ],
+ [ "rcOffsetPoly", "group__recast.html#gafbf610dce5157badc30bd847684a3f9c", null ],
+ [ "rcVsafeNormalize", "RecastArea_8cpp.html#ac4b52279afe6cd37e7e3213e62fb1bab", null ],
+ [ "EPSILON", "RecastArea_8cpp.html#ab84b0a39a5bcd3e4bd1a2d19b015bde9", null ]
];
\ No newline at end of file
diff --git a/Recast_8h.html b/Recast_8h.html
index ba63287d..0adbe220 100644
--- a/Recast_8h.html
+++ b/Recast_8h.html
@@ -358,24 +358,24 @@ Functions |
| bool | rcBuildCompactHeightfield (rcContext *context, int walkableHeight, int walkableClimb, const rcHeightfield &heightfield, rcCompactHeightfield &compactHeightfield) |
| | Builds a compact heightfield representing open space, from a heightfield representing solid space. More...
|
| |
-
| bool | rcErodeWalkableArea (rcContext *ctx, int radius, rcCompactHeightfield &chf) |
-
| | Erodes the walkable area within the heightfield by the specified radius. More...
|
-
| |
-
| bool | rcMedianFilterWalkableArea (rcContext *ctx, rcCompactHeightfield &chf) |
-
| | Applies a median filter to walkable area types (based on area id), removing noise. More...
|
-
| |
-
| void | rcMarkBoxArea (rcContext *ctx, const float *bmin, const float *bmax, unsigned char areaId, rcCompactHeightfield &chf) |
-
| | Applies an area id to all spans within the specified bounding box. More...
|
-
| |
-
| void | rcMarkConvexPolyArea (rcContext *ctx, const float *verts, const int nverts, const float hmin, const float hmax, unsigned char areaId, rcCompactHeightfield &chf) |
-
| | Applies the area id to the all spans within the specified convex polygon. More...
|
-
| |
-
| int | rcOffsetPoly (const float *verts, const int nverts, const float offset, float *outVerts, const int maxOutVerts) |
-
| | Helper function to offset voncex polygons for rcMarkConvexPolyArea. More...
|
-
| |
-
| void | rcMarkCylinderArea (rcContext *ctx, const float *pos, const float r, const float h, unsigned char areaId, rcCompactHeightfield &chf) |
-
| | Applies the area id to all spans within the specified cylinder. More...
|
-
| |
+
| bool | rcErodeWalkableArea (rcContext *context, int erosionRadius, rcCompactHeightfield &compactHeightfield) |
+
| | Erodes the walkable area within the heightfield by the specified radius. More...
|
+
| |
+
| bool | rcMedianFilterWalkableArea (rcContext *context, rcCompactHeightfield &compactHeightfield) |
+
| | Applies a median filter to walkable area types (based on area id), removing noise. More...
|
+
| |
+
| void | rcMarkBoxArea (rcContext *context, const float *boxMinBounds, const float *boxMaxBounds, unsigned char areaId, rcCompactHeightfield &compactHeightfield) |
+
| | Applies an area id to all spans within the specified bounding box. More...
|
+
| |
+
| 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. More...
|
+
| |
+
| 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. More...
|
+
| |
+
| void | rcMarkCylinderArea (rcContext *context, const float *position, float radius, float height, unsigned char areaId, rcCompactHeightfield &compactHeightfield) |
+
| | Applies the area id to all spans within the specified y-axis-aligned cylinder. More...
|
+
| |
| bool | rcBuildDistanceField (rcContext *ctx, rcCompactHeightfield &chf) |
| | Builds the distance field for the specified compact heightfield. More...
|
| |
@@ -552,7 +552,7 @@ Variables
| RC_TIMER_FILTER_WALKABLE | The time to filter low height spans. (See: rcFilterWalkableLowHeightSpans)
|
-
| RC_TIMER_MEDIAN_AREA | The time to apply the median filter. (See: rcMedianFilterWalkableArea)
+ |
| RC_TIMER_MEDIAN_AREA | The time to apply the median filter. (See: rcMedianFilterWalkableArea)
|
| RC_TIMER_FILTER_LOW_OBSTACLES | The time to filter low obstacles. (See: rcFilterLowHangingWalkableObstacles)
|
@@ -560,13 +560,13 @@ Variables
| RC_TIMER_MERGE_POLYMESH | The time to merge polygon meshes. (See: rcMergePolyMeshes)
|
-
| RC_TIMER_ERODE_AREA | The time to erode the walkable area. (See: rcErodeWalkableArea)
+ |
| RC_TIMER_ERODE_AREA | The time to erode the walkable area. (See: rcErodeWalkableArea)
|
-
| RC_TIMER_MARK_BOX_AREA | The time to mark a box area. (See: rcMarkBoxArea)
+ |
| RC_TIMER_MARK_BOX_AREA | The time to mark a box area. (See: rcMarkBoxArea)
|
-
| RC_TIMER_MARK_CYLINDER_AREA | The time to mark a cylinder area. (See: rcMarkCylinderArea)
+ |
| RC_TIMER_MARK_CYLINDER_AREA | The time to mark a cylinder area. (See: rcMarkCylinderArea)
|
-
| RC_TIMER_MARK_CONVEXPOLY_AREA | The time to mark a convex polygon area. (See: rcMarkConvexPolyArea)
+ |
| RC_TIMER_MARK_CONVEXPOLY_AREA | The time to mark a convex polygon area. (See: rcMarkConvexPolyArea)
|
| RC_TIMER_BUILD_DISTANCEFIELD | The total time to build the distance field. (See: rcBuildDistanceField)
|
diff --git a/Recast_8h.js b/Recast_8h.js
index 03a98e3e..9a1ab66b 100644
--- a/Recast_8h.js
+++ b/Recast_8h.js
@@ -70,7 +70,7 @@ var Recast_8h =
[ "rcClearUnwalkableTriangles", "group__recast.html#gad293e95cc9b22e4305ad2c6fbf946622", null ],
[ "rcCopyPolyMesh", "group__recast.html#gadd16ae360ef930c3ba8c4839e3065d40", null ],
[ "rcCreateHeightfield", "group__recast.html#ga47eca35f60dbd7ddc1cb18fdb2493833", null ],
- [ "rcErodeWalkableArea", "group__recast.html#ga466672bb756c401fbf6dd1e99c920ebb", null ],
+ [ "rcErodeWalkableArea", "group__recast.html#gaf2bf6010fc80e9b6e8f4c0c1fef7a97f", null ],
[ "rcFilterLedgeSpans", "group__recast.html#gad40c996631bc70091d7355dc4c950655", null ],
[ "rcFilterLowHangingWalkableObstacles", "group__recast.html#ga009f5e462077cc2f6d1f5fff57f2e412", null ],
[ "rcFilterWalkableLowHeightSpans", "group__recast.html#ga0dbfbeebd642c1b79323ba7723d91a49", null ],
@@ -86,16 +86,16 @@ var Recast_8h =
[ "rcGetDirOffsetY", "group__recast.html#ga7d225822d057252755aeeebdc2388cf2", null ],
[ "rcGetHeightFieldSpanCount", "group__recast.html#gabade813042a8c79ddb2f4ecf84620cf8", null ],
[ "rcIgnoreUnused", "Recast_8h.html#a590be6fed00e1ed747939ee51b0b433c", null ],
- [ "rcMarkBoxArea", "group__recast.html#ga527b4c24537e47bcc472f28965c7b7bf", null ],
- [ "rcMarkConvexPolyArea", "group__recast.html#ga1e8f3c9c2cb664fb2874d01448a1f223", null ],
- [ "rcMarkCylinderArea", "group__recast.html#gac2de1bc06b5804dd4304a90f39829948", null ],
+ [ "rcMarkBoxArea", "group__recast.html#gab76182beff7fc231b489c414b26e8638", null ],
+ [ "rcMarkConvexPolyArea", "group__recast.html#ga0dee8037963c1452a25b3835f3e8d902", null ],
+ [ "rcMarkCylinderArea", "group__recast.html#ga2c4bba9a06ae30ac063fba1a69a68cd9", null ],
[ "rcMarkWalkableTriangles", "group__recast.html#ga63e7b847422bfd78acea724088da6561", null ],
[ "rcMax", "Recast_8h.html#accb921a8353da3a74aa90a491aff74c8", null ],
- [ "rcMedianFilterWalkableArea", "group__recast.html#ga793672ade7833e916dd3c0e7a5bd6cc5", null ],
+ [ "rcMedianFilterWalkableArea", "group__recast.html#ga80e89976e7d6388f1a78ad622ef57bdf", null ],
[ "rcMergePolyMeshDetails", "group__recast.html#ga6ef022fcf6dabdb0437b979304c0defe", null ],
[ "rcMergePolyMeshes", "group__recast.html#gaa28c3eb627ca7d96015c7978ff0eb8f7", null ],
[ "rcMin", "Recast_8h.html#aac83e8b749d8fed2164e00e7e0f43687", null ],
- [ "rcOffsetPoly", "group__recast.html#gad71d03bb37c1a16700d57c5f7dff4057", null ],
+ [ "rcOffsetPoly", "group__recast.html#gafbf610dce5157badc30bd847684a3f9c", null ],
[ "rcRasterizeTriangle", "group__recast.html#ga23a98560fac96a1d2eb9f01c6617e927", null ],
[ "rcRasterizeTriangles", "group__recast.html#gaebc5f38893ede7ee5d107a9ad2dbd369", null ],
[ "rcRasterizeTriangles", "group__recast.html#gadac24191b69876017ed01d85e0a44645", null ],
diff --git a/Recast_8h_source.html b/Recast_8h_source.html
index 80e9f3dc..1ed1d93c 100644
--- a/Recast_8h_source.html
+++ b/Recast_8h_source.html
@@ -499,7 +499,7 @@ $(document).ready(function(){initNavTree('Recast_8h_source.html',''); initResiza
667 template<
class T>
inline T
rcAbs(T a) {
return a < 0 ? -a : a; }
-
672 template<
class T>
inline T
rcSqr(T a) {
return a*a; }
+
672 template<
class T>
inline T
rcSqr(T a) {
return a * a; }
679 template<
class T>
inline T
rcClamp(T value, T minInclusive, T maxInclusive)
@@ -637,93 +637,91 @@ $(document).ready(function(){initNavTree('Recast_8h_source.html',''); initResiza
-
-
-
-
-
-
-
-
-
1123 const float hmin,
const float hmax,
unsigned char areaId,
-
-
-
1134 int rcOffsetPoly(
const float* verts,
const int nverts,
const float offset,
-
1135 float* outVerts,
const int maxOutVerts);
-
-
-
1146 const float r,
const float h,
unsigned char areaId,
-
-
-
-
-
-
-
-
-
-
1192 int borderSize,
int minRegionArea,
int mergeRegionArea);
-
-
-
-
1200 const unsigned int shift = (
unsigned int)direction * 6;
-
1201 const unsigned int con = span.
con;
-
1202 span.
con = (con & ~(0x3f << shift)) | (((
unsigned int)neighborIndex & 0x3f) << shift);
-
-
-
-
-
1211 const unsigned int shift = (
unsigned int)direction * 6;
-
1212 return (span.
con >> shift) & 0x3f;
-
-
-
-
-
1220 static const int offset[4] = { -1, 0, 1, 0, };
-
1221 return offset[direction & 0x03];
-
-
-
-
-
-
1230 static const int offset[4] = { 0, 1, 0, -1 };
-
1231 return offset[direction & 0x03];
-
-
-
-
-
1240 static const int dirs[5] = { 3, 0, -1, 2, 1 };
-
1241 return dirs[((offsetZ + 1) << 1) + offsetX];
-
-
-
-
-
1260 int borderSize,
int walkableHeight,
-
-
-
-
1275 float maxError,
int maxEdgeLen,
-
-
-
-
-
-
-
-
1308 float sampleDist,
float sampleMaxError,
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
1127 void rcMarkBoxArea(
rcContext* context,
const float* boxMinBounds,
const float* boxMaxBounds,
unsigned char areaId,
+
+
+
+
1148 float minY,
float maxY,
unsigned char areaId,
+
+
+
1164 int rcOffsetPoly(
const float* verts,
int numVerts,
float offset,
float* outVerts,
int maxOutVerts);
+
+
+
+
+
+
+
+
+
+
+
+
1224 int borderSize,
int minRegionArea,
int mergeRegionArea);
+
+
+
+
1232 const unsigned int shift = (
unsigned int)direction * 6;
+
1233 const unsigned int con = span.
con;
+
1234 span.
con = (con & ~(0x3f << shift)) | (((
unsigned int)neighborIndex & 0x3f) << shift);
+
+
+
+
+
1243 const unsigned int shift = (
unsigned int)direction * 6;
+
1244 return (span.
con >> shift) & 0x3f;
+
+
+
+
+
1252 static const int offset[4] = { -1, 0, 1, 0, };
+
1253 return offset[direction & 0x03];
+
+
+
+
+
+
1262 static const int offset[4] = { 0, 1, 0, -1 };
+
1263 return offset[direction & 0x03];
+
+
+
+
+
1272 static const int dirs[5] = { 3, 0, -1, 2, 1 };
+
1273 return dirs[((offsetZ + 1) << 1) + offsetX];
+
+
+
+
+
1292 int borderSize,
int walkableHeight,
+
+
+
+
1307 float maxError,
int maxEdgeLen,
+
+
+
+
+
+
+
+
1340 float sampleDist,
float sampleMaxError,
+
+
+
+
+
+
+
+
+
+
+
+
+
float rcVdot(const float *v1, const float *v2)
Derives the dot product of two vectors.
Definition: Recast.h:708
rcTimerLabel
Recast performance timer categories.
Definition: Recast.h:40
@ RC_TIMER_BUILD_REGIONS_FILTER
The time to filter out small regions. (See: rcBuildRegions, rcBuildRegionsMonotone)
Definition: Recast.h:90
@@ -817,20 +815,19 @@ $(document).ready(function(){initNavTree('Recast_8h_source.html',''); initResiza
rcScopedTimer(rcContext *ctx, const rcTimerLabel label)
Constructs an instance and starts the timer.
Definition: Recast.h:202
void rcFilterLowHangingWalkableObstacles(rcContext *context, int walkableClimb, rcHeightfield &heightfield)
Marks non-walkable spans as walkable if their maximum is within walkableClimb of a walkable neighbor.
Definition: RecastFilter.cpp:24
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 heigh...
Definition: RecastFilter.cpp:157
+
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
rcPolyMesh * rcAllocPolyMesh()
Allocates a polygon mesh object using the Recast allocator.
Definition: Recast.cpp:222
-
void rcMarkConvexPolyArea(rcContext *ctx, const float *verts, const int nverts, const float hmin, const float hmax, unsigned char areaId, rcCompactHeightfield &chf)
Applies the area id to the all spans within the specified convex polygon.
Definition: RecastArea.cpp:380
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:458
bool rcBuildDistanceField(rcContext *ctx, rcCompactHeightfield &chf)
Builds the distance field for the specified compact heightfield.
Definition: RecastRegion.cpp:1253
bool rcBuildPolyMeshDetail(rcContext *ctx, const rcPolyMesh &mesh, const rcCompactHeightfield &chf, float sampleDist, float sampleMaxError, rcPolyMeshDetail &dmesh)
Builds a detail mesh from the provided polygon mesh.
Definition: RecastMeshDetail.cpp:1170
rcContourSet * rcAllocContourSet()
Allocates a contour set object using the Recast allocator.
Definition: Recast.cpp:188
+
void rcMarkCylinderArea(rcContext *context, const float *position, float radius, float height, unsigned char areaId, rcCompactHeightfield &compactHeightfield)
Applies the area id to all spans within the specified y-axis-aligned cylinder.
Definition: RecastArea.cpp:633
void rcFreePolyMesh(rcPolyMesh *polyMesh)
Frees the specified polygon mesh using the Recast allocator.
Definition: Recast.cpp:227
bool rcBuildCompactHeightfield(rcContext *context, int walkableHeight, int walkableClimb, const rcHeightfield &heightfield, rcCompactHeightfield &compactHeightfield)
Builds a compact heightfield representing open space, from a heightfield representing solid space.
Definition: Recast.cpp:403
rcHeightfield * rcAllocHeightfield()
Allocates a heightfield object using the Recast allocator.
Definition: Recast.cpp:86
void rcFreePolyMeshDetail(rcPolyMeshDetail *detailMesh)
Frees the specified detail mesh using the Recast allocator.
Definition: Recast.cpp:265
bool rcBuildLayerRegions(rcContext *ctx, rcCompactHeightfield &chf, int borderSize, int minRegionArea)
Builds region data for the heightfield by partitioning the heightfield in non-overlapping layers.
Definition: RecastRegion.cpp:1661
-
bool rcErodeWalkableArea(rcContext *ctx, int radius, rcCompactHeightfield &chf)
Erodes the walkable area within the heightfield by the specified radius.
Definition: RecastArea.cpp:36
bool rcCreateHeightfield(rcContext *context, rcHeightfield &heightfield, int sizeX, int sizeZ, const float *minBounds, const float *maxBounds, float cellSize, float cellHeight)
Initializes a new heightfield.
Definition: Recast.cpp:306
-
void rcMarkBoxArea(rcContext *ctx, const float *bmin, const float *bmax, unsigned char areaId, rcCompactHeightfield &chf)
Applies an area id to all spans within the specified bounding box.
Definition: RecastArea.cpp:315
rcPolyMeshDetail * rcAllocPolyMeshDetail()
Allocates a detail mesh object using the Recast allocator.
Definition: Recast.cpp:260
void rcFreeHeightField(rcHeightfield *heightfield)
Frees the specified heightfield object using the Recast allocator.
Definition: Recast.cpp:91
void rcMarkWalkableTriangles(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 below the specified value to RC_WALKABLE_AREA.
Definition: Recast.cpp:336
@@ -838,30 +835,31 @@ $(document).ready(function(){initNavTree('Recast_8h_source.html',''); initResiza
void rcFreeHeightfieldLayerSet(rcHeightfieldLayerSet *layerSet)
Frees the specified heightfield layer set using the Recast allocator.
Definition: Recast.cpp:165
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
bool rcMergePolyMeshDetails(rcContext *ctx, rcPolyMeshDetail **meshes, const int nmeshes, rcPolyMeshDetail &mesh)
Merges multiple detail meshes into a single detail mesh.
Definition: RecastMeshDetail.cpp:1389
-
bool rcMedianFilterWalkableArea(rcContext *ctx, rcCompactHeightfield &chf)
Applies a median filter to walkable area types (based on area id), removing noise.
Definition: RecastArea.cpp:238
-
int rcGetDirOffsetY(int direction)
Gets the standard height (z-axis) offset for the specified direction.
Definition: Recast.h:1228
-
int rcGetDirOffsetX(int direction)
Gets the standard width (x-axis) offset for the specified direction.
Definition: Recast.h:1218
+
int rcGetDirOffsetY(int direction)
Gets the standard height (z-axis) offset for the specified direction.
Definition: Recast.h:1260
+
int rcGetDirOffsetX(int direction)
Gets the standard width (x-axis) offset for the specified direction.
Definition: Recast.h:1250
+
bool rcMedianFilterWalkableArea(rcContext *context, rcCompactHeightfield &compactHeightfield)
Applies a median filter to walkable area types (based on area id), removing noise.
Definition: RecastArea.cpp:289
bool rcBuildPolyMesh(rcContext *ctx, const rcContourSet &cset, const int nvp, rcPolyMesh &mesh)
Builds a polygon mesh from the provided contours.
Definition: RecastMesh.cpp:989
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:192
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
-
void rcSetCon(rcCompactSpan &span, int direction, int neighborIndex)
Sets the neighbor connection data for the specified direction.
Definition: Recast.h:1198
+
void rcSetCon(rcCompactSpan &span, int direction, int neighborIndex)
Sets the neighbor connection data for the specified direction.
Definition: Recast.h:1230
void rcCalcBounds(const float *verts, int numVerts, float *minBounds, float *maxBounds)
Calculates the bounding box of an array of vertices.
Definition: Recast.cpp:287
void rcFreeCompactHeightfield(rcCompactHeightfield *compactHeightfield)
Frees the specified compact heightfield object using the Recast allocator.
Definition: Recast.cpp:127
bool rcMergePolyMeshes(rcContext *ctx, rcPolyMesh **meshes, const int nmeshes, rcPolyMesh &mesh)
Merges multiple polygon meshes into a single mesh.
Definition: RecastMesh.cpp:1308
+
void rcMarkBoxArea(rcContext *context, const float *boxMinBounds, const float *boxMaxBounds, unsigned char areaId, rcCompactHeightfield &compactHeightfield)
Applies an area id to all spans within the specified bounding box.
Definition: RecastArea.cpp:371
int rcGetHeightFieldSpanCount(rcContext *context, const rcHeightfield &heightfield)
Returns the number of spans contained in the specified heightfield.
Definition: Recast.cpp:384
-
void rcMarkCylinderArea(rcContext *ctx, const float *pos, const float r, const float h, unsigned char areaId, rcCompactHeightfield &chf)
Applies the area id to all spans within the specified cylinder.
Definition: RecastArea.cpp:528
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:1352
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
-
int rcGetCon(const rcCompactSpan &span, int direction)
Gets neighbor connection data for the specified direction.
Definition: Recast.h:1209
+
int rcGetCon(const rcCompactSpan &span, int direction)
Gets neighbor connection data for the specified direction.
Definition: Recast.h:1241
void rcFilterLedgeSpans(rcContext *context, int walkableHeight, int walkableClimb, rcHeightfield &heightfield)
Marks spans that are ledges as not-walkable.
Definition: RecastFilter.cpp:62
-
int rcOffsetPoly(const float *verts, const int nverts, const float offset, float *outVerts, const int maxOutVerts)
Helper function to offset voncex polygons for rcMarkConvexPolyArea.
Definition: RecastArea.cpp:445
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:478
rcHeightfieldLayerSet * rcAllocHeightfieldLayerSet()
Allocates a heightfield layer set using the Recast allocator.
Definition: Recast.cpp:160
bool rcCopyPolyMesh(rcContext *ctx, const rcPolyMesh &src, rcPolyMesh &dst)
Copies the poly mesh data from src to dst.
Definition: RecastMesh.cpp:1486
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
void rcFreeContourSet(rcContourSet *contourSet)
Frees the specified contour set using the Recast allocator.
Definition: Recast.cpp:193
-
int rcGetDirForOffset(int offsetX, int offsetZ)
Gets the direction for the specified offset.
Definition: Recast.h:1238
+
bool rcErodeWalkableArea(rcContext *context, int erosionRadius, rcCompactHeightfield &compactHeightfield)
Erodes the walkable area within the heightfield by the specified radius.
Definition: RecastArea.cpp:75
+
int rcGetDirForOffset(int offsetX, int offsetZ)
Gets the direction for the specified offset.
Definition: Recast.h:1270
bool rcBuildRegions(rcContext *ctx, rcCompactHeightfield &chf, int borderSize, int minRegionArea, int mergeRegionArea)
Builds region data for the heightfield using watershed partitioning.
Definition: RecastRegion.cpp:1525
+
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
Provides information on the content of a cell column in a compact heightfield.
Definition: Recast.h:335
unsigned int count
Number of spans in the column.
Definition: Recast.h:337
unsigned int index
Index to the first span in the column.
Definition: Recast.h:336
diff --git a/globals_e.html b/globals_e.html
index b1298c9d..ea13cc9e 100644
--- a/globals_e.html
+++ b/globals_e.html
@@ -90,6 +90,9 @@ $(document).ready(function(){initNavTree('globals_e.html',''); initResizable();
EdgeValues
: RecastMeshDetail.cpp
+
EPSILON
+: RecastArea.cpp
+
EV_HULL
: RecastMeshDetail.cpp
diff --git a/globals_func_i.html b/globals_func_i.html
index e3f59293..18b86e76 100644
--- a/globals_func_i.html
+++ b/globals_func_i.html
@@ -213,7 +213,7 @@ $(document).ready(function(){initNavTree('globals_func_i.html',''); initResizabl
:
DetourNavMeshQuery.cpp
insertSort()
-: RecastArea.cpp
+: RecastArea.cpp
integrate()
: DetourCrowd.cpp
diff --git a/globals_func_p.html b/globals_func_p.html
index 9cb4bb2c..635bb405 100644
--- a/globals_func_p.html
+++ b/globals_func_p.html
@@ -99,7 +99,7 @@ $(document).ready(function(){initNavTree('globals_func_p.html',''); initResizabl
, TestCase.cpp
pointInPoly()
-: RecastArea.cpp
+: RecastArea.cpp
, ConvexVolumeTool.cpp
polyMinExtent()
diff --git a/globals_func_r.html b/globals_func_r.html
index 59f62f29..a774d49e 100644
--- a/globals_func_r.html
+++ b/globals_func_r.html
@@ -161,8 +161,8 @@ $(document).ready(function(){initNavTree('globals_func_r.html',''); initResizabl
, RecastRegion.cpp
rcBuildPolyMesh()
-: Recast.h
-, RecastMesh.cpp
+: RecastMesh.cpp
+, Recast.h
rcBuildPolyMeshDetail()
: Recast.h
@@ -196,16 +196,16 @@ $(document).ready(function(){initNavTree('globals_func_r.html',''); initResizabl
, RecastMesh.cpp
rcCreateChunkyTriMesh()
-: ChunkyTriMesh.h
-, ChunkyTriMesh.cpp
+: ChunkyTriMesh.cpp
+, ChunkyTriMesh.h
rcCreateHeightfield()
: Recast.h
, Recast.cpp
rcErodeWalkableArea()
-: Recast.h
-, RecastArea.cpp
+: Recast.h
+, RecastArea.cpp
rcFilterLedgeSpans()
: Recast.h
@@ -228,8 +228,8 @@ $(document).ready(function(){initNavTree('globals_func_r.html',''); initResizabl
, Recast.cpp
rcFreeContourSet()
-: Recast.cpp
-, Recast.h
+: Recast.h
+, Recast.cpp
rcFreeDefault()
: RecastAlloc.cpp
@@ -239,8 +239,8 @@ $(document).ready(function(){initNavTree('globals_func_r.html',''); initResizabl
, Recast.h
rcFreeHeightfieldLayerSet()
-: Recast.h
-, Recast.cpp
+: Recast.cpp
+, Recast.h
rcFreePolyMesh()
: Recast.h
@@ -278,16 +278,16 @@ $(document).ready(function(){initNavTree('globals_func_r.html',''); initResizabl
: Recast.h
rcMarkBoxArea()
-: Recast.h
-, RecastArea.cpp
+: Recast.h
+, RecastArea.cpp
rcMarkConvexPolyArea()
-: Recast.h
-, RecastArea.cpp
+: Recast.h
+, RecastArea.cpp
rcMarkCylinderArea()
-: Recast.h
-, RecastArea.cpp
+: Recast.h
+, RecastArea.cpp
rcMarkWalkableTriangles()
: Recast.h
@@ -297,23 +297,23 @@ $(document).ready(function(){initNavTree('globals_func_r.html',''); initResizabl
: Recast.h
rcMedianFilterWalkableArea()
-: Recast.h
-, RecastArea.cpp
+: Recast.h
+, RecastArea.cpp
rcMergePolyMeshDetails()
: Recast.h
, RecastMeshDetail.cpp
rcMergePolyMeshes()
-: RecastMesh.cpp
-, Recast.h
+: Recast.h
+, RecastMesh.cpp
rcMin()
: Recast.h
rcOffsetPoly()
-: Recast.h
-, RecastArea.cpp
+: RecastArea.cpp
+, Recast.h
rcRasterizeTriangle()
: Recast.h
@@ -366,6 +366,9 @@ $(document).ready(function(){initNavTree('globals_func_r.html',''); initResizabl
rcVnormalize()
: Recast.h
+
rcVsafeNormalize()
+: RecastArea.cpp
+
rcVsub()
: Recast.h
diff --git a/globals_i.html b/globals_i.html
index 8e36d7dd..025dc7ea 100644
--- a/globals_i.html
+++ b/globals_i.html
@@ -255,7 +255,7 @@ $(document).ready(function(){initNavTree('globals_i.html',''); initResizable();
:
DetourNavMeshQuery.cpp
insertSort()
-: RecastArea.cpp
+: RecastArea.cpp
integrate()
: DetourCrowd.cpp
diff --git a/globals_p.html b/globals_p.html
index a6ee9940..2ef67d4c 100644
--- a/globals_p.html
+++ b/globals_p.html
@@ -102,7 +102,7 @@ $(document).ready(function(){initNavTree('globals_p.html',''); initResizable();
: imguiRenderGL.cpp
pointInPoly()
-: RecastArea.cpp
+: RecastArea.cpp
, ConvexVolumeTool.cpp
polyMinExtent()
diff --git a/globals_r.html b/globals_r.html
index 2ac40802..4929c6e9 100644
--- a/globals_r.html
+++ b/globals_r.html
@@ -395,12 +395,12 @@ $(document).ready(function(){initNavTree('globals_r.html',''); initResizable();
, ChunkyTriMesh.cpp
rcCreateHeightfield()
-: Recast.cpp
-, Recast.h
+: Recast.h
+, Recast.cpp
rcErodeWalkableArea()
-: Recast.h
-, RecastArea.cpp
+: Recast.h
+, RecastArea.cpp
rcFilterLedgeSpans()
: Recast.h
@@ -419,8 +419,8 @@ $(document).ready(function(){initNavTree('globals_r.html',''); initResizable();
, RecastAlloc.cpp
rcFreeCompactHeightfield()
-: Recast.cpp
-, Recast.h
+: Recast.h
+, Recast.cpp
rcFreeContourSet()
: Recast.h
@@ -449,8 +449,8 @@ $(document).ready(function(){initNavTree('globals_r.html',''); initResizable();
, Recast.cpp
rcGetChunksOverlappingRect()
-: ChunkyTriMesh.h
-, ChunkyTriMesh.cpp
+: ChunkyTriMesh.cpp
+, ChunkyTriMesh.h
rcGetChunksOverlappingSegment()
: ChunkyTriMesh.h
@@ -482,16 +482,16 @@ $(document).ready(function(){initNavTree('globals_r.html',''); initResizable();
: Recast.h
rcMarkBoxArea()
-: RecastArea.cpp
-, Recast.h
+: Recast.h
+, RecastArea.cpp
rcMarkConvexPolyArea()
-: RecastArea.cpp
-, Recast.h
+: Recast.h
+, RecastArea.cpp
rcMarkCylinderArea()
-: Recast.h
-, RecastArea.cpp
+: Recast.h
+, RecastArea.cpp
rcMarkWalkableTriangles()
: Recast.h
@@ -501,23 +501,23 @@ $(document).ready(function(){initNavTree('globals_r.html',''); initResizable();
: Recast.h
rcMedianFilterWalkableArea()
-: Recast.h
-, RecastArea.cpp
+: Recast.h
+, RecastArea.cpp
rcMergePolyMeshDetails()
: Recast.h
, RecastMeshDetail.cpp
rcMergePolyMeshes()
-: RecastMesh.cpp
-, Recast.h
+: Recast.h
+, RecastMesh.cpp
rcMin()
: Recast.h
rcOffsetPoly()
-: Recast.h
-, RecastArea.cpp
+: Recast.h
+, RecastArea.cpp
rcRasterizeTriangle()
: Recast.h
@@ -579,6 +579,9 @@ $(document).ready(function(){initNavTree('globals_r.html',''); initResizable();
rcVnormalize()
: Recast.h
+
rcVsafeNormalize()
+: RecastArea.cpp
+
rcVsub()
: Recast.h
diff --git a/globals_vars.html b/globals_vars.html
index 205b591b..1bb8771d 100644
--- a/globals_vars.html
+++ b/globals_vars.html
@@ -256,6 +256,9 @@ $(document).ready(function(){initNavTree('globals_vars.html',''); initResizable(
- e -
+- EPSILON
+: RecastArea.cpp
+
- EXPECTED_LAYERS_PER_TILE
: Sample_TempObstacles.cpp
diff --git a/group__recast.html b/group__recast.html
index 11ece677..f3491908 100644
--- a/group__recast.html
+++ b/group__recast.html
@@ -214,24 +214,24 @@ Classes
| bool | rcBuildCompactHeightfield (rcContext *context, int walkableHeight, int walkableClimb, const rcHeightfield &heightfield, rcCompactHeightfield &compactHeightfield) |
| | Builds a compact heightfield representing open space, from a heightfield representing solid space. More...
|
| |
-| bool | rcErodeWalkableArea (rcContext *ctx, int radius, rcCompactHeightfield &chf) |
-| | Erodes the walkable area within the heightfield by the specified radius. More...
|
-| |
-| bool | rcMedianFilterWalkableArea (rcContext *ctx, rcCompactHeightfield &chf) |
-| | Applies a median filter to walkable area types (based on area id), removing noise. More...
|
-| |
-| void | rcMarkBoxArea (rcContext *ctx, const float *bmin, const float *bmax, unsigned char areaId, rcCompactHeightfield &chf) |
-| | Applies an area id to all spans within the specified bounding box. More...
|
-| |
-| void | rcMarkConvexPolyArea (rcContext *ctx, const float *verts, const int nverts, const float hmin, const float hmax, unsigned char areaId, rcCompactHeightfield &chf) |
-| | Applies the area id to the all spans within the specified convex polygon. More...
|
-| |
-| int | rcOffsetPoly (const float *verts, const int nverts, const float offset, float *outVerts, const int maxOutVerts) |
-| | Helper function to offset voncex polygons for rcMarkConvexPolyArea. More...
|
-| |
-| void | rcMarkCylinderArea (rcContext *ctx, const float *pos, const float r, const float h, unsigned char areaId, rcCompactHeightfield &chf) |
-| | Applies the area id to all spans within the specified cylinder. More...
|
-| |
+| bool | rcErodeWalkableArea (rcContext *context, int erosionRadius, rcCompactHeightfield &compactHeightfield) |
+| | Erodes the walkable area within the heightfield by the specified radius. More...
|
+| |
+| bool | rcMedianFilterWalkableArea (rcContext *context, rcCompactHeightfield &compactHeightfield) |
+| | Applies a median filter to walkable area types (based on area id), removing noise. More...
|
+| |
+| void | rcMarkBoxArea (rcContext *context, const float *boxMinBounds, const float *boxMaxBounds, unsigned char areaId, rcCompactHeightfield &compactHeightfield) |
+| | Applies an area id to all spans within the specified bounding box. More...
|
+| |
+| 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. More...
|
+| |
+| 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. More...
|
+| |
+| void | rcMarkCylinderArea (rcContext *context, const float *position, float radius, float height, unsigned char areaId, rcCompactHeightfield &compactHeightfield) |
+| | Applies the area id to all spans within the specified y-axis-aligned cylinder. More...
|
+| |
| bool | rcBuildDistanceField (rcContext *ctx, rcCompactHeightfield &chf) |
| | Builds the distance field for the specified compact heightfield. More...
|
| |
@@ -1372,8 +1372,8 @@ Classes