summaryrefslogtreecommitdiffstats
path: root/scene/resources/navigation_mesh.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@cb411fa960f0b7fdbd97dcdb4c90f9346360ee0eSpartan3222024-11-121-2/+2
|\
| * Core: Integrate `Ref::instantiate` where possibleThaddeus Crews2024-11-101-2/+2
| |
* | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| |
* | Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* NavigationPolygon: Implement get/set_polygon fast paths.Patrick Sean Klein2024-08-171-19/+22
|
* Fix thread use causing navigation mesh data corruptionsmix82024-06-211-8/+37
| | | | Fixes navigation mesh data corruption caused by thread use that changed vertices or polygons while the navigation mesh was processed, e.g. by server sync or baking.
* Fix linking NavigationServer2D/3D with all classes disabled in build profileRémi Verschelde2024-02-281-2/+0
| | | | | For some reason the destructor for NavigationMeshSourceGeometryData2D/3D being implemented in the .cpp was causing linking issues.
* Add NavigationMesh border_size property for tile bakingsmix82024-01-191-1/+14
| | | | Adds NavigationMesh border_size property for tile baking.
* Add const lvalue ref to container parametersMuller-Castro2024-01-051-1/+1
|
* Add clear() function to NavigationMesh / NavigationPolygonsmix82023-07-071-0/+7
| | | | Adds clear() function to NavigationMesh / NavigationPolygon.
* Fix NavigationMesh baking AABB Editor handling and visualssmix82023-02-031-2/+2
| | | | Fixes handling and visuals for Navigation Mesh baking AABB in the Editor.
* Rework const on NavigationServer methodsJosh Jones2023-01-071-2/+2
| | | `const` is used on all methods, even when they cause modification of the server. This reworks the methods of the server to only use `const` on method that don't change the state of the server.
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Remove deprecated NavigationMesh compatibility partssmix82022-12-221-26/+0
| | | | Removes _set / _get compatibility function parts for deprecated NavigationMesh slash delimiter properties.
* Fix typo and ensure backwards compatibility for changed property namesJosh Jones2022-12-201-13/+20
| | | | | | | | | | | | | Changes to the name of the `navmesh` and `navpoly` properties on `NavigationRegion` caused navigation data to be lost on load. This PR creates uses `_set`/`_get` to handle compatibility with the older names on load, preserving the data. Also fixes a typo on `get_vertices_per_polygon` in `NavigationMesh`, and renames the property to remove the `polygon_` prefix which doesn't match the setter/getter. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Fix Navigation API abbreviations inconsistencysmix82022-12-171-11/+11
| | | | Schema for navigation to name user facing API with "navigation" without abbreviation and e.g. NavigationServer internals with abbr "nav".
* Remove leading spaces from enumerator name hintsHaoyu Qiu2022-10-081-1/+1
| | | | | | | | | | | | | | | | For `PROPERTY_HINT_ENUM` properties, enumerator names can be provided as a comma separated list. There're a few properties that add leading spaces to the names (e.g. `First, Second, Third`). These spaces are included in the Inspector dropdown, which is unexpected. It's better to leave the surrounding spaces untouched because it could be part of the resulting string value (the variable is a string enum). And most other enum hints don't contain surrounding whitespaces. This PR removes the spaces and documents this `PROPERTY_HINT_ENUM` behavior.
* Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-071-12/+12
| | | | change warnings=all to use /W4.
* Remove / Replace old Navigation Debug Visualizationsmix82022-09-071-93/+5
| | | | | - removes / replaces leftovers from old navigation debug code - cleanes SceneTree and ProjectSettings from old navigation debug
* Make `_validate_property` a multilevel methodYuri Sizov2022-08-221-5/+5
|
* Fix some property validation not been refactoredRedMser2022-08-181-2/+4
|
* Add more detailed Navigation Debug Visualizationsmix82022-07-291-0/+101
| | | | | | | - Adds more customization options to ProjectSettings. - Displays navregion edge connections and navigation polygon edges in editor and at runtime. - Majority of debug code moved from SceneTree to NavigationServer. - Removes the irritating debug MeshInstance child node from NavigationRegion3D and replaces it with direct RenderingServer API.
* Implement NavigationMesh bake areasmix82022-06-231-0/+24
| | | | Adds two new properties to NavigationMesh resources to restrict the navmesh baking to an area enclosed by an AABB with volume.
* Add suffixes to all nodes and resourcesFireForge2022-06-111-11/+11
|
* Remove slash delimiter from NavigationMesh propertiessmix82022-06-091-23/+67
| | | | Remove slash delimiter from NavigationMesh properties.
* Remove arbitrary NavigationMesh bake property limitssmix82022-05-181-6/+6
| | | | Lowers or removes the slider limits and steps from NavigationMesh resources and changes some default values to better work with realistic unit sizes by default.
* Add wrong surface warnings to NavigationMesh.create_from_mesh()smix82022-05-181-0/+2
| | | | Adds warnings when at least one of the input mesh surfaces is of wrong primitive type or has an empty vertex / index array as those broken input meshes would fail as both navmesh as well as later when creating debug meshes.
* Merge pull request #61061 from smix8/navigation_mesh_sample_distance_range_4.xRémi Verschelde2022-05-161-2/+2
|\
| * Clamp NavigationMesh sample_distance above zerosmix82022-05-161-2/+2
| | | | | | | | | | | | | | While default ReCast library has support for 0.0 'sample_distance' the Godot implementation does not an crashes. Previously Godot would set all sample_distance values below 0.9 to 0 which causes the crashes. This limits the sample_distance range selection to 0.1 - 16.0 and also clamps sample_distance that are below 0.1 before ReCast receives them.
* | Replace most uses of Map by HashMapreduz2022-05-161-3/+3
|/ | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Fix debug navmesh errorsPawel Lampe2022-04-041-0/+4
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`Hugo Locurcio2021-11-031-2/+2
| | | | | This is consistent with other constants that include `NO`, such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
* Merge pull request #53208 from timothyqiu/headless-crashRémi Verschelde2021-10-011-0/+2
|\
| * Fix crash in headless modeHaoyu Qiu2021-09-291-0/+2
| |
* | Use range iterators for `Map`Lightning_A2021-09-301-4/+4
|/
* Uniformize layer names, script methods and documentationPouleyKetchoupp2021-08-121-9/+11
| | | | | | | - Back to 1-based layer names to make it clearer in editor UI - Layer bit accessors are renamed to layer value and 1-based too - Uniform errors and documentation in render and physics - Fix a few remaining collision_layer used in place of collision_mask
* Improve NavigationMesh typing, parameter validation and documentationHaoyu Qiu2021-08-111-20/+40
|
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-2/+2
|
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-5/+3
|
* Use PROPERTY_USAGE_NONE instead of 0 for no property usageAaron Franke2021-07-011-2/+2
| | | | Also use const more often.
* Prevent setting too big or too small Collision Mask and LayerRafał Mikrut2021-04-301-0/+2
|
* Add null check for NavigationMesh.create_from_mesh()sps11122021-03-031-0/+2
|
* Removed _change_notifyreduz2021-02-101-5/+5
| | | | | | -For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
* Initialize class variables with default values in scene/ [2/2]Rafał Mikrut2021-02-091-24/+1
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-6/+11
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-20/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-13/+13
| | | | | | | | | | | | | | | | | | | | | - Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.