Commit Graph
20 Commits
Author SHA1 Message Date
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
Jakob Botsch Nielsen 54bb0943e5 Make closestPointOnPoly and getPolyHeight more robust
* 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.
2019-03-16 16:18:23 +01:00
云风 7ccb72b383 Optimize dtClosestHeightPointTriangle (#364) 2018-11-09 14:52:00 +01:00
Geoyeob Kim 46654531e4 Fix 'dtRandomPointInConvexPoly()' returning a garbage value if s == 1.0f. (#271) 2017-05-15 16:26:35 +02:00
grahamboree 45b36f4d75 Removed redundant dtSqrt function and replaced calls to it with dtMathSqrtf 2015-01-03 16:00:00 -05:00
Matthew Endsley b0e4e6a834 Add wrappers for the standard math library
Simplifies transition to software based math libraries
for projects requiring determinism.
2013-09-15 20:09:01 -07:00
Mikko Mononen de6fd8c3ef - use "cylinder distance" for nearest point in polygon
- added option for findStraightPath() to append vertices at get edge crossings
- added scale parameter for .obj loader
2012-09-05 05:57:31 +00:00
Mikko Mononen cd3a68dd9b Random polygon selection for Detour. 2012-02-27 07:17:51 +00:00
Stephen Pratt 923098b43c Recast: New API documentation, and standardized tab/space use.
Documented DetourAlloc.h and most members in DetourCommon.h.
Added warning related to issue 180. (Limitation on use of dtNavmeshQuery::findNearestPoly.)
Standardized the use of tab/space indenting in the API documentation.
2011-09-13 13:22:09 +00:00
Mikko Mononen 81c0402116 Missing changes from previous commit. Added dtNavMesh.findLocalNeighbourhood() and dtNavMesh.getPolyWallSegments() and test code for them. 2010-08-09 13:28:26 +00:00
Mikko Mononen e5cca88cd1 Custom memory allocator for Detour. Fixed parallel touching portal connection. 2010-07-09 10:37:49 +00:00
Mikko Mononen 939050eb82 fix for Issue 89:Call to dtVperp2d - don't need to negate 2010-07-08 11:25:57 +00:00
Mikko Mononen 1769d70e5c Fix for Issue 70: more const methods, Fix for Issue 72: changed to more accuracte tile connection test. 2010-04-22 13:13:27 +00:00
Mikko Mononen 32b54f7981 Fix for Issue 68 2010-04-19 14:01:13 +00:00
Mikko Mononen 10b330ffb4 Moved common functions behind name decoration. 2010-04-14 18:45:46 +00:00
Mikko Mononen 5119b5cb16 API CHANGE! Better serialization support. 2010-03-25 12:24:40 +00:00
Mikko Mononen a47e3436c9 Changed static navmesh samples to use new navmesh. Renamed Stat samples to Solo. Added moveAlongPathCorridor() to dtNavMesh. 2009-12-03 13:16:25 +00:00
Mikko Mononen 6de4d30705 Monster update which adds detail height meshes.
- Added detail height mesh generation (RecastDetailMesh.cpp) for single,tiled statmeshes as well as tilemesh.
- Added feature to contour tracing which detects extra vertices along tile edges which should be removed later.
- Changed the tiled stat mesh preprocess, so that it first generated polymeshes per tile and finally combines them.
- Fixed bug in the GUI code where invisible buttons could be pressed.
2009-08-24 12:44:44 +00:00
Mikko Mononen c2e4e01201 Detour: Reduced tile navmesh link size by 6 bytes.
Demo: Fixed some include file errors from previous renaming fest. 
Added license at top of some files.
2009-07-13 11:09:28 +00:00
Mikko Mononen 3149b86c4c Detour: Moved out commonly used code to DetourCommon.h/cpp
Detour: Moved pathfinder priority queue and node pool to DetourNode.h/cpp
2009-07-13 10:33:54 +00:00