void populateMesh(Mesh m)
	{
		Boolean areNormals = null;
		for(float[] normal:normals)
		{
			if(normal == null)
			{
				if(areNormals == null)
					areNormals = false;
				else if(areNormals == true)
					throw new RuntimeException();
			}
			else
			{
				if (areNormals == null)
					areNormals = true;
				else if(areNormals == false)
					throw new RuntimeException();
			}
		}
		Vertex[] vs = new Vertex[vertices.size()];
		for(int i = 0; i < vs.length; i++)
		{
			vs[i] = new Vertex(vertices.get(i));
			if(areNormals)
				vs[i].normal = normals.get(i);
		}
		for(int i = 0; i < indices.size(); i+=3)
		{
			Vertex[] v = new Vertex[]{
					vs[indices.get(i)], vs[indices.get(i+1)], vs[indices.get(i+2)]
			};
			m.addPolygon(new Polygon(v));
		}
	}