Jakob Botsch Nielsen
e30a6635a2
Fix warnings and increase demo text pool size
...
Fix three warnings added in fc5df2c, and increase the text pool size in
the demo. This would frequently be overflowed, even just by building
with the default settings and expanding the log.
2016-02-16 10:27:18 +01:00
Jakob Botsch Nielsen
fc5df2c6fd
Add API to query polygons in batches
...
This adds a version of queryPolygon that takes an interface which is
passed batches of polygons in the search area. This new API is then used
from the old queryPolygons to collect polygons, and from findNearestRef
to find the nearest poly in an arbitrarily sized area. Previously
findNearestPoly had an arbitrary poly limit of 128 which could cause it
to return potentially wrong results.
Fix #107
2016-01-25 23:25:48 +01:00
Graham Pentheny
b7a83e0afb
Fixed rule of 3 violations in many places.
...
* Added virtual qualifier to a few destructors in subclasses.
* Removed a few empty destructors that didn't need to be explicitly defined.
* Fixed a few typos
* Removed unnecessary empty virtual destructors in some classes with parent's who derrived from a class with a virtual destructor
2016-01-20 11:57:32 -05:00
Ben Hymers
551d1b250e
Use size_t for rcAlloc and dtAlloc
...
This was already partly done by @cexikitin in #65 , I'm just finishing it
off in their absence!
Closes #65
2016-01-15 00:36:18 +00:00
Jakob Botsch Nielsen
67590642c7
Add documentation about data to addTile
...
dtNavMesh needs exclusive access to the data passed to addTile since it
will make dynamic changes to this at runtime. For that reason the data
should not be reused until the tile has been removed from the nav mesh
again.
Fix #149
2016-01-14 00:27:40 +01:00
Graham Pentheny
43a20cce42
Merge pull request #109 from Kromster80/patch-2
...
Updated dtFindPathOptions description and options
2016-01-02 10:30:37 -05:00
Jakob Botsch Nielsen
e2cc5ae419
Correctly remove off mesh links to other layers
...
External links representing off mesh connections between layers in the
same tile location would not be correctly removed. These links had
side = 0xff which were skipped during tile removal under the assumption
that these links were internal.
Also correct some comments in the same place.
Fix #113
2015-12-29 17:51:15 +01:00
Jakob Botsch Nielsen
643a3a7043
findNearestPoly now fails when nearestRef is null, and only assigns it when the function succeeds
2015-12-17 18:57:06 +01:00
Jakob Botsch Nielsen
7d924b1eee
Use intermediate variable for nearest point in findNearestPoly
...
When the same point is used as center and as nearestPt, the function
would override center and give wrong results.
Fix #118
2015-12-16 18:18:11 +01:00
Richard Fine
67736ae7d5
Include hit edge index in dtRaycastHit.
...
This makes it simpler to investigate exactly what is blocking a ray - for example, if an agent cannot move onto a polygon due to QueryFilter flags, then this provides a way for the agent to find out which flags it needs to have and to perform a state change which alters its movement flags.
2015-11-15 21:46:30 +00:00
Krom Stern
bbbdc0ec64
Updated dtFindPathOptions description and options
...
"Options for dtNavMeshQuery::FindPath" is not correct, the option is used in SlicedFindPath only
DT_FINDPATH_LOW_QUALITY_FAR is not used anywhere
I would also add, that even though raycast considers costs, does so not very well :-(
2015-08-29 17:22:35 +03:00
Mikko Mononen
acbbe507fd
Merge pull request #82 from Kromster80/loopFix
...
Loop fix and MAX_SEARCH
2015-02-19 14:23:07 +02:00
Kromster80
5c45736347
MAX_SEARCH constant instead of hardcoded value
2015-01-06 23:26:14 +03:00
grahamboree
45b36f4d75
Removed redundant dtSqrt function and replaced calls to it with dtMathSqrtf
2015-01-03 16:00:00 -05:00
grahamboree
a792998286
Replaced math function macros with inline functions.
2015-01-02 18:10:45 -05:00
Mikko Mononen
3b0dc620e0
Merge pull request #57 from Kromster80/SyncVarName
...
Sync var name
2014-12-13 13:47:52 +02:00
Kromster80
2dce2dfd0c
Synced Header and CPP variable names
2014-11-28 14:34:43 +03:00
Kromster80
0ccf9fbb6c
Removed unnecessary assignment
2014-11-16 21:32:29 +03:00
axelrodR
5d480636d1
Removed the multiple nodes per tile boundary. Left only the any-angle improvement.
2014-06-27 17:53:04 +03:00
axelrodR
2172c712b1
bugfix in raycast: accidentally overwriting the previous tile ref.
2014-06-25 00:56:16 +03:00
axelrodR
90a3c7a8ae
code style correction following rafzi's comments
2014-06-19 17:36:37 +03:00
axelrodR
8816e71535
Merge branch 'master' of https://github.com/memononen/recastnavigation
2014-06-19 17:04:14 +03:00
Janiels
943bf35d32
Add virtual destructor to dtQueryFilter
2014-06-14 15:45:36 +02:00
axelrodR
a350a92264
addressed Mikko's comment about isValidPolyRef returning a boolean and not dtStatus.
2014-05-28 00:18:01 +03:00
axelrodR
27ffa5b4d3
fixes following mikko's comments from 11/4/14
2014-04-23 16:24:36 +03:00
axelrodR
9b73c5cf51
Merge branch 'master' of https://github.com/memononen/recastnavigation
2014-04-23 14:53:04 +03:00
axelrodR
a7f1d5e6a4
spelling mistakes
2014-04-23 14:52:54 +03:00
axelrodR
232187b9d6
changed the default options of the pathfinder to 0 (i.e. no raycasts), changed the the tester tool to display all points along the sliced path (a better default for non flat terrain).
2014-02-27 14:21:09 +02:00
axelrodR
4b43c33ae1
bug fix: finalizeSlicedFindPathPartial() did not handle the case of DT_NODE_PARENT_DETACHED at all.
2014-02-27 09:27:32 +02:00
axelrodR
c2b2b03b8f
bug fix: returned path had duplicates of nodes
2014-02-27 01:47:21 +02:00
axelrodR
ffbff5dcc9
changed the remarks and value of RAY_CAST_LIMIT_PROPORTIONS
2014-02-26 22:48:27 +02:00
axelrodR
1613a5565f
following mikko's comments on push #17 (part 2). Interfaces changes, the most notable is adding option flags to initSlicedFindPath that can cancel the any-angle search
2014-02-26 21:29:13 +02:00
axelrodR
1b7b918641
following mikko's comments on push #17 . Interfaces changes, the most notable is adding a new raycast function and converted the existing to a thin wrapper.
2014-02-25 11:33:06 +02:00
Mikko Mononen
bad6c17182
Merge pull request #16 from qiqian/master
...
calculate off-mesh-connection height correctly
2014-02-21 10:33:01 +02:00
axelrodR
7bc913aada
Merge branch 'master' of https://github.com/axelrodR/recastnavigation
2014-02-16 16:57:30 +02:00
axelrodR
120de6256f
changed path planner to Theta*, changed the raycast function to emit a cost based on the actual traversal cost
2014-02-16 16:51:29 +02:00
axelrodR
dcbfd7c116
Merge branch 'master' of https://github.com/memononen/recastnavigation
2014-02-16 16:43:37 +02:00
Mikko Mononen
19e2d8dbe6
Fixed pos-over-poly case for finding nearest polygon
2014-02-16 11:27:45 +02:00
axelrodR
0494d61ddb
Merge branch 'master' of https://github.com/memononen/recastnavigation
2014-02-13 00:08:49 +02:00
Mikko Mononen
6702143bc1
Fix for broken raycasts, changes how findNearestPoly works, slight API change
...
- test case supports raycasts
- changes how findNearestPoly works directly over polygons
- API change: findNearestPoly has additional parameter
2014-02-11 20:32:00 +02:00
axelrodR
e2722403be
bugfix: raycasts sometimes fail when the origin is near a boundary of a triangle with a slope. The fix of considers polygons to have a thickness for the purpose of finding closest nodes.
2014-02-10 00:30:46 +02:00
Qian Qian
90d5a85b85
calculate off-mesh-connection height correctly
2014-02-03 16:34:47 +08:00
axelrodR
72b7123e72
moving from creating several nodes at once for the same ref to creating as needed based on ref and state (where state is currently used only for border poly to keep the arrival side).
2014-01-31 11:26:12 +02:00
axelrodR
9b57498406
fix: multiple node allocation had a bug
2014-01-31 00:08:23 +02:00
axelrodR
d2306cacdd
improving path aesthetics at tile crossing: in the old code, when a new node is found a single 3D position is associated with it. This position is used regardless of arriving from a new tile. A minor issue on a normal navmesh, this produces many problems when crossing tiles. Points might be located on different borders altogether depending on where one arrived from first.
...
The new code assigns several (consecutive) dtNodes for polygons that lie on tile boundary. Each node gets its own point. since the nodes are packed together consecutively, it is easy to find the right node by reference even though there are several.
2014-01-30 11:57:13 +02:00
Mikko Mononen
a08258d9dd
Merge pull request #11 from flippy84/master
...
Update DetourNavMeshQuery.h
2013-12-22 08:02:47 -08:00
Mikko Mononen
6a7f5268ab
Added define to compile Detour with 64bit dtPolyRefs
2013-12-22 18:01:06 +02:00
flippy84
3f8c0506fb
Update DetourNavMeshQuery.h
...
Changed existing and existingSize parameters of finalizeSlicedFindPathPartial to @param[in]
2013-12-21 13:49:38 +01:00
grahamboree
dc7e248de6
Removed header dependency between Detour and Recast due to addition of rcIgnoreUnused. Added dtIgnoreUnused.
2013-10-15 17:29:14 -04:00
Mikko Mononen
be4d6fc180
Updated build system to premake4
2013-10-01 19:53:18 +02:00