79 Commits

Author SHA1 Message Date
Graham Pentheny
5111139558
Fixes for many low-severity compiler warnings (#576)
* 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.
2022-11-11 21:03:03 -05:00
Jakob Botsch Nielsen
6e36a351c2 Remove unused code causing warning 2018-06-16 17:04:54 +02:00
Aurelien Rainone
4988ecbaf0 RecastDemo: add Load & Save buttons for SoloMesh Sample, and fix warnings (#258)
* Implement saveAll loadAll for Sample_SoloMesh

 - Solo mesh sample is loaded and saved as a tiled mesh containing
   an unique tile, so as to remain compatible with tiled mesh
 - navmesh is saved to/loaded from `solo_navmesh.bin` binary file
 - add and connect the corresponding 'Save/Load' GUI elements

* Fix `implit-fallthrough` gcc warnings

On linux with gcc 7.2.0+ and all warnings treated as errors,
implicit fallthroughs in case statements are considered as errors.
If the comment just below the next `case` or `default` matches
various strings, one of which is `falls through` the fallthrough
is then considered explicit.
2018-01-05 12:38:53 +01:00
Domenico Albani
03eb2f92f3 Make RecastDemo colors more meaningful (#254)
Implement a SampleDebugDraw which will color area types meaningfully, for example
color water as blue, grass as green and so on.
2017-02-02 20:27:43 +01:00
Jonathan Adamczewski
12e8950bac Add toggles for heightfield filtering 2017-01-12 16:58:26 +00:00
Ben Hymers
299ed08087 Fix leaking file handles in Sample_TileMesh::loadAll after various failures
Leaks were reported by Coverity Scan
2016-03-14 10:22:31 +00:00
Jakob Botsch Nielsen
a31da928ba Add settings storage to geometry sets
This adds the ability for geometry sets to store build settings that can
be automatically applied when they are loaded. This should allow sharing
of .gset files to demonstrate problems with certain settings on certain
files. It also allows people to diagnose problems more easily by being
able to dump their own triangle meshes and settings and load them in the
demo, with all of its visualization options. .gset files can be created
from the current mesh and settings by pressing the 9 key, which will
generate it in the same folder as the input mesh.

Also converts more of the demo to use STL.
2016-01-17 20:31:09 +01:00
Graham Pentheny
2eb3abfb60 Updated RecastDemo to SDL2
* Renamed a bunch of variables in main.cpp to be more descriptive.
* Removed unnecessary SDLMain.h and SDLMain.m OSX objective-c class as well as the plist, strings, xib and icns files, which are not needed.
* included cstdio in imguiRenderGL since SDL2 doesn't do it for us.
* Updated premake5 script to support SDL2 and to set the debug directory, as well as copy the SDL2.dll to the target directory on Windows.
* Updated readme with more descriptive, platform-specific demo project setup instructions
* Updated appveyor build script to build vs2015 as well.
* Updated Travis build script to build SDL2 from source, because they use Ubuntu 12.04 which doesn't have the libsdl2-dev package in its repositories.
2016-01-04 18:56:51 -05:00
Rafael Stahl
15025e8519 handle the case when allocSpan fails to allocate memory. adds bool return types to rcAddSpan, rcRasterizeTriangle and rcRasterizeTriangles 2015-12-18 16:41:02 +01:00
Mikko Mononen
65b844170f More verbose explanation of tile bounding box. 2014-12-18 12:07:12 +02: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
Jonathan Adamczewski
1d05c18c00 Used read length (and suppress warning) 2014-03-24 00:16:35 -07:00
Mikko Mononen
6aa8b1d989 Fix for missing tiles in navmesh. 2012-05-19 09:21:08 +00:00
Mikko Mononen
e6b1d141d2 Fixed warnings when compiling with -Wshadow. 2012-02-22 17:25:46 +00:00
Mikko Mononen
336409d037 Added tool states, Crowd can be let run in the BG while changing mesh, Added off-mesh connection support for tile cache, Fixed tile cache area generation, Added debugdraw for tile cache build steps, Migrated to Xcode4. 2012-02-04 21:27:07 +00:00
Cameron hart
588d674c72 Made NavMeshPruneTool case consistent with other classes. 2011-10-03 19:38:24 +00:00
Mikko Mononen
54e0e86ff2 Added simple Detour navmesh flood fill and prune tool. 2011-09-11 11:08:55 +00:00
Mikko Mononen
751cf50af8 Sample_TileMesh::buildTileMesh() was returning false instead of 0. 2011-09-04 12:39:53 +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
b6a93f063a Removed layer portals, added cons, which stores connectivity and portals. Layer heights is stored as bytes. 2011-03-11 15:12:15 +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
6cb0413cc7 Layer progress: Fixed reg building with multiple areas. Added contour generation. 2011-03-06 08:26:55 +00:00
Mikko Mononen
ce6f2a52fc Fixed mem leaks with layers. Added layer region generation test. 2011-02-27 20:39:17 +00:00
Mikko Mononen
f140c3962d Heighfield Layer progress. 2011-02-26 15:05:21 +00:00
Mikko Mononen
0ede4bca39 Fix for issue 156 2011-02-03 09:23:45 +00:00
Mikko Mononen
4a81213b3b Refactored and cleaned up CrowdManager and moved it to DetourCrowd. Update tool UI layout, context sensitive help is now rendered as overlay. 2011-01-29 15:28:28 +00:00
Mikko Mononen
2f47c29336 Added lean heighfield to store minimal, easy to compress representation of the heightfield. Added temporary obstacle demo. 2011-01-14 10:55:37 +00:00
Mikko Mononen
08741e894c DETOUR return status codes changed, check blog! Changed Detour status codes to be bitfields which describes the highlevel status plus some details about the failure or quality of the result. 2010-11-26 11:56:34 +00:00
Mikko Mononen
1be9de72d8 Detour version change! Added user ID per off-mesh connection. Fixed off-mesh connection draw flags after using off-mesh con tool. 2010-11-07 15:21:38 +00:00
Mikko Mononen
ccf401d3da - added finalizeSlicedFindPathPartial()
- added handleStep()/handleToggle() to samples
- changed how crowds are rendered
- added path topology optimization step
2010-11-07 10:56:48 +00:00
Mikko Mononen
e5d603ac92 **API CHANGED** Implemented issue 124. Detour API returns error codes. 2010-10-29 12:08:13 +00:00
Mikko Mononen
c83be9f214 Sped up input geom raycast 2010-10-15 12:19:44 +00:00
Mikko Mononen
ab9ada50c5 Renamed 'region size' to 'region area' and improved documentation. 2010-10-10 11:04:13 +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
cfc66a0fc9 Added missing perftimer. Better log for tile sample. Some crowd test stuff. 2010-08-26 18:47:36 +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
0e4aa30e85 Changed dtQueryFilter to contain the flags check and cost calculation, can customized. Fix for issue 47 and issue 103. 2010-08-20 09:30:37 +00:00
Mikko Mononen
55360f6ee5 Missing files for R197 2010-08-19 09:55:12 +00:00
Mikko Mononen
5f7ac70cba win32 compile and project fixes, made tool UI more clear 2010-08-17 18:30:58 +00:00
Mikko Mononen
cbc47f4ddf Fix for Issue 99:Separate Detour mesh queries in to a different class from mesh data 2010-08-17 15:10:32 +00:00
Mikko Mononen
7d8fe75de1 The ugly and humble beginnings of path following and multi-agent navigation code. 2010-08-12 12:54:00 +00:00
Mikko Mononen
1c4755012f Removed moveAlongPathCorridor() and added more generic moveAlongSurface(). 2010-08-09 11:26:07 +00:00
Mikko Mononen
5ebcb453fb Issue 45:Input triangle based area creation (another try) 2010-07-13 07:19:10 +00:00
Mikko Mononen
cd3a351f40 Custom allocator for Recast. 2010-07-09 12:55:14 +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
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
49f2b03cd8 Presentation mode tweaks. Fix for Issue 74: added FileIO interface, Fix for Issue 76: added pure virtual destructor for duDebugDraw. 2010-05-07 07:14:42 +00:00
Mikko Mononen
d5c65a220f Raycast does not try to follow off-mesh links (Issue 64), use references instead of pointers in debugdraw api (Issue 62, Issue 63) 2010-04-15 07:22:58 +00:00