new Exception().printStackTrace();
System.exit(1);
}
OBJModel test = new OBJModel("./res/models/" + fileName);
IndexedModel model = test.ToIndexedModel();
ArrayList<Vertex> vertices = new ArrayList<Vertex>();
for(int i = 0; i < model.GetPositions().size(); i++)
{
vertices.add(new Vertex(model.GetPositions().get(i),
model.GetTexCoords().get(i),
model.GetNormals().get(i),
model.GetTangents().get(i)));
}
Vertex[] vertexData = new Vertex[vertices.size()];
vertices.toArray(vertexData);
Integer[] indexData = new Integer[model.GetIndices().size()];
model.GetIndices().toArray(indexData);
AddVertices(vertexData, Util.ToIntArray(indexData), false);
return this;
}