update comment

This commit is contained in:
ikpil 2024-05-24 22:14:57 +09:00
parent 2f50768909
commit 1b4f5af155
1 changed files with 32 additions and 37 deletions

View File

@ -27,18 +27,18 @@ namespace DotRecast.Detour
{ {
using static DtDetour; using static DtDetour;
/// Provides the ability to perform pathfinding related queries against
/// a navigation mesh.
/// @ingroup detour
public class DtNavMeshQuery public class DtNavMeshQuery
{ {
/// < Add a vertex at every polygon edge crossing. protected readonly DtNavMesh m_nav; //< Pointer to navmesh data.
protected readonly DtNavMesh m_nav; protected DtQueryData m_query; //< Sliced query state.
protected readonly DtNodePool m_tinyNodePool; protected readonly DtNodePool m_tinyNodePool; //< Pointer to small node pool.
protected readonly DtNodePool m_nodePool; protected readonly DtNodePool m_nodePool; //< Pointer to node pool.
protected readonly DtNodeQueue m_openList; protected readonly DtNodeQueue m_openList; //< Pointer to open list queue.
protected DtQueryData m_query;
/// < Sliced query state.
public DtNavMeshQuery(DtNavMesh nav) public DtNavMeshQuery(DtNavMesh nav)
{ {
m_nav = nav; m_nav = nav;
@ -1048,26 +1048,22 @@ namespace DotRecast.Detour
return status; return status;
} }
/** ///@}
* Intializes a sliced path query. /// @name Sliced Pathfinding Functions
* /// Common use case:
* Common use case: -# Call InitSlicedFindPath() to initialize the sliced path query. -# Call UpdateSlicedFindPath() /// -# Call initSlicedFindPath() to initialize the sliced path query.
* until it returns complete. -# Call FinalizeSlicedFindPath() to get the path. /// -# Call updateSlicedFindPath() until it returns complete.
* /// -# Call finalizeSlicedFindPath() to get the path.
* @param startRef ///@{
* The reference id of the start polygon.
* @param endRef /// Initializes a sliced path query.
* The reference id of the end polygon. /// @param[in] startRef The reference id of the start polygon.
* @param startPos /// @param[in] endRef The reference id of the end polygon.
* A position within the start polygon. [(x, y, z)] /// @param[in] startPos A position within the start polygon. [(x, y, z)]
* @param endPos /// @param[in] endPos A position within the end polygon. [(x, y, z)]
* A position within the end polygon. [(x, y, z)] /// @param[in] filter The polygon filter to apply to the query.
* @param filter /// @param[in] options query options (see: #dtFindPathOptions)
* The polygon filter to apply to the query. /// @returns The status flags for the query.
* @param options
* query options (see: #FindPathOptions)
* @return
*/
public DtStatus InitSlicedFindPath(long startRef, long endRef, RcVec3f startPos, RcVec3f endPos, IDtQueryFilter filter, int options) public DtStatus InitSlicedFindPath(long startRef, long endRef, RcVec3f startPos, RcVec3f endPos, IDtQueryFilter filter, int options)
{ {
return InitSlicedFindPath(startRef, endRef, startPos, endPos, filter, options, DtDefaultQueryHeuristic.Default, -1.0f); return InitSlicedFindPath(startRef, endRef, startPos, endPos, filter, options, DtDefaultQueryHeuristic.Default, -1.0f);
@ -1133,13 +1129,10 @@ namespace DotRecast.Detour
return m_query.status; return m_query.status;
} }
/** /// Updates an in-progress sliced path query.
* Updates an in-progress sliced path query. /// @param[in] maxIter The maximum number of iterations to perform.
* /// @param[out] doneIters The actual number of iterations completed. [opt]
* @param maxIter /// @returns The status flags for the query.
* The maximum number of iterations to perform.
* @return The status flags for the query.
*/
public virtual DtStatus UpdateSlicedFindPath(int maxIter, out int doneIters) public virtual DtStatus UpdateSlicedFindPath(int maxIter, out int doneIters)
{ {
doneIters = 0; doneIters = 0;
@ -1381,6 +1374,8 @@ namespace DotRecast.Detour
/// Finalizes and returns the results of a sliced path query. /// Finalizes and returns the results of a sliced path query.
/// @param[out] path An ordered list of polygon references representing the path. (Start to end.) /// @param[out] path An ordered list of polygon references representing the path. (Start to end.)
/// [(polyRef) * @p pathCount] /// [(polyRef) * @p pathCount]
/// @param[out] pathCount The number of polygons returned in the @p path array.
/// @param[in] maxPath The max number of polygons the path array can hold. [Limit: >= 1]
/// @returns The status flags for the query. /// @returns The status flags for the query.
public virtual DtStatus FinalizeSlicedFindPath(ref List<long> path) public virtual DtStatus FinalizeSlicedFindPath(ref List<long> path)
{ {