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
- 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`
* 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.
* 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
* Make dtClosestHeightPointTriangle use no epsilon (except for checking
denominator)
* When point is outside poly, directly find closest height from boundary
detail edges instead of first interpolating and then finding height from
detail tris.
* When point is inside poly, if all dtClosestHeightPointTriangle queries
failed, then find height from detail edges. This should only happen if
the point is right on top of an internal detail tri edge.
In U and A shaped terrain it was possible that polygons extruded their
BV-tree nodes significantly. This happened because all points for the
polygon (when excluding the detail mesh) were either on the high-level
terrain, or on the low-level terrain. This fixes the long-standing todo
about this.
As a result of this change, findNearestPoly and queryPolygons should
return more accurate results.
Fix#230
When a point is outside the polygon being queried in
dtNavMesh::closestPointOnPoly and dtNavMeshQuery::closestPoinOnPoly,
Detour will interpolate along one of the edges to find the closest point
on the poly. However, Detour did not properly use the interpolated point
to find the correct height according to the detail mesh.
Fix#227
findPath was unconditionally overriding the status it used to indicate
DT_OUT_OF_NODES for later. Restore this behavior so it properly can
return this failure flag.
Fix#221
This adds a method to dtNavMeshQuery that allows users to retrieve paths
from the nodes explored by the previous Dijkstra search. This is useful
after Dijkstra searches to retrieve arbitrary paths inside the explored
area.
findPolysAroundCircle and findPolysAroundShape were only using distances
to compute the costs. This was inconsistent with other APIs that
performed cost-based searches and accepted filters as parameters.
This changes the Dijkstra searches in findPolysAroundCircle and
findPolysAroundShape to append the results when we visit nodes in the
main loop. The algorithm guarantees that we will never visit them again
after this, so at this point we are guaranteed that we cannot find a
better path.
Previously results would be appended the first time we saw a polygon
which meant later improvements on the paths to those polygons would not
be reflected in the results.
Fix#204
When creating the tile's links, offmesh connections inside the tile were
added twice, leading to the array of links being full and not being able
to store the links computed after (portals between tiles).
These were reported by Coverity Scan. They're extremely unlikely but still
possible - if all edges of a poly are FLT_MAX or further away from the
input point, a negative index may be used to access the verts array of a
poly.
The fix is to arbitrarily pick the first edge as the closest in case all
are tied as being very far away.
dtNavMeshQuery now fails initialization if too many nodes are requested
in the node pool. This could cause wrong paths and infinite loops to
happen if the node indices started overflowing dtNodeIndex or
dtNode::pidx.
Fix#178
Fix three warnings added in fc5df2c, and increase the text pool size in
the demo. This would frequently be overflowed, even just by building
with the default settings and expanding the log.
This adds a version of queryPolygon that takes an interface which is
passed batches of polygons in the search area. This new API is then used
from the old queryPolygons to collect polygons, and from findNearestRef
to find the nearest poly in an arbitrarily sized area. Previously
findNearestPoly had an arbitrary poly limit of 128 which could cause it
to return potentially wrong results.
Fix#107