if (line.startsWith("v ")) {
assertMatch(vertMatcher, line);
double[] values = parseDoubles(line.substring(2), " ");
illegalAssert(values.length >= 3, "Vertices must have x, y and z components");
Vector3 vert = new Vector3(values[0], values[1], values[2]);
coordSystem.apply(vert);
verts.add(vert);
continue;
}
if (line.startsWith("vt ")) {
assertMatch(uvwMatcher, line);
double[] values = parseDoubles(line.substring(3), " ");
illegalAssert(values.length >= 2, "Tex Coords must have u, and v components");
uvs.add(new Vector3(values[0], 1 - values[1], 0));
continue;
}
if (line.startsWith("vn ")) {
assertMatch(normalMatcher, line);
double[] values = parseDoubles(line.substring(3), " ");
illegalAssert(values.length >= 3, "Normals must have x, y and z components");
Vector3 norm = new Vector3(values[0], values[1], values[2]).normalize();
coordSystem.applyN(norm);
normals.add(norm);
continue;
}
if (line.startsWith("f ")) {