private void AddSegmentsCornerWelding(IntersegmentInGrid intersegment, SegmentNeighbourhoodCorner cornerInIntersegment, List <SegmentCornerToModify> cornersToRegenerate) { cornersToRegenerate.Add(new SegmentCornerToModify() { Corner = cornerInIntersegment.Opposite, ModuledPositionOfSegment = intersegment.GetSegment(cornerInIntersegment).ModuledSegmentPosition.ModuledPosition }); intersegment.GetSegment(cornerInIntersegment).SetCornerWelded(cornerInIntersegment.Opposite); }
private bool IsSegmentPresentInGrid(IntVector2 segmentAlignedPosition, IntersegmentInGrid intersegment, SegmentNeighbourhoodCorner cornerInIntersegment) { return(intersegment.IsNewSegment(cornerInIntersegment) || NeighbourHasAdjacentSegment(intersegment.GetSegment(cornerInIntersegment), segmentAlignedPosition, intersegment.GetDiregmentOf(cornerInIntersegment))); }
private bool SegmentHasPresentIntersectingCorner(IntersegmentInGrid intersegment, SegmentNeighbourhoodCorner corner) { var segment = intersegment.GetSegment(corner); return(segment.WasCornerWelded(corner.Opposite)); }