Commit Graph

45 Commits (e1665f39450dd9b70fa67a47bd3b26f4d9bdb9e9)

Author SHA1 Message Date
elsid 40688c0e7c
Rename findPath to findPolygonPath to avoid name collision with other findPath 1 year ago
elsid b17afc4641
Use concepts for some argument types 1 year ago
elsid e00eb50587
Remove stepping from findSmoothPath
This is not used anyway. There are features like smooth movement which remove
all redundant points.

Use single findStraightPath call instead of multiple.
1 year ago
elsid 9817f4ca9a
Find closest position on navmesh to start and end before poly path
Start and end might not be located on navmesh and findPath may give wrong
results.
1 year ago
elsid 3dfea1dc1b
Make OutputTransformIterator more generic 1 year ago
elsid de3a6ca6e6
Use std::span for findPath pathBuffer 1 year ago
elsid c334176d73
Use std::span for makeSmoothPath polygonPath 1 year ago
elsid 548c38f54d
Remove unused code 1 year ago
elsid 350027c588
Remove redundant NavMesh argument from findSmoothPath 1 year ago
elsid fcea153947
Transform path coordinates outside findSmoothPath 1 year ago
elsid 472a36d92a
Cleanup detournavigator includes 2 years ago
elsid 28f7a89530
Reuse dtNavMeshQuery
To avoid redundant allocations.
2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
elsid ab1ddc690e
Do not check getPolyHeight status
It may fail in some cases depending on a platform without obvious reason.
2 years ago
elsid b1fb42a28c
Cleanup detournavigator includes 2 years ago
elsid 27cc901e76
Add bindings for navigator utils functions 2 years ago
elsid 1a5932a669
Move std::ostream& operator<< to .cpp 3 years ago
elsid 01c712d5f1
Split navigator settings into subtypes
Mostly to distinguish settings that affect properties of the generated navmesh.
3 years ago
elsid 3b6184dcda
Add missing include
In file included from /<<BUILDDIR>>/openmw-0.47.0+git202111080927~ubuntu18.04.1/components/detournavigator/findsmoothpath.cpp:1:0:
/<<BUILDDIR>>/openmw-0.47.0+git202111080927~ubuntu18.04.1/components/detournavigator/findsmoothpath.hpp:93:48: error: field ‘mSettings’ has incomplete type ‘std::reference_wrapper<const DetourNavigator::Settings>’
         std::reference_wrapper<const Settings> mSettings;
                                                ^~~~~~~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
                 from /usr/include/c++/7/bits/nested_exception.h:40,
                 from /usr/include/c++/7/exception:143,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /<<BUILDDIR>>/openmw-0.47.0+git202111080927~ubuntu18.04.1/components/detournavigator/dtstatus.hpp:6,
                 from /<<BUILDDIR>>/openmw-0.47.0+git202111080927~ubuntu18.04.1/components/detournavigator/findsmoothpath.hpp:4,
                 from /<<BUILDDIR>>/openmw-0.47.0+git202111080927~ubuntu18.04.1/components/detournavigator/findsmoothpath.cpp:1:
/usr/include/c++/7/type_traits:2125:11: note: declaration of ‘class std::reference_wrapper<const DetourNavigator::Settings>’
     class reference_wrapper;
3 years ago
elsid 06ea47f74b
Fix crash in DetourNavigator::fixupCorridor
Handle situation when resulting path does not fit into destination vector.
3 years ago
elsid f6d1689bb9
Avoid redundant polygon path reallocations
Use separate variable to store size and make all operations in-place.
3 years ago
elsid 79665cea66
Avoid access to the path vector element out of range
polygonPath.front() in some cases might reference to a first element of empty
vector. Copy the value into a local variable to be able to access later.
3 years ago
elsid fea4fb6e69
Make AiPursue path destination to be as close as possible to target
Even when target is not reachable actor will try to run there either because
target navmesh polygon is selected within extended area or because partial path
is built to the closest possible polygon.
3 years ago
elsid 94e460ba1e
Use proper check for distance
To avoid invalid results for r < 1.
4 years ago
elsid 793c30ab8d
Check dtNavMeshQuery::getPolyHeight status
Otherwise when it fails a node with zero height will be added to a path.
4 years ago
elsid 7e1630a7ad
Remove redundant getPolyHeight wrapper 4 years ago
elsid cc08a45c31
Move include where it is needed 4 years ago
elsid a3942a1e0a
Remove redundant check for y coordinate in inRange function 4 years ago
jvoisin 28d5e5e8be Remove some superfluous includes in components/detournavigator 4 years ago
elsid 3a9b1ce63a
Use camel case for local constant 4 years ago
elsid a7fe6c7ba1
Move duplicated usage patter of dtNavMeshQuery::findNearestPoly into a separate function 4 years ago
elsid d3ab6c972f
Avoid set unused position from dtNavMeshQuery::findNearestPoly result 4 years ago
Andrei Kortunov 8084a336b5 Replace zeroes and nulls by nullptrs 4 years ago
Bret Curtis 4a54d375cc add cassert for windows 4 years ago
Bret Curtis f6bead88a9 purge boost/optional.hpp headers 4 years ago
Bret Curtis 62b0781f7d use std::optional instead of boost::optional 4 years ago
elsid b095ca6c86
Use actor speed to define area cost for pathfinding 5 years ago
elsid 349040ffb2
Use status codes to handle navigator errors instead of exceptions
For find path use case.
5 years ago
elsid b9f21ec81a
Use custom steps size to make smooth path depending on half extents 6 years ago
Grigory Latyshev 3872d7476b Move makeOsgVec3f() to settingsutils.hpp
Remove all other makeOsgVec3f() implementations
6 years ago
elsid a0ed981a7c
Fix operator ++ for OutputTransformIterator 6 years ago
elsid fb655cb04f
Remove macroses to check recastnavigation functions result 6 years ago
elsid d02beae5a8
Find path for actors according to their abilities to swim and walk 6 years ago
elsid c95cea414c
Support water for NavMesh 6 years ago
elsid fafba8ea0c
Use recastnavigation to find path 6 years ago