forked from recastnavigation/recastnavigation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use flood fill for potentially overlapping polys
This changes the detail sampling to find height data by using the flood fill method for polygons that were merged because of a border vertex removal. This could potentially cause overlapping polygons to receive the same region IDs which would later make the fast-path sampling in getHeightData sample the wrong heights. Also includes optimizations for this path and getHeightData itself. Previously the seeding was responsible for 25% of the total time spent in getHeightData in these cases. We now use the direction and prefer moving directly towards the center of the polygon. This makes the overhead of seedArrayWithPolyCenter virtually nonexistent (~2% according to profiling). Fix recastnavigation#146
- Loading branch information
1 parent
5a342b8
commit 5fce286
Showing
5 changed files
with
214 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.