/// <summary> /// Computes edge adjacency for the whole mesh and stores it in the appropriate dictionaries. /// </summary> public void ComputeEdgeAdjacency() { foreach (MeshEdge edge in mesh.Edges) { foreach (MeshVertex adjacent in edge.AdjacentVertices()) { if (!EdgeVertex.ContainsKey(edge.Index)) { EdgeVertex.Add(edge.Index, new List <int>() { adjacent.Index }); } else { EdgeVertex[edge.Index].Add(adjacent.Index); } } foreach (MeshFace adjacent in edge.AdjacentFaces()) { if (!EdgeFace.ContainsKey(edge.Index)) { EdgeFace.Add(edge.Index, new List <int>() { adjacent.Index }); } else { EdgeFace[edge.Index].Add(adjacent.Index); } } foreach (MeshEdge adjacent in edge.AdjacentEdges()) { if (!EdgeEdge.ContainsKey(edge.Index)) { EdgeEdge.Add(edge.Index, new List <int>() { adjacent.Index }); } else { EdgeEdge[edge.Index].Add(adjacent.Index); } } } }
public Edge(string stickerDef, int position, Sq1ImageProp properties) { Face = new EdgeFace(position, stickerDef[0], properties); Side = new EdgeSide(position, stickerDef[1], properties); }