1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| void Check1In2Out(int index1In, int index2Out, int index3Out, int submesh) { int newVertex1Index = CutEdge(index1In, index2Out); int newVertex2Index = CutEdge(index1In, index3Out); newEdgePoints.Add((newVertices[newVertex1Index], newVertices[newVertex2Index]));
int oldVert1Index = AddOldVertex(index1In); int[] trianglesToAdd = new int[] { oldVert1Index, newVertex1Index, newVertex2Index };
newTriangles[submesh].AddRange(trianglesToAdd); }
void Check2In1Out(int index1In, int index2In, int index3Out, int submesh) { int newVertex1Index = CutEdge(index1In, index3Out); int newVertex2Index = CutEdge(index2In, index3Out); newEdgePoints.Add((newVertices[newVertex1Index], newVertices[newVertex2Index]));
int oldVertex1Index = AddOldVertex(index1In); int oldVertex2Index = AddOldVertex(index2In); int[] trianglesToAdd = new int[] { oldVertex1Index, newVertex1Index, oldVertex2Index, newVertex1Index, newVertex2Index, oldVertex2Index };
newTriangles[submesh].AddRange(trianglesToAdd); }
void CheckAllIn(int index1In, int index2In, int index3In, int submesh) { int oldVertex1Index = AddOldVertex(index1In); int oldVertex2Index = AddOldVertex(index2In); int oldVertex3Index = AddOldVertex(index3In); int[] trianglesToAdd = new int[] { oldVertex1Index, oldVertex2Index, oldVertex3Index };
newTriangles[submesh].AddRange(trianglesToAdd); }
|