Commit Graph

101 Commits

Author SHA1 Message Date
Graham Pentheny
0cceb7fb92 Removed unnecessary agent radius accessor 2025-07-22 00:58:52 -04:00
Graham Pentheny
a94dee954d More code cleanup
# Conflicts:
#	RecastDemo/Include/InputGeom.h
#	RecastDemo/Include/SampleInterfaces.h
2025-07-19 11:53:01 -04:00
Graham Pentheny
700ac4d832 Fixed narrowing conversion warnings 2025-07-13 12:55:01 -04:00
Graham Pentheny
95a7b45c32 More WIP DearImGUI conversion 2025-07-13 12:43:10 -04:00
Graham Pentheny
d534b4dc14 WIP DearImGui conversion 2025-07-12 15:02:54 -04:00
Graham Pentheny
6b906538dc WIP DearImGui conversion 2025-07-10 11:11:54 -04:00
Graham Pentheny
d1e513aeaf Remove MeshLoaderObj class. Replace with parseObjModel function 2025-07-07 00:54:57 -04:00
Graham Pentheny
d647ba4305 Fixed compilation warnings treated as errors on Windows 2025-06-28 14:44:19 -04:00
Graham Pentheny
d10e82d0c9 Rename rcChunkyTriMesh to just ChunkyTriMesh since it's a class that's part of the demo project, not Recast itself. 2025-06-02 01:22:24 -04:00
Graham Pentheny
03b3e11371 Removed hungarian notation from tile mesh sample fields 2025-05-30 02:09:43 -04:00
Graham Pentheny
8a6c7ed8e1 removing hungarian notation from sample class field names 2025-05-30 01:58:52 -04:00
Graham Pentheny
06ae4ee0cb Some better variable names in tile mesh sample 2025-05-19 23:24:11 -04:00
Graham Pentheny
f25a3c3384 Formatting 2025-05-06 10:42:34 -04:00
Graham Pentheny
20e3afbb03 Use vectors and methods in ChunkyTriMesh to simplify things 2025-05-05 15:34:18 -04:00
Graham Pentheny
17ffcd1191 Sample_TileMesh: Removed "keep intermediate results" option
now always on
2025-04-08 23:55:11 -04:00
Graham Pentheny
4def1f9a58 Whitespace changes, use nullptr instead of 0, pragma once 2025-04-08 23:54:27 -04:00
Graham Pentheny
a1d3fe8086 convert SampleToolType to enum class 2025-03-31 01:02:50 -04:00
Graham Pentheny
ad6b1ec2c6 Some better names for fields in Sample class 2025-03-31 00:26:19 -04:00
Graham Pentheny
2f3b5155d3 More method parameter renaming in TileMesh sample 2025-03-30 00:48:53 -04:00
Graham Pentheny
4f66c402bb More TileMesh sample cleanup
Formatting, variable names, braces, also fixed some member function shadowing
2025-03-30 00:40:48 -04:00
Graham Pentheny
0c2654e79d Clean up TileMesh sample code
Better variable names, removed trailing whitespace, cleanup UI rendering a bit...
2025-03-29 22:52:59 -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
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