12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- namespace Pathfinding {
- using Pathfinding.Util;
- using UnityEngine;
- public class NavmeshTile : INavmeshHolder {
-
- public int[] tris;
-
- public Int3[] verts;
-
- public Int3[] vertsInGraphSpace;
-
- public int x;
-
- public int z;
-
-
-
-
- public int w;
-
-
-
-
- public int d;
-
- public TriangleMeshNode[] nodes;
-
- public BBTree bbTree;
-
- public bool flag;
- public NavmeshBase graph;
- #region INavmeshHolder implementation
- public void GetTileCoordinates (int tileIndex, out int x, out int z) {
- x = this.x;
- z = this.z;
- }
- public int GetVertexArrayIndex (int index) {
- return index & NavmeshBase.VertexIndexMask;
- }
-
- public Int3 GetVertex (int index) {
- int idx = index & NavmeshBase.VertexIndexMask;
- return verts[idx];
- }
- public Int3 GetVertexInGraphSpace (int index) {
- return vertsInGraphSpace[index & NavmeshBase.VertexIndexMask];
- }
-
- public GraphTransform transform { get { return graph.transform; } }
- #endregion
- public void GetNodes (System.Action<GraphNode> action) {
- if (nodes == null) return;
- for (int i = 0; i < nodes.Length; i++) action(nodes[i]);
- }
- }
- }
|