Graham Pentheny
3527a8270d
Replace xorb with xor operator ( #770 )
...
The xorb function just gets compiled to an xor instruction in -O3, so this is just unnecessary pessimistic code.
https://godbolt.org/z/o5TGjsx6T
2025-03-18 09:42:55 -07:00
Gamemechanic
cd898904b7
Minor refactor in RecastMesh.cpp ( #661 )
2023-09-04 10:53:41 -04:00
alonfaraj
1adf911a09
Typo fixes ( #660 )
...
* multiple comments typo fixes
* typo
* typos
* typos
* typos
---------
Co-authored-by: Alon Faraj <alon.faraj@mapcore.com >
2023-08-16 15:37:41 -04:00
Graham Pentheny
ee2d4ef6e6
Updated dead links in comments with archived versions
...
Fixes #623
2023-05-21 01:37:27 -04:00
andriyDev
6d1f9711b3
Mark input data structures as const. ( #625 )
2023-04-20 19:16:35 -04:00
Graham Pentheny
b43c82c808
Removed _USE_MATH_DEFINES directive ( #596 )
...
Since none of the `M_` prefixed constants are used anywhere in the code, this is unnecessary. It's also Windows-specific, so these non-standard defines shouldn't be used anyway.
Ref: https://learn.microsoft.com/en-us/cpp/c-runtime-library/math-constants?view=msvc-170
2022-12-29 15:09:01 -05:00
Brian Swenson
c02d6fa81e
-Wunused-but-set-variable flagged variables removed
2022-06-03 02:24:29 -04:00
Ben Hymers
d11c1bdbac
Fix multiline comment warning
2017-01-12 11:31:29 +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
CharlesJClark
6730d4ddda
Update RecastMesh.cpp
...
Fixed validation checks of allocations.
2015-06-19 09:33:27 -07:00
Kromster80
3ca4db4864
Fixed loop overrun
2015-02-19 14:03:59 +03:00
Kromster80
f9ddd31493
Update RecastMesh.cpp
2014-11-10 15:07:17 +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
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
jackpoz
77ebf64353
Fix rcMergePolyMeshes() ignoring portals of input meshes.
...
Copy the portals from input meshes on border to the output mesh.
2014-02-19 21:00:14 +01:00
Mikko Mononen
b3d27bdb46
Fix for Issue #12
...
- fixed errors reported by valgrind
2014-01-02 21:03:05 +02:00
Mikko Mononen
c0d1efac27
Fixed google code Issue 232
2013-09-17 21:19:28 +02:00
Mikko Mononen
1a264a15cd
Fix for issue 198.
2012-04-01 09:45:32 +00:00
Mikko Mononen
0723805f96
Reverted portal detection change from R332.
2012-03-28 17:38:23 +00:00
Mikko Mononen
f91363ff06
Added rcCopyPolyMesh function.
2012-02-27 19:02:16 +00:00
Mikko Mononen
620f8fa130
Better detection of portal edges between tiles.
2012-02-27 18:40:16 +00: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
4be11d07f8
Fixed bug in edge generation (also appears in regular side). Added portal edge detection. Adjusted layer related debug draw.
2011-03-11 20:22:22 +00:00
Mikko Mononen
e84d563bfe
Added boxmapped texturing to input mesh, helps visualize it better. Added polymesh generation for layered heighfields.
2011-03-06 15:40:33 +00:00
Mikko Mononen
e1355c4a33
Fixed several detail mesh issues. Fixed issue 106.
2010-09-17 10:20:08 +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
47a572d42e
Fix for issue 101
2010-08-10 08:29:43 +00:00
Mikko Mononen
cd3a351f40
Custom allocator for Recast.
2010-07-09 12:55:14 +00:00
Mikko Mononen
11386cedcf
Added option to tesselate edges between areas. Fixed bug in orphan contour merging, which could create overlapping contour.
2010-05-26 09:20:57 +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
8291ceace2
Fix for Issue 54: Bug when a non-shared vertex is marked for remove
2010-03-18 08:42:45 +00:00
Mikko Mononen
ababd28f59
Issue 51: crash when poly nvp is change to smaller after first build.
2010-03-02 10:05:04 +00:00
Mikko Mononen
dbf95000e6
fix for issues 48 and 49.
2010-02-20 17:53:04 +00:00
Mikko Mononen
a715e9a5f7
Area progress: Pass area type and ability flags to recast. Convex Area tool. Mark chf with convex volumes. Better visualization of volumes.
2010-02-05 16:15:49 +00:00
Mikko Mononen
fa66b9a9f3
Compiles with -Wall (except stb_truetype)
2010-02-05 07:32:30 +00:00
Mikko Mononen
be4a807242
fix for Issue 40: RecastMesh.cpp : removeVertex bad indexing
2010-02-05 06:50:08 +00:00
Mikko Mononen
9b881bde8c
NOTE: Changed the generation procedure, see samples! Erode walkable area before area is generated. Allow to mark areas on chf. Generate regions following areas (+ many fixes here and there to make it alwasy work).
2010-02-01 14:08:06 +00:00
Mikko Mononen
5651b7c5dd
Changed many 0xffff:s to named consts.
2010-01-27 14:52:18 +00:00
Mikko Mononen
44b6c54c57
Fixed too large memory alloc in rcBuildPolyMesh.
2010-01-10 17:16:33 +00:00
Mikko Mononen
d142754ad5
Fixed crash in rcBuildPolyMesh() when one of the contours had zero vertices.
2009-11-25 15:21:49 +00:00