public void Disconnect(PlanarEdgePair edgePair) { if (PrevEdgeInfo?.IsEqual(edgePair) ?? false) { PrevEdgeInfo = null; } if (NextEdgeInfo?.IsEqual(edgePair) ?? false) { NextEdgeInfo = null; } }
public PlanarEdgePair GetConnectionInfo(PlanarEdge otherEdge) { if (PrevEdgeInfo?.ContainsEdge(otherEdge) ?? false) { return(PrevEdgeInfo); } if (NextEdgeInfo?.ContainsEdge(otherEdge) ?? false) { return(NextEdgeInfo); } return(null); }
public bool IsConnectedTo(PlanarEdge other) { if (other == this) { return(false); } if (NextEdgeInfo != null && NextEdgeInfo.ContainsEdge(other)) { return(true); } if (PrevEdgeInfo != null && PrevEdgeInfo.ContainsEdge(other)) { return(true); } return(false); }