Skip to content

Commit

Permalink
update comment in DtPoly class
Browse files Browse the repository at this point in the history
  • Loading branch information
ikpil committed May 11, 2024
1 parent e926c23 commit 1bf0a88
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/DotRecast.Detour/DtPoly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,24 @@ 3. This notice may not be removed or altered from any source distribution.

namespace DotRecast.Detour
{
/** Defines a polygon within a MeshTile object. */
/// Defines a polygon within a dtMeshTile object.
/// @ingroup detour
public class DtPoly
{
/// Index to first link in linked list. (Or #DT_NULL_LINK if there is no link.)
public readonly int index;

/** The indices of the polygon's vertices. The actual vertices are located in MeshTile::verts. */
/// The indices of the polygon's vertices.
/// The actual vertices are located in dtMeshTile::verts.
public readonly int[] verts;

/** Packed data representing neighbor polygons references and flags for each edge. */
/// Packed data representing neighbor polygons references and flags for each edge.
public readonly int[] neis;

/** The user defined polygon flags. */
/// The user defined polygon flags.
public int flags;

/** The number of vertices in the polygon. */
/// The number of vertices in the polygon.
public int vertCount;

/// The bit packed area id and polygon type.
Expand All @@ -48,25 +51,25 @@ public DtPoly(int index, int maxVertsPerPoly)
neis = new int[maxVertsPerPoly];
}

/** Sets the user defined area id. [Limit: < {@link org.recast4j.detour.NavMesh#DT_MAX_AREAS}] */
/// Sets the user defined area id. [Limit: < #DT_MAX_AREAS]
public void SetArea(int a)
{
areaAndtype = (areaAndtype & 0xc0) | (a & 0x3f);
}

/** Sets the polygon type. (See: #dtPolyTypes.) */
/// Sets the polygon type. (See: #dtPolyTypes.)
public void SetPolyType(int t)
{
areaAndtype = (areaAndtype & 0x3f) | (t << 6);
}

/** Gets the user defined area id. */
/// Gets the user defined area id.
public int GetArea()
{
return areaAndtype & 0x3f;
}

/** Gets the polygon type. (See: #dtPolyTypes) */
/// Gets the polygon type. (See: #dtPolyTypes)
public int GetPolyType()
{
return areaAndtype >> 6;
Expand Down

0 comments on commit 1bf0a88

Please sign in to comment.