49 Commits

Author SHA1 Message Date
Ben Hymers
d9c6fc58ce Remove redundant double assignment 2016-03-15 08:02:28 +00:00
Ben Hymers
c208fd332c Minor typo and style changes 2016-03-14 09:03:40 +00:00
Graham Pentheny
b7a83e0afb Fixed rule of 3 violations in many places.
* Added virtual qualifier to a few destructors in subclasses.
* Removed a few empty destructors that didn't need to be explicitly defined.
* Fixed a few typos
* Removed unnecessary empty virtual destructors in some classes with parent's who derrived from a class with a virtual destructor
2016-01-20 11:57:32 -05:00
Jakob Botsch Nielsen
0143337a64 Merge pull request #154 from Janiels/fix-detail-unsampled-heights
Increase recover radius for unsampled heights
2016-01-14 22:18:43 +01:00
Jakob Botsch Nielsen
b99d62047b Increase recover radius for unsampled heights
When the detail mesh sampling sees an unset height it previously tried
to recover by looking for heights of neighbors. When the heightfield was
not eroded this recovery would fail since the contour simplification
could mean that the nearest valid cell was further away than a neighbor.
We now walk adjacent cells in a spiral to find a height and do this
depending on the max simplification error.

Fix #153
2016-01-14 19:20:43 +01:00
Jakob Botsch Nielsen
5fce286267 Use flood fill for potentially overlapping polys
This changes the detail sampling to find height data by using the flood
fill method for polygons that were merged because of a border vertex
removal. This could potentially cause overlapping polygons to receive
the same region IDs which would later make the fast-path sampling in
getHeightData sample the wrong heights.

Also includes optimizations for this path and getHeightData itself.
Previously the seeding was responsible for 25% of the total time spent
in getHeightData in these cases. We now use the direction and prefer
moving directly towards the center of the polygon. This makes the
overhead of seedArrayWithPolyCenter virtually nonexistent (~2%
according to profiling).

