classdtNavMesh { // ... dtNavMeshParams m_params; //< Current initialization params. TODO: do not store this info twice. float m_orig[3]; //< Origin of the tile (0,0) float m_tileWidth, m_tileHeight; // tile 的长宽 int m_maxTiles; // 导航网格内的最大 tile 数量 int m_tileLutSize; // tile 哈希表大小(必须为 2 的幂) int m_tileLutMask; // tile 查找时所用的掩码
/// The indices of the polygon's vertices. /// The actual vertices are located in dtMeshTile::verts. unsignedshort verts[DT_VERTS_PER_POLYGON]; // 多边形顶点在 dtMeshTile::verts 数组中的序号
/// Packed data representing neighbor polygons references and flags for each edge. unsignedshort neis[DT_VERTS_PER_POLYGON]; // 多边形每条边的邻接信息,低 8 位存储方向(0~7) unsignedshort flags; // 用户自定义的多边形标记 unsignedchar vertCount; // 多边形顶点数量 unsignedchar areaAndtype; // 高 2 位存储多边形类型,低 6 位存储 area id // 目前多边形类型只有两种:普通多边形、offmesh 多边形 };