3 using System.Collections.Generic;
15 List<Vector3>adjacentV =
new List<Vector3>();
16 List<int>facemarker =
new List<int>();
20 for (
int i=0; i<v.Length; i++)
21 if (Mathf.Approximately (vertex.x, v[i].x) &&
22 Mathf.Approximately (vertex.y, v[i].y) &&
23 Mathf.Approximately (vertex.z, v[i].z))
30 for(
int k=0; k<t.Length; k=k+3)
31 if(facemarker.Contains(k) ==
false)
92 List<int>adjacentIndexes =
new List<int>();
93 List<Vector3>adjacentV =
new List<Vector3>();
94 List<int>facemarker =
new List<int>();
98 for (
int i=0; i<v.Length; i++)
99 if (Mathf.Approximately (vertex.x, v[i].x) &&
100 Mathf.Approximately (vertex.y, v[i].y) &&
101 Mathf.Approximately (vertex.z, v[i].z))
108 for(
int k=0; k<t.Length; k=k+3)
109 if(facemarker.Contains(k) ==
false)
145 adjacentV.Add(v[v1]);
146 adjacentIndexes.Add(v1);
152 adjacentV.Add(v[v2]);
153 adjacentIndexes.Add(v2);
163 return adjacentIndexes;
170 foreach (Vector3 vec
in adjacentV)
171 if (Mathf.Approximately(vec.x,v.x) && Mathf.Approximately(vec.y,v.y) && Mathf.Approximately(vec.z,v.z))
static List< int > findAdjacentNeighborIndexes(Vector3[] v, int[] t, Vector3 vertex)
static bool isVertexExist(List< Vector3 >adjacentV, Vector3 v)
static List< Vector3 > findAdjacentNeighbors(Vector3[] v, int[] t, Vector3 vertex)