private static void BuildCross(Vector3 localPos, Vector3i worldPos, Map map, MeshBuilder mesh) { CrossBlock cross = (CrossBlock)map.GetBlock(worldPos).block; mesh.AddIndices(cross.GetAtlasID(), indices); mesh.AddVertices(vertices, localPos); mesh.AddNormals(normals); mesh.AddTexCoords(cross.GetFaceUV()); mesh.AddTexCoords(cross.GetFaceUV()); mesh.AddTexCoords(cross.GetFaceUV()); mesh.AddTexCoords(cross.GetFaceUV()); }
public static MeshBuilder Build(CrossBlock cross) { MeshBuilder mesh = new MeshBuilder(); mesh.AddIndices(0, indices); mesh.AddVertices(vertices, Vector3.zero); mesh.AddNormals(normals); mesh.AddTexCoords(cross.GetFaceUV()); mesh.AddTexCoords(cross.GetFaceUV()); mesh.AddTexCoords(cross.GetFaceUV()); mesh.AddTexCoords(cross.GetFaceUV()); mesh.AddColors(new Color(0, 0, 0, 1), vertices.Length); return(mesh); }