Commit Graph

45 Commits

Author SHA1 Message Date
Graham Pentheny
06ea1be2ae rename handleTools to drawToolsUI 2025-08-05 13:50:14 -04:00
Graham Pentheny
67e4ddfe34 Rename handleDebugMode to drawDebugUI 2025-08-05 13:48:40 -04:00
Graham Pentheny
5cc17b8a39 rename handleMeshChanged to onMeshChanged 2025-08-05 13:46:30 -04:00
Graham Pentheny
a954d7e9f0 rename handleBuild to build 2025-08-05 13:46:01 -04:00
Graham Pentheny
d4f4d82c4d Clean up some UI rendering in solo mesh sample build controls 2025-08-05 13:45:31 -04:00
Graham Pentheny
434299ec5b Rename handleRenderOverlay to renderOverlay 2025-08-05 13:44:15 -04:00
Graham Pentheny
efd1401b6b Rename handleRender to render 2025-08-05 13:40:47 -04:00
Graham Pentheny
0463758f21 Use a dropdown for draw mode rather than a set of radio buttons 2025-08-04 17:06:42 -04:00
Graham Pentheny
f1dc2eb125 Auto-format 2025-08-04 16:22:09 -04:00
Graham Pentheny
065fd54c81 Use static arrays of strings for tool and display names 2025-08-04 15:54:35 -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
aa58857a30 Removed hungarian notation from solo mesh fields. 2025-05-30 02:05:39 -04:00
Graham Pentheny
8a6c7ed8e1 removing hungarian notation from sample class field names 2025-05-30 01:58:52 -04:00
Graham Pentheny
7291f3a736 Removed unused includes 2025-05-06 10:39:03 -04:00
Graham Pentheny
a604098030 Sample_SoloMesh: Remove "keep intermediate results" option
Always enabled now.  Also improve the documentation in the build function
2025-04-08 23:58:30 -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
5e09fde319 Better names for member fields in Solo Mesh Sample class 2025-03-29 17:18:31 -04:00
Graham Pentheny
eee39c1020 Change DrawMode enum in SoloMesh sample to an enum class with explicit size
Since this namespaces the enum values and makes them easier to read and reference.
2025-03-29 16:01:48 -04:00
Graham Pentheny
5f9a2cd714 Remove trailing whitespace 2025-03-29 15:26:35 -04:00
Graham Pentheny
4db6f71c77 Cleanup solo mesh sample 2025-03-29 15:26:15 -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
8a42fb6348 Improved variable naming in RecastArea.cpp (#636)
* Cleanup compact heightfield functions in RecastArea.cpp
* More improved variable names for RecastArea.cpp
* Improved variable names and documentation in rcOffsetPoly
* Don't normalize the miter bisector in rcOffsetPoly since this needs to be proportional to both segment normals.
* Moved vector normalization out of rcOffsetPoly into a helper function rcVsafeNormalize
* Rename local variables in rcOffsetPoly
* Rename BMiterX/Z to cornerMIterX/Z
* Also fixed some comment descriptions
* Added docstring for rcVsafeNormalize
* Improved clarity of a few comments
2023-07-23 15:59:20 -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
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
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
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
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
cd3a68dd9b Random polygon selection for Detour. 2012-02-27 07:17:51 +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
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
9f2390e196 Added mipmaps to the grid texture. Removed obsolete SoloMeshTiled sample. 2011-03-06 16:00:04 +00:00
Mikko Mononen
4934dc2065 Refactored sample code. Separated navmesh test code to a tool class. 2009-12-30 08:49:46 +00:00
Mikko Mononen
5daf3f8157 raycast resturns hit normal. 2009-12-21 10:48:27 +00:00
Mikko Mononen
a73da5e966 Moved all debug draw utilities to DebugUtils folder. Added recast data to .obj dump functions. 2009-12-09 15:45:10 +00:00
Mikko Mononen
e4239a3bdf Removed stat and tile navmeshes. Fixed examples. 2009-12-04 07:27:53 +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