Commit Graph

851 Commits

Author SHA1 Message Date
Graham Pentheny
44ff936db5 Fixed typo in README.md 2024-03-23 10:10:48 -07:00
Someone
bae7b4f194 CMake: .pc: let GNUInstallDirs generate the paths (#692)
The concatenation was resulting in paths like
libdir=${exec_prefix}//nix/store/...-recastnavigation-1.6.0/lib
2024-03-16 12:48:16 -04:00
Roman Siromakha
599fd0f023 Fix out of bounds access in dtMergeCorridorStartMoved and add tests (#635)
size can become negative if req > maxPath. This may happen when visited buffer is larger than path buffer.

Add tests to cover different use cases of the function including Should add visited points not present in path up to the path capacity to cover the fix.

List tests files explicitly. When new file is added CMake does not add it to the already generated list if GLOB is used.
2024-01-28 13:26:50 -05:00
Graham Pentheny
b2d8fa9796 Fixed old parameter names in out-of-line Recast function documentation 2024-01-07 16:08:28 -05:00
Graham Pentheny
c393f055cb Fixed broken doc file links after re-name 2024-01-06 19:09:53 -05:00
Graham Pentheny
f974101ec6 Fixed ordering of custom pages in doxygen's sidebar
Apparently it's alphabetical and based on the order in which the files are specified in INPUT
2024-01-06 16:57:22 -05:00
Graham Pentheny
cc131d8261 Added introduction documentation 2024-01-06 16:56:40 -05:00
Graham Pentheny
218e9e8ff3 Removed link brakets from old versions in changelog 2024-01-06 16:56:15 -05:00
Graham Pentheny
1605a558c4 Ported FAQ to a markdown file in the docs folder
So that it's shipped with the code and also part of the doxygen docs at recastnav.com
2024-01-05 01:34:05 -05:00
Graham Pentheny
bc0d1b1f77 Backported old release notes to Changelog.md for posterity 2024-01-05 00:58:57 -05:00
Graham Pentheny
c36a40645a Cleanup filter code and improved documentation (#683)
This mostly just changes variable names and adds some comments to make the code more clear.

It also has a few small fixup changes to the unit tests.
2024-01-01 14:56:47 -05:00
Graham Pentheny
fc18ed8194 Some unit tests for heightfield filtering functions (#682)
This adds some unit tests for the functions in RecastFilter.cpp, and updates docs around these functions. This also splits up the Tests_Recast.cpp file into a few smaller, more focused files.
2023-12-31 14:55:41 -05:00
Cupcake
3e94c3b6fc Code cleanup and small optimizations in RecastFilter.cpp rcFilterLedgeSpans (#672)
* Code cleanup and minor refactor in RecastFilter.cpp rcFilterLedgeSpans

Because span.smax is always > 0, bot > 0 as well, and (-walkableClimb - bot) is always < -walkableClimb. Furthermore, as long as minNeighborHeight < -walkableClimb' at least once, there is no need to continue the traversal.

* Code cleanup and minor refactor in RecastFilter.cpp rcFilterLedgeSpans

Because span.smax is always > 0, bot > 0 as well, and (-walkableClimb - bot) is always < -walkableClimb. Furthermore, as long as minNeighborHeight < -walkableClimb' at least once, there is no need to continue the traversal.

* Update RecastFilter.cpp

Revise Comment
2023-12-31 14:27:07 -05:00
Graham Pentheny
246ca3c849 Specify C++ compiler verision requirement in README.md 2023-12-30 19:39:13 -05:00
Graham Pentheny
7e32b75a7d Fixed README.md 2023-12-30 19:35:57 -05:00
Graham Pentheny
8f7b9a84fb Fix centering in README.md
Since github has some weird rules about how they handle html in markdown.
2023-12-28 18:24:43 -05:00
Graham Pentheny
1c87cff00c Improved doxygen output (#681)
Added logo, updated doxyfile, fixed alignment of top-level readme, and changed the logo url to an s3-hosted file since github has restrictions that prevent it from loading on recastnav.com
2023-12-28 18:23:26 -05:00
Graham Pentheny
afe7d9e8e4 Fixed logo href in README.md 2023-12-28 17:08:34 -05:00
Graham Pentheny
53089459fa Docs Overhaul (#680)
A lot of the auxiliary project documentation was pretty old, redundant, or could use some polishing.  This change fixes up some wording, grammar, layout and generally cleans up the docs a bit.  It's not perfection, but it's an improvement

I also tried to streamline and beautify the top-level `README.md` to be more appealing, clear, and to direct people to the official docs.  To this end, I moved the building instructions to This is based on what I've seen in some other popular github projects.
2023-12-28 17:06:03 -05:00
Jakob Botsch Nielsen
c393777d26 Make detail mesh edge detection more robust (#657)
Instead of using a distance check which can fail at large magnitudes due
to low precision we can check whether the edges are actually on the
hull.
2023-12-20 00:46:50 -05:00
Anders Elfgren
9044200bc0 Added links in readme to docs site and github repo to make it easy to find one from the other. (#677) 2023-12-20 00:41:24 -05:00
shine
ddaa361b08 fix:rcBuildLayerRegions missing areaType (#470)
Co-authored-by: sunming <359944951@qq.com>
Co-authored-by: Graham Pentheny <grahamboree@users.noreply.github.com>
2023-11-12 16:30:28 -05:00
Gamemechanic
cd898904b7 Minor refactor in RecastMesh.cpp (#661) 2023-09-04 10:53:41 -04:00
alonfaraj
1adf911a09 Typo fixes (#660)
* multiple comments typo fixes

* typo

* typos

* typos

* typos

---------

Co-authored-by: Alon Faraj <alon.faraj@mapcore.com>
2023-08-16 15:37:41 -04:00
Graham Pentheny
6d9998e5b4 Some quick cleanup in RecastRasterization.cpp (#655)
* Rename hf -> heightfield to be consistent
* Removed unused include
2023-08-10 16:39:36 -04:00
Graham Pentheny
af6d4758ff Changed asserts to be explicitly disabled with RC_DISABLE_ASSERTS rather than using NDEBUG (#653)
* Changed asserts to be explicitly disabled with RC_DISABLE_ASSERTS rather than using NDEBUG

This gives explicit control to users over when recast asserts are enabled or disabled.  This is useful when users wish to disable asserts in debug mode or enable them in release mode.  e.g. it's common to compile game code in debug alongside third party code in release.

* Added Integration.md with documentation on the integration process for Recast
2023-08-09 19:15:04 -04:00
satyam126
d95483a993 Fix typo in DetourNavMesh.h (#651) 2023-07-31 13:46:12 -04:00
HelloKitty
ee39124e5f Fix typo in dtPoly member documentation (#649) 2023-07-24 23:11:46 -04:00
Graham Pentheny
78dd2f706f Enable verbose catch2 output when running tests in CI 2023-07-23 16:49:03 -04:00
nicknide
9147d09553 fix invalid assert dtAssert(npath < m_maxPath) (#619) 2023-07-23 16:22:37 -04:00
Graham Pentheny
8a42fb6348 Improved variable naming in RecastArea.cpp (#636)
* Cleanup compact heightfield functions in RecastArea.cpp
* More improved variable names for RecastArea.cpp
* Improved variable names and documentation in rcOffsetPoly
* Don't normalize the miter bisector in rcOffsetPoly since this needs to be proportional to both segment normals.
* Moved vector normalization out of rcOffsetPoly into a helper function rcVsafeNormalize
* Rename local variables in rcOffsetPoly
* Rename BMiterX/Z to cornerMIterX/Z
* Also fixed some comment descriptions
* Added docstring for rcVsafeNormalize
* Improved clarity of a few comments
2023-07-23 15:59:20 -04:00
Roman Siromakha
d2cd095abb Update catch to v3.4.0 (#648) 2023-07-21 17:31:58 -04:00
Anton Matveev
603dc88e5d Bounds checks were unnecessary inclusive. (#418)
Co-authored-by: Graham Pentheny <grahamboree@users.noreply.github.com>
2023-07-02 20:42:37 -04:00
Josue Zamudio
99b6c3306e Removed fixupCorridor and replaced with dtMergeCorridorStartMoved (#637)
* removed fixupCorridor and replaced function calls with dtMergeCorridorStartMoved

* removed fixupCorridor and replaced function calls with dtMergeCorridorStartMoved in NavMeshTesterTool.cpp

Fix #634
2023-06-25 15:50:50 -04:00
Graham Pentheny
6dc1667f58 Bumped CMake version to 1.6.0 v1.6.0 2023-05-21 13:43:18 -04:00
Graham Pentheny
e9aa38645a Added CHANGELOG.md
To track changelogs for releases
2023-05-21 13:37:22 -04:00
Graham Pentheny
a87a328b8b Replaced another dead link with an archived copy 2023-05-21 01:38:42 -04:00
Graham Pentheny
ee2d4ef6e6 Updated dead links in comments with archived versions
Fixes #623
2023-05-21 01:37:27 -04:00
andriyDev
9432fd6381 Fix spans being filtered if they have just enough clearance. (#626) 2023-05-20 17:10:59 -04:00
andriyDev
53f7818027 Add a CMake option to use dynamic dispatch for dtQueryFilter in Detour. (#628) 2023-05-04 21:56:41 -04:00
andriyDev
32e5f94b11 Add a CMake option to enable 64bit dtPolyRefs for Detour. (#627)
Previously, setting this option required either enabling this option by modifying the source, or doing some CMake hacking to inject the variables. Now this is a convenient option.
2023-04-29 20:11:38 -04:00
andriyDev
6d1f9711b3 Mark input data structures as const. (#625) 2023-04-20 19:16:35 -04:00
Graham Pentheny
f4a65fd317 Enable UBSan and ASan when building tests with clang 2023-04-14 17:38:30 -04:00
Thomas Debesse
5c494ad1ee RecastLayers: set RC_MAX_LAYERS and RC_MAX_NEIS as optional defines (#624)
It makes possible for a project integrating Recast to set custom values
via CXXFLAGS while remaining build system agnostic.

Type checking is kept.
2023-04-14 17:02:00 -04:00
Graham Pentheny
cc944f28c1 Removed STL function added in C++11 from Detour (#616)
to maintain C++03 standard compatibility
2023-03-25 13:29:29 -04:00
Alexey Sokolov
a015950eaa Use external Catch2 if available in cmake build (#600) 2023-03-25 13:29:08 -04:00
FcAYH
b0ed8b7a3c fixed a typo (countour -> contour) (#617) 2023-03-25 13:22:02 -04:00
Graham Pentheny
8e9c308afd Increase epsilon in detour common segment polygon intersection test (#612)
It's only used to detect if the segment is parallel to the polygon edge in question, and if so, skip actually doing the intersection test.  This sets the epsilon to 1e-6, which is about 10x the machine epsilon for 32bit floats, so it's low enough to not give false positives but it's large enough to correctly detect segments and polygon edges that are very nearly parallel.
2023-03-20 01:03:27 -04:00
andriyDev
b921dd16b1 Make installing PDBs optional. (#611)
PDBs are not necessarily generated, even in Debug configuration. For example, if the CXX_FLAGS are set to /Z7, debug symbols are embedded, and so the PDBs are not generated. This prevents installing from failing by marking these PDBs as optional.

Fix #610
2023-03-19 22:31:18 -04:00
Graham Pentheny
ede5c5d85a Added code of conduct to doxygen input 2023-03-18 18:18:58 -04:00