Fix #146
2016-01-14 11:25:48 +01:00
Rafael Stahl
6d3c9b38ba add rcScopedTimer to fix timers not being stopped on all paths and to prevent it in the future. 2015-12-18 14:48:31 +01:00
jackpoz
18b537c23f Fix 2 "unused parameter" build warnings 2015-06-28 21:32:16 +02:00
Mikko Mononen
ff7549bb57 Merge pull request #51 from Kromster80/HULL-UNDEF
Renamed enums to avoid name collisions with "hull" variables
2014-12-13 13:55:33 +02:00
Kromster80
5dfb3b01e7 Renamed enum to avoid name collisions with "hull" variables 2014-11-10 15:23:28 +03:00
Kromster80
d9652b362e Update RecastMeshDetail.cpp 2014-11-10 15:08:03 +03:00
Mikko Mononen
129efa5833 Fix for issue #38 and improvements to detail mesh tessellation
- do circumCircle calculations relative to first vertex for adde
precision
- improved the results of triangulateHull(), produces less degen
triangles
- fixed case with contour merging when outline is null
2014-06-24 15:23:53 +03:00
Mikko Mononen
480f56e94d Fixed memory allocation in detail mesh and memcpy in polymesh copy 2014-06-24 15:23:53 +03:00
Mikko Mononen
24a11a2823 Fixed silly mistake in detail mesh next(), prev() functions 2014-06-14 15:59:32 +03:00
Mikko Mononen
3cb87f2432 Merge branch 'master' of https://github.com/memononen/recastnavigation 2014-06-13 13:25:07 +03:00
Mikko Mononen
a89bb843d7 Added new method to partition heighfield
- added layer based heighfield partitioning
- the method is a bit slower than monotone partitioning, but does not
suffer from the long thin ploys
- the method partitions the heighfield into non-overlapping areas, but
does not try to resolve holes
- improved contour hole merging so that it can properly handle all
kinds of holes
- improved polygon triangulation to handle overlapping segments
- improved small and long polygon detail mesh generation
- updated samples to include all 3 partition methods and little
documentation to help to choose between them
2014-06-13 13:25:01 +03:00
Mikko Mononen
3e8b413036 Fix for detail mesh height data generation
- if the new region based height data generation fails, use the old
flood fill based method
2014-02-21 10:32:35 +02:00
Mikko Mononen
29db8cde1b Fix for detail mesh corner cases
- fix case where thing long poly center may not be on the region
2014-01-19 17:49:40 +02:00
axelrodR
98f2f02c2b Optimization of of the mesh detail construction: replaced the first of the 2 flood-fill algorithms (the one used to find the span corresponding to the center of the polygon) with a search of span at the center with the region matching the polygon. 2014-01-19 14:02:41 +02:00
Mikko Mononen
f6b11b18a9 Fix for google code Issue 209
- fixed clamping if indices used in getHeight()
2013-09-19 20:26:22 +02:00
Mikko Mononen
e6b1d141d2 Fixed warnings when compiling with -Wshadow. 2012-02-22 17:25:46 +00:00
Stephen Pratt
6f5c9f9b82 Recast: Detail API documentation for the members declared in Recast.h. (Complete)
Recast.h: Completed rcPolyMeshDetail through end, plus updates to existing documentation.
Configuration: Removed DebugUtils directory from the document build.
Configuration: Fixed issue 179. (Backslashes)
2011-08-29 23:03:16 +00:00
Mikko Mononen
1de5e2f119 DETOUR API CHANGE!
- Detour Navmesh supports layers
- Allow to disable Navmesh BV-tree
- Added DetourTileCache
- Cleaned up Recast layer code
- Moved portal edge detection to Recast
- Removed polymesh border offset
- Removed lean heighfield
2011-03-25 09:16:38 +00:00
Mikko Mononen
e1355c4a33 Fixed several detail mesh issues. Fixed issue 106. 2010-09-17 10:20:08 +00:00
Mikko Mononen
5ba6518ed3 Detour compiles now with DT_VIRTUAL_QUERYFILTER. Fixed typos in comments. Fixed bug in findStraightPath() where leftPolyType was not used. 2010-08-26 18:57:53 +00:00
Mikko Mononen
5abddbf0cd Refactored rcBuildContext to be more customization friendly, changed name to rcContext. 2010-08-24 17:53:38 +00:00
Mikko Mononen
613d61f453 Removed Recast timer and log, added rcBuildContext, improved build time printout, fixed issue 67, issue 77, issue 87 2010-08-19 09:26:55 +00:00
Mikko Mononen
a87947cc3f fix for Issue 98 2010-07-11 10:18:44 +00:00
Mikko Mononen
cd3a351f40 Custom allocator for Recast. 2010-07-09 12:55:14 +00:00
Mikko Mononen
4ac6b64050 use breath first search when finding detail data so that we don't expand to wrong storey. 2010-05-28 06:31:43 +00:00
Mikko Mononen
4c1a122a91 Fixed bug where clicks went through GUI. Added a couple of consts into detail mesh code. 2010-04-20 07:35:40 +00:00
Mikko Mononen
10b330ffb4 Moved common functions behind name decoration. 2010-04-14 18:45:46 +00:00
Mikko Mononen
193f44a388 Issue 61: take 2, missing files. 2010-04-13 10:58:18 +00:00
Mikko Mononen
5119b5cb16 API CHANGE! Better serialization support. 2010-03-25 12:24:40 +00:00
Mikko Mononen
9cd943264e fixes for Issue 56: Fairly minor bugs picked up by static analysis tool 2010-03-18 08:53:45 +00:00
Mikko Mononen
ce338df394 More robust handling of detail mesh height values. 2010-02-12 14:41:42 +00:00
Mikko Mononen
fa66b9a9f3 Compiles with -Wall (except stb_truetype) 2010-02-05 07:32:30 +00:00
Mikko Mononen
5651b7c5dd Changed many 0xffff:s to named consts. 2010-01-27 14:52:18 +00:00
Mikko Mononen
121807b601 Fixed Issue 27: RecastMeshDetail.cpp:buildPolyDetail: Unused parameter: reg 2009-12-07 09:53:41 +00:00
Mikko Mononen
8d146ade90 Fixed Issue 26: RecastMeshDetail.cpp: updateLeftFace: t parameter is unused. 2009-12-07 09:52:07 +00:00
Mikko Mononen
113ba0aaae Fox for Issue 25: RecastMeshDetail.cpp:buildPolyDetail: Uneeded line of code. 2009-12-07 09:48:23 +00:00
Mikko Mononen
f77a7511ed Detail mesh is calculated in tile local coordinates for better floating point accuracy. 2009-11-23 08:44:01 +00:00
Mikko Mononen
7b7f0e6fb9 Removed ununsed dialtion code from detail mesh getHeightData(). 2009-11-23 08:34:39 +00:00
Mikko Mononen
b93bd10fa4 Fixed a couple of bounds checks in detail mesh height query. 2009-11-20 08:15:09 +00:00
Mikko Mononen
14d1c97f1a Added RC_NOT_CONNECTED which is used to check the return value of rcGetCon() 2009-11-15 11:24:20 +00:00
Mikko Mononen
aa62a15161 Rewrote the delaunay triangulation code of the detail mesh generation. Fixed some cases where detail mesh height was bad. 2009-10-23 13:02:10 +00:00
Mikko Mononen
ed73b46308 - Changed gotos as cleanup mechanism to a scoped delete template.
- Removed unnecessary ptr casts to ints to allow to compile on 64bits systems.
- Added custom and portable qsort_r.
- Use gettimeofday() as performance timer on unix/bsd/osx
- Moved variables from rcCompactSpan to separate arrays.
2009-09-28 09:54:37 +00:00
Mikko Mononen
c3e9d7fcb3 Win32 binary and VC compile fixes. 2009-08-24 13:20:15 +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