Exemple #1
0
 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);
 }
Exemple #2
0
 private bool IsSegmentPresentInGrid(IntVector2 segmentAlignedPosition, IntersegmentInGrid intersegment, SegmentNeighbourhoodCorner cornerInIntersegment)
 {
     return(intersegment.IsNewSegment(cornerInIntersegment) ||
            NeighbourHasAdjacentSegment(intersegment.GetSegment(cornerInIntersegment), segmentAlignedPosition, intersegment.GetDiregmentOf(cornerInIntersegment)));
 }
Exemple #3
0
        private bool SegmentHasPresentIntersectingCorner(IntersegmentInGrid intersegment, SegmentNeighbourhoodCorner corner)
        {
            var segment = intersegment.GetSegment(corner);

            return(segment.WasCornerWelded(corner.Opposite));
        }