public void FlipFace(int indx) { int[] faceIndx = new int[3] { faces[indx].A, faces[indx].B, faces[indx].C }; faces[indx] = new FaceDefinition() { A = faceIndx[2], B = faceIndx[1], C = faceIndx[0] }; UpdateFaces(); }
public static TrueTypeFace GetFont(string path, int size) { var definition = new FaceDefinition { Path = path, Size = size }; lock (Library) { TrueTypeFace font = null; if (LoadedFonts.TryGetValue(definition, out font)) { return(font); } font = new TrueTypeFace(path, size); LoadedFonts.Add(definition, font); return(font); } }
private void UpdateFaces() { GetRequiredComponents(); mesh.Clear(); mesh.vertices = verts.ToArray(); mesh.normals = normals.ToArray(); int[] faceList = new int[faces.Count * 3]; for (int i = 0; i < faces.Count; i++) { FaceDefinition currentFace = faces[i]; faceList[i * 3] = currentFace.A; faceList[(i * 3) + 1] = currentFace.B; faceList[(i * 3) + 2] = currentFace.C; } mesh.triangles = faceList; meshFilter.mesh = mesh; }