Commit Graph

894 Commits

Author SHA1 Message Date
Graham Pentheny
f41add72f7 Cleanup temp obstacle sample 2025-04-01 22:32:02 -04:00
Graham Pentheny
37c14b8f70 Trim trailing whitespace 2025-03-31 01:06:50 -04:00
Graham Pentheny
e4e06406fd Fixed includes that were breaking the build. 2025-03-31 01:05:05 -04:00
Graham Pentheny
a1d3fe8086 convert SampleToolType to enum class 2025-03-31 01:02:50 -04:00
Graham Pentheny
ad6b1ec2c6 Some better names for fields in Sample class 2025-03-31 00:26:19 -04:00
Graham Pentheny
ea814a1a1c Workflows: Only build with VS2022 on windows with cmake
Due to a bug in vs2019:
https://github.com/catchorg/Catch2/issues/2174https://github.com/catchorg/Catch2/issues/2174
2025-03-30 16:11:11 -04:00
Graham Pentheny
6bff925678 CMake: Set minimum cmake version to 3.5
Since newer cmake versions dropped support for anything before that.
2025-03-30 16:05:12 -04:00
Graham Pentheny
8df304bc66 Reapply "CMake: Use the bundled catch2 header with the Test target, rather than a system-installed one if that exists."
This reverts commit bb88f5b9f3.
2025-03-30 16:04:38 -04:00
Graham Pentheny
bb88f5b9f3 Revert "CMake: Use the bundled catch2 header with the Test target, rather than a system-installed one if that exists."
This reverts commit 5a2e2206ea.
2025-03-30 15:50:09 -04:00
Graham Pentheny
f6e0cbce93 CMake: Disable security warnings about snprintf on Windows
Eventually we'll remove/replace these calls but just silence the warnings for now.
2025-03-30 15:39:40 -04:00
Graham Pentheny
5a2e2206ea CMake: Use the bundled catch2 header with the Test target, rather than a system-installed one if that exists.
Since comaptibility varies between catch2 versions, this helps prevent issues if folks have a newer or older version installed in their system library search paths.
2025-03-30 15:31:18 -04:00
Graham Pentheny
4a95dcd591 CMake: Set the C++ standard version per-target rather than globally
Also clean up the CMakeLists.txt files a bit
2025-03-30 15:30:14 -04:00
Graham Pentheny
2f3b5155d3 More method parameter renaming in TileMesh sample 2025-03-30 00:48:53 -04:00
Graham Pentheny
4f66c402bb More TileMesh sample cleanup
Formatting, variable names, braces, also fixed some member function shadowing
2025-03-30 00:40:48 -04:00
Graham Pentheny
0c2654e79d Clean up TileMesh sample code
Better variable names, removed trailing whitespace, cleanup UI rendering a bit...
2025-03-29 22:52:59 -04:00
Graham Pentheny
5d59c2f737 Cleanup SampleInterfaces.h 2025-03-29 17:18:50 -04:00
Graham Pentheny
5e09fde319 Better names for member fields in Solo Mesh Sample class 2025-03-29 17:18:31 -04:00
Graham Pentheny
eee39c1020 Change DrawMode enum in SoloMesh sample to an enum class with explicit size
Since this namespaces the enum values and makes them easier to read and reference.
2025-03-29 16:01:48 -04:00
Graham Pentheny
5f9a2cd714 Remove trailing whitespace 2025-03-29 15:26:35 -04:00
Graham Pentheny
4db6f71c77 Cleanup solo mesh sample 2025-03-29 15:26:15 -04:00
Graham Pentheny
b82953c2fc Consolidate forward-declarations in Sample.h 2025-03-29 14:58:21 -04:00
Graham Pentheny
d3b058404f Cleanup includes in main.cpp 2025-03-29 14:06:32 -04:00
Graham Pentheny
f1e7192147 Modernize rule-of-three for Sample.h 2025-03-29 14:06:14 -04:00
Graham Pentheny
877547f326 Remove redundant code in Sample.h and add some consts 2025-03-29 14:05:58 -04:00
Graham Pentheny
f7f3b1daed Explicitly set c++ version per-project. Set RecastDemo and Tests projects to C++20
We don't care as much about ultra-compatibility with RecastDemo or Tests.  C++20 seems fairly universal at this point considering Unreal 5 ships with it as the default requirement.

