789 Commits

Author SHA1 Message Date
Graham Pentheny
250c3041ce Added development roadmap 2022-11-25 21:38:11 -05:00
Graham Pentheny
67ba9a2a15
Fix macOS CMake SDL linking (#584)
* Ignore cmake intermediate build dir

* Fix C++ language version in cmake build scripts

* Set a default SDL2_ROOT_DIR value for macOS in cmake scripts

* Fixed macOS SDL framework linking in cmake scripts

* Added macos-cmake target for CI builds in github workflows

* Use C++17 for building Tests instead of 20, since we build them with VS2019 in some jobs
2022-11-25 20:29:11 -05:00
Graham Pentheny
4fef044660 Unit test to check for crashes in rasterizing long, skinny triangles
Specifically, when rasterizing a triangle into a heightfield with width or height of 0.  This can happen when the input geometry bounding box extents are less than half the cell size in either x or z.  This is a degenerate case, but can crop up in real life scenarios (see https://github.com/godotengine/godot/issues/65764) so we should at least ensure it doesn't crash here.
2022-11-25 19:55:38 -05:00
Piotr Piastucki
3901c5854c
Fix incorrect rasterization at tile borders (#476)
* Fix incorrect rasterization at tile borders

Clip the polygon at the tile border and disregard coordinates outside of
the tile before clamping.

* Added unit test with minimal repro case for the rasterization issue fixed in PR #476

Co-authored-by: Graham Pentheny <graham.pentheny@gmail.com>
2022-11-23 02:42:03 -05:00
Graham Pentheny
2b0c244d12
Updated doxygen output (#581)
- Upgraded doxyfile to latest format
- Fixed a bunch of warnings and errors in docstrings that doxygen was complaining about
- Added the doxygen-awesome theme to modernize the output
- Removed a duplicate screenshot we'd had in the docs folder
- Moved the RecastDemo screenshot into the Docs/images folder
- Changed the doxygen main page to be the README.md since the dedicated main page file we had was nearly identical but out of date
- Added CONTRIBUTING.md so it's part of the generated doxygen output
- Removed duplicate license file to avoid confusion
- Combined the FAQ with the Recast_api.txt, since the FAQ was essentially just better docs for the members of `rcConfig`
2022-11-23 00:13:38 -05:00
SpaceIm
53f779fa8d
install CMake config file with exported targets (#575) 2022-11-20 15:42:04 -05:00
Graham Pentheny
b1e04cf59c
Updated build badges in Readme to use workflows 2022-11-12 13:37:41 -05:00
Graham Pentheny
3d0f0a3d9e
Github Workflows based CI system to replace Appveyor and Travis (#580)
The goal here is to replace the current (slightly broken) Travis + Appveyor setup with something that covers more cases and is a bit better supported and easier to maintain. This hopefully helps us catch cross-platform issues quicker. For example, the linux and clang compilation issues that have existed for a while could have been caught if we were building those targets in CI.

This adds a build script that builds the following configurations for every repo commit and PR:

    macOS, premake, Debug
    macOS, premake, Release
    linux, premake, gcc, Debug
    linux, premake, gcc, Release
    linux, premake, clang, Debug
    linux, premake, clang, Release
    linux, cmake, Debug
    linux, cmake, Release
    windows, premake, vs2019, Debug
    windows, premake, vs2019, Release
    windows, premake, vs2022, Debug
    windows, premake, vs2022, Release
    windows, cmake, vs2019, Debug
    windows, cmake, vs2019, Release
    windows, cmake, vs2022, Debug
    windows, cmake, vs2022, Release

It also builds and runs the catch tests executable in the following configurations. A failed test will fail the build.

    macOS, premake, Debug
    linux, premake, clang, Debug
    windows, premake, vs2022, Debug

It doesn't currently build cmake on macOS because there is a one blocker there (#577). We could also add additional builds like cmake with both clang and gcc on linux, but for now this is much better coverage than we have currently.
2022-11-12 13:27:46 -05:00
Graham Pentheny
17a19d0e82
Simplified macOS Build Process (#579)
This makes the default xcode project generated by premake work out of the box, and is generally easier for mac users.  Especially those who don't have permissions to modify /Library/Frameworks/

- Look for SDL in RecastDemo/Bin by default rather than /Library/Frameworks/
- Updated README build instructions
- Ignore SDL2.framework in RecastDemo/Bin
2022-11-11 21:04:29 -05:00
Graham Pentheny
5111139558
Fixes for many low-severity compiler warnings (#576)
* Fixes for many low-severity compiler warnings

Mostly a lot of pedantic things like end-of-file newlines and commas on the last enum value.  However some fixes like the weak v-tables warnings fixes might help with code gen.  It's unclear if the linker is able to elide multiple copies of the same type's v-table in different translation units, (sometimes it can) but these fixes ensure we don't have to rely on it.
2022-11-11 21:03:03 -05:00
Graham Pentheny
ea7bfbee70
Fix clang linux builds (#578)
Also remove hard-coded filter on gmake premake target since it's deprecated in favor of gmake2. It also doesn't matter; what matters is that we filter on gcc, since the warnings we've disabled don't exist in clang and will throw errors.
2022-11-11 20:11:14 -05:00
Siddharth J Singh
e6b675bb9a
Fastlz fix for -Wno-class-memaccess' is valid for C++/ObjC++ but not for C (#479)
* Added a selective filter for *.c files compiled on linux using make

Co-authored-by: Graham Pentheny <graham.pentheny@gmail.com>
2022-11-09 11:54:56 -05:00
Graham Pentheny
b0d71bed92 Removed VS2015 and fixed cmake generators for 2019, 2022
Catch seems to only work with VS 2017+
2022-11-07 23:34:36 -05:00
Graham Pentheny
80e55ebfb7 Update to a newer premake version that supports vs2019 and vs2022 2022-11-07 23:34:36 -05:00
Graham Pentheny
9098a81682 Change to C++14 instead of C++20
Updated appveyor version matrix.  Removed vs2013
2022-11-07 23:34:36 -05:00
Graham Pentheny
bab65d759d Updated cmake build with Catch2 library location 2022-11-07 23:34:36 -05:00
Graham Pentheny
7dfa9849ca Updated Catch2 testing library to v3.1.1
https://github.com/catchorg/Catch2

Updated tests with new API changes as well.
2022-11-07 23:34:36 -05:00
Graham Pentheny
d576e71b25 Disable class-memaccess error to fix builds on Ubuntu with newer versions of GCC
Based on SgtVincent's suggestion here: https://github.com/recastnavigation/recastnavigation/issues/497#issuecomment-1293318731

Fixes #497
2022-10-29 14:37:10 -04:00
Graham Pentheny
0d1cbd3d67 Don't explicitly create a GL context since SDL_CreateWindowAndRenderer does it internally.
Having two GL contexts causes rendering problems on Ubuntu.  Fixes #521
2022-10-25 23:18:11 -04:00
Graham Pentheny
96dc90b6ff Fix deprecation warnings when using premake5
The premake script generates some deprecation warnings when generating with premake5:
- "configuration" has been deprecated in favor of "filter"
- "solution" was renamed to "workspace"
2022-10-25 23:17:58 -04:00
Graham Pentheny
c14a5a5897 Ignore generated dSYM debug symbols archive on mac 2022-10-25 23:17:08 -04:00
Graham Pentheny
4e233f22b4 Added configuration protips from Mikko's blog to a FAQ 2022-10-15 01:59:47 -04:00
EfveZombie
0af470fe74
fix: use closestPointOnPoly instead of getPolyHeight in dtNavMeshQuery::findRandomPoint (#560) 2022-10-13 11:27:06 +02:00
Anton Matveev
9df3e2e0a6 Fix rounding error due to precision loss after optimization. 2022-10-12 00:03:00 -04:00
grdowns
a425d03b0e Add vcpkg installation instructions 2022-10-11 23:48:55 -04:00
Andrei Kortunov
30edaf442c Fix -Wextra-semi GCC warnings by removing redundant semicolons 2022-10-11 23:45:27 -04:00
ZA139
314e94b692 Fix the typo though of dtVperp2D function comment
fix typo though
2022-10-09 22:18:11 -04:00
ZA139
3a1924e3b0 Correction the comment of dtVperp2D
The return value should be the perp dot product rather than the dot product.
2022-10-09 22:18:11 -04:00
Graham Pentheny
2164a272e5 Updated array size in docstring for dtMeshTile::verts
Thanks to @pineappleKID for pointing this out!
https://github.com/recastnavigation/recastnavigation/issues/535
2022-10-07 18:12:19 -04:00
Graham Pentheny
c187b7e88b
Removed broken IssueStats badges from README.md 2022-06-03 02:56:44 -04:00
Brian Swenson
c02d6fa81e -Wunused-but-set-variable flagged variables removed 2022-06-03 02:24:29 -04:00
Prin_E
5a870d427e Fixed RecastDemo crash in macOS 10.11+
* Set hints to always use OpenGL render driver (instead of Metal driver)
* Compile error fix in Xcode 13
2022-03-20 15:33:19 -04:00
Bret Curtis
c5cbd53024
Fix MacOS builds on Travis (#475)
* use defaults where possible, simplify .travis.yml and fix macos builds while we are at it

* de-duplicate code

* specifically ask for xcode12.2
2021-03-05 17:24:41 +01:00
Bret Curtis
63a4ee4c1e
Add version and pkgconfig (#474)
* Add version and pkgconfig

* simply versioning

Co-authored-by: Bret Curtis <bret.curtis@pegus.digital>
2021-03-05 17:24:04 +01:00
elsid
1f25f9cc29 Install .pdb files only with MSVC 2021-03-05 17:21:50 +01:00
Gleb Mazovetskiy
e75adf86f9
Avoid reallocs of temp vectors (#467)
* Use clear() instead of resize(0) for temp vectors

Nicer style

* rcVectorBase::resize: Avoid realloc on grow

When capacity is sufficient, do not realloc the whole buffer

* rcVector: Grow exponentially on resize
2021-02-15 12:27:21 +01:00
Jan Haller
cf4f3e15a8
Poly query API: expose distance and isOverPoly (#448)
* Add dtNavMeshQuery.findNearestPoly() overload with parameters: distance, isOverPoly

* dtNavMeshQuery::findNearestPoly(): improve documentation, avoid code duplication

* Make code C++98-compatible

* Remove distance parameter from dtNavMeshQuery::queryPolygons()
2021-01-23 13:25:41 +01:00
Rubaka
c32297c2f9 Fixed run RecastDemo on MVS 2020-11-19 17:36:54 +01:00
Jakob Botsch Nielsen
ec05c9e17c
Update build instructions for Windows 2020-11-19 14:23:59 +01:00
Jan Haller
9dc88fcab9
Validate constraint: #polygons per tile (#449)
* Validate constraint: #polygons per tile

When adding a tile to a NavMesh, ensure that the number of polygons in that tile fit in the poly ID address space.

* Improve dtNavMeshParams field documentation
2020-11-19 10:13:30 +01:00
ZhihuiLiu
6624e7aef5 fix an index error 2020-11-18 10:54:07 +01:00
Kyeongho Park
24230e8e8d
Bugfix/chunkytrimesh subdivide maxnodes (#451)
* minor redundant: dir

* bugfix: ChunkyTriMesh nodes array: out of bounds
2020-11-17 11:46:52 +01:00
Yoann Potinet
65b314a44e Fix shared library build 2020-10-31 10:38:31 +01:00
Jakob Botsch Nielsen
8db2f62d7a Fix compiler error due to memset on type with non-trivial constructors
Fix #446
2020-10-30 11:31:53 +01:00
Jan Haller
e679507845
Improve debug builds for MSVC (#443)
* Add -d suffix for debug libraries

* Export PDB files for each Debug library
2020-10-30 10:41:54 +01:00
Alexey Sokolov
9337e12418
Several fixes for make install (#437)
* Don't install test

* Install to the correct directory (e.g. lib64)

* Install includes to /usr/include/recastnavigation
2020-09-24 10:08:03 +02:00
Dig-Doug
eecb7f45ec Updates the README instructions for linux
The binary has to be run from the bin directory, otherwise the DroidSans font can't be found and shows the error "Could not init GUI renderer.":

https://github.com/recastnavigation/recastnavigation/blob/master/RecastDemo/Source/main.cpp#L129
2020-08-05 22:50:04 +02:00
Jakob Botsch Nielsen
df27e4eb1a Fix build
-Wno-error does not ignore unknown warnings on old GCC versions causing
problems when using it for new warnings. On the other hand, -Wno-X will
ignore unknown warnings, so we can use this instead.

Fix #403
Fix #413
2020-05-11 18:26:17 +02:00
Icecream95 (gitlab.com/icecream95)
57610fa6ef Explicitly define winding as being signed 2019-10-21 14:44:25 +02:00
cypheron
c40188c796 Permit false positive compile errors (gcc8) 2019-05-11 13:19:37 +02:00