diff --git a/Recast/Include/Recast.h b/Recast/Include/Recast.h index dc762a1..9def8fd 100644 --- a/Recast/Include/Recast.h +++ b/Recast/Include/Recast.h @@ -1083,7 +1083,7 @@ int rcGetHeightFieldSpanCount(rcContext* context, const rcHeightfield& heightfie /// @param[out] compactHeightfield The resulting compact heightfield. (Must be pre-allocated.) /// @returns True if the operation completed successfully. bool rcBuildCompactHeightfield(rcContext* context, int walkableHeight, int walkableClimb, - rcHeightfield& heightfield, rcCompactHeightfield& compactHeightfield); + const rcHeightfield& heightfield, rcCompactHeightfield& compactHeightfield); /// Erodes the walkable area within the heightfield by the specified radius. /// @ingroup recast @@ -1256,7 +1256,7 @@ inline int rcGetDirForOffset(int offsetX, int offsetZ) /// to be considered walkable. [Limit: >= 3] [Units: vx] /// @param[out] lset The resulting layer set. (Must be pre-allocated.) /// @returns True if the operation completed successfully. -bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf, +bool rcBuildHeightfieldLayers(rcContext* ctx, const rcCompactHeightfield& chf, int borderSize, int walkableHeight, rcHeightfieldLayerSet& lset); @@ -1271,7 +1271,7 @@ bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf, /// @param[out] cset The resulting contour set. (Must be pre-allocated.) /// @param[in] buildFlags The build flags. (See: #rcBuildContoursFlags) /// @returns True if the operation completed successfully. -bool rcBuildContours(rcContext* ctx, rcCompactHeightfield& chf, +bool rcBuildContours(rcContext* ctx, const rcCompactHeightfield& chf, float maxError, int maxEdgeLen, rcContourSet& cset, int buildFlags = RC_CONTOUR_TESS_WALL_EDGES); @@ -1283,7 +1283,7 @@ bool rcBuildContours(rcContext* ctx, rcCompactHeightfield& chf, /// contour to polygon conversion process. [Limit: >= 3] /// @param[out] mesh The resulting polygon mesh. (Must be re-allocated.) /// @returns True if the operation completed successfully. -bool rcBuildPolyMesh(rcContext* ctx, rcContourSet& cset, const int nvp, rcPolyMesh& mesh); +bool rcBuildPolyMesh(rcContext* ctx, const rcContourSet& cset, const int nvp, rcPolyMesh& mesh); /// Merges multiple polygon meshes into a single mesh. /// @ingroup recast diff --git a/Recast/Source/Recast.cpp b/Recast/Source/Recast.cpp index 073e595..d75a9f5 100644 --- a/Recast/Source/Recast.cpp +++ b/Recast/Source/Recast.cpp @@ -401,7 +401,7 @@ int rcGetHeightFieldSpanCount(rcContext* context, const rcHeightfield& heightfie } bool rcBuildCompactHeightfield(rcContext* context, const int walkableHeight, const int walkableClimb, - rcHeightfield& heightfield, rcCompactHeightfield& compactHeightfield) + const rcHeightfield& heightfield, rcCompactHeightfield& compactHeightfield) { rcAssert(context); diff --git a/Recast/Source/RecastContour.cpp b/Recast/Source/RecastContour.cpp index 4de5288..5508a98 100644 --- a/Recast/Source/RecastContour.cpp +++ b/Recast/Source/RecastContour.cpp @@ -101,7 +101,7 @@ static int getCornerHeight(int x, int y, int i, int dir, } static void walkContour(int x, int y, int i, - rcCompactHeightfield& chf, + const rcCompactHeightfield& chf, unsigned char* flags, rcIntArray& points) { // Choose the first non-connected edge @@ -820,7 +820,7 @@ static void mergeRegionHoles(rcContext* ctx, rcContourRegion& region) /// See the #rcConfig documentation for more information on the configuration parameters. /// /// @see rcAllocContourSet, rcCompactHeightfield, rcContourSet, rcConfig -bool rcBuildContours(rcContext* ctx, rcCompactHeightfield& chf, +bool rcBuildContours(rcContext* ctx, const rcCompactHeightfield& chf, const float maxError, const int maxEdgeLen, rcContourSet& cset, const int buildFlags) { diff --git a/Recast/Source/RecastLayers.cpp b/Recast/Source/RecastLayers.cpp index 4d4fa46..ca37ebb 100644 --- a/Recast/Source/RecastLayers.cpp +++ b/Recast/Source/RecastLayers.cpp @@ -101,7 +101,7 @@ struct rcLayerSweepSpan /// See the #rcConfig documentation for more information on the configuration parameters. /// /// @see rcAllocHeightfieldLayerSet, rcCompactHeightfield, rcHeightfieldLayerSet, rcConfig -bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf, +bool rcBuildHeightfieldLayers(rcContext* ctx, const rcCompactHeightfield& chf, const int borderSize, const int walkableHeight, rcHeightfieldLayerSet& lset) { diff --git a/Recast/Source/RecastMesh.cpp b/Recast/Source/RecastMesh.cpp index 9bffd6d..3b682df 100644 --- a/Recast/Source/RecastMesh.cpp +++ b/Recast/Source/RecastMesh.cpp @@ -986,7 +986,7 @@ static bool removeVertex(rcContext* ctx, rcPolyMesh& mesh, const unsigned short /// limit must be retricted to <= #DT_VERTS_PER_POLYGON. /// /// @see rcAllocPolyMesh, rcContourSet, rcPolyMesh, rcConfig -bool rcBuildPolyMesh(rcContext* ctx, rcContourSet& cset, const int nvp, rcPolyMesh& mesh) +bool rcBuildPolyMesh(rcContext* ctx, const rcContourSet& cset, const int nvp, rcPolyMesh& mesh) { rcAssert(ctx);