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.
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.
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
Fix for reading data out of bounds in tile cache builder in
removeVertex.
While removing a vertex data is read from i+1 index from mesh.verts,
which becomes out of bound for the last vertex, which we shouldn't copy
over in this case.
Mostly just improving variable names for clarity.
Removed a redundant base-case check in AddSpan that resulted in a small but measurable perf improvement due to removing a branch. Also tightened up the bounding box overlap check so it early-outs faster, which also has a small perf improvement to rasterization times.
Updated docstrings for user-facing functions.
* Moved docstring comments to the header with the rest of the docstring
* Removed unused function
* Make a cpp-only function static
* Added docstring for rasterizeTri
* Use spaces to indent function parameter lists so they look good regardless of the editor's tab width
* Better parameter names for rcClamp
* Cleanup code formatting, a couple variable names, and some comments in rasterizeTri
* Clean up dividePoly, added rcAxis enum
* Cleanup rasterizeTri docstring
* Faster overlapBounds check in rasterization
* Renamed some vars in rasterizeTri
* cleanup addSpan and remove redundant branch
* addSpan docstring
* Cleanup the implementations of rcRasterizeTriangle and rcRasterizeTriangles overloads
* Added docstrings and renamed vars in rcAllocSpan and rcFreeSpan
* Clean up rcRasterizeTriangle and rcRasterizeTriangles in the header. Removed redundant const qualifiers on value parameters
* Better parameter names for rasterizeTri, updated docstring, fixed some incorrect comments
* Improved parameter names of rcRasterizeTriangle, rcRasterizeTriangles, and rcAddSpan
* Fixed some old variable names referenced in the docstring for rcAddSpan
* 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
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.
* 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>
- 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`
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.
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
* 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.
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.
The premake script generates some deprecation warnings when generating with premake5:
- "configuration" has been deprecated in favor of "filter"
- "solution" was renamed to "workspace"