Skip to content
This repository was archived by the owner on Sep 16, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions Geometry/Mesh.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ private static void LoadGeometry_Ascii(StringReader reader, Mesh mesh)
MatchCollection matches = Regex.Matches(polyBuffer, @"\[(.*?)\]");

int face = 0;
int index = 0;
int target = 0;

var vertex = new Vertex();
Expand All @@ -122,12 +121,9 @@ private static void LoadGeometry_Ascii(StringReader reader, Mesh mesh)
mesh.Verts.Add(vertex);
vertex = new Vertex();

if (index % 3 == 0)
{
int v = (face++) * 3;
int[] faceDef = new int[3] { v, v + 1, v + 2 };
mesh.Faces.Add(faceDef);
}
int v = (face++) * 3;
int[] faceDef = new int[3] { v, v + 1, v + 2 };
mesh.Faces.Add(faceDef);
}
}
}
Expand Down