We want to keep the other stuff to C++98 still because eventaully we'll convert it to C99 and not having a ton of modern C++ features everywhere make it significantly easier.
2025-03-29 14:00:10 -04:00
Graham Pentheny
bd98d84c27 Silence integer narrowing conversion warnings
These started after we switched from rcIntArray to rcTempVector<int>
2025-03-29 13:43:59 -04:00
Zach Toogood
0096f0dae9 Add exit condition to raycast() if DT_BUFFER_TOO_SMALL (#753) 2025-03-18 09:46:28 -07:00
Graham Pentheny
2253271091 Remove the deprecated rcIntArray (#769)
* Replaced references to rcIntArray with rcTempVector<int>

rcIntArray is deprecated and has been replaced with rcTempVector.  The current implementation is just a wrapper for rcTempVector.

* remove rcIntArray implementation

Since it's no longer referenced
2025-03-18 09:43:10 -07:00
Graham Pentheny
3527a8270d Replace xorb with xor operator (#770)
The xorb function just gets compiled to an xor instruction in -O3, so this is just unnecessary pessimistic code.

https://godbolt.org/z/o5TGjsx6T
2025-03-18 09:42:55 -07:00
Song
7c951a494f chore: ensure that the bits of poly ref do not overflow. (#763) 2025-03-18 09:42:20 -07:00
Graham Pentheny
77f7e54bc8 Don't remove custom assert failure registering code when disabling assertions (#751)
Otherwise, when disabling assertions, client code that calls these custom assertion failure callback registration functions will break.
2024-12-31 12:59:59 -05:00
Graham Pentheny
6bc79535bb Cleanup docstrings and some formatting in RecastAlloc.h 2024-12-31 12:49:06 -05:00
Graham Pentheny
361775849d Explicitly use html tags in Changelog to work around bug in doxygen (#750)
There's a bug in doxygen's markdown html generator when specifying header text that's just link text.  This is fixed in newer versions of doxygen, but the ubuntu images in github actions runners don't have a new enough version to work around this.  Instead, just write out the html explicitly for now.
2024-12-31 01:27:57 -05:00
Graham Pentheny
c126555c10 Explicitly specify Ubuntu 24.04 rather than ubuntu-latest (#749)
Since ubuntu-latest is using 22.04, and the version of doxygen it uses is generating some incorrect headers.
2024-12-31 00:29:23 -05:00
listenwind
1f0ce60544 feat: add window resizing support (#746)
- Add SDL_WINDOW_RESIZABLE flag to enable window resizing
- Handle SDL_WINDOWEVENT_RESIZED event to update window dimensions
- Update OpenGL viewport and projection matrix when window is resized

This change allows users to resize the application window while maintaining
proper aspect ratio and rendering.
2024-12-30 23:29:37 -05:00
Graham Pentheny
03c1101b18 Use newer clang and ubuntu version when building linux tests project (#748)
Since we need to build with clang 18 and ubuntu-latest is still set to 22.04 which uses clang 14.
2024-12-30 23:20:12 -05:00
Kurt
f79938bbee Fix typo and paper link (#702) 2024-12-30 23:15:23 -05:00
Roman Siromakha
63dd4aa332 Support enabling and disabling asserts for CMake builds (#728) 2024-12-29 12:39:07 -05:00
Graham Pentheny
93bd042349 Disable calls to isfinite when compiling with -ffast-math (#747)
Fast math is not required, but it speeds up some calculations at the expense of accuracy. There are some functions like dtMathIsfinite that use floating point functions that become undefined behavior when compiled with fast-math, so we need to conditionally short-circuit these functions when compiled with that flag.

-Wnan-infinity-disabled is complaining about the isfinite call in dtMathIsfinite.

This also sets the linux runner explicitly to Ubuntu 24.04, since ubuntu-latest defaults to 22.04 for some reason. This also updates gcc and clang to the latest versions in apt and logs their version to the run output.  We need at least clang18 to disable the -Wnan-infinity-disabled warning for Catch.

Finally, this also removes some unused code that was throwing a warning (and thus an error) on newer compiler versions.
2024-12-29 12:36:08 -05:00
Graham Pentheny
ac4376d597 Install libglu1-mesa-dev as a linux build dependency in Github Actions
Because something changed and now we're getting errors about not being able to find glu.h
2024-12-28 01:09:03 -05:00
Graham Pentheny
8c8df48811 Changelog links use simple formatting
Because the docs pages don't render the footnote-style markdown links correctly.
2024-12-27 14:16:37 -05:00
Graham Pentheny
455a019e7a Added coordinate system and winding order to FAQ 2024-04-28 16:38:34 -04:00
RoboSchmied
c2a0d94d02 Fix: 6 typos (#698)
Signed-off-by: RoboSchmied <github@roboschmie.de>
2024-04-12 11:54:01 -04:00
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