public void LinkPolygon(U portal, MeshPoly <T, U> polygon, bool allowDuplicates = false) { if (allowDuplicates || !adjacent.Any(x => x.otherPoly == polygon)) { adjacent.Add(new MeshPortal <T, U>(this, polygon, portal)); } }
public MeshPortal(MeshPoly <T, U> thisPoly, MeshPoly <T, U> otherPoly, U connectingEdge) { this.thisPoly = thisPoly; this.otherPoly = otherPoly; this.connectingEdge = connectingEdge; }