MCPcopy Create free account
hub / github.com/AngusJohnson/Clipper2 / InsertLeftEdge

Method InsertLeftEdge

CSharp/Clipper2Lib/Clipper.Engine.cs:1121–1149  ·  view source on GitHub ↗
(Active ae)

Source from the content-addressed store, hash-verified

1119 }
1120
1121 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1122 private void InsertLeftEdge(Active ae)
1123 {
1124 if (_actives == null)
1125 {
1126 ae.prevInAEL = null;
1127 ae.nextInAEL = null;
1128 _actives = ae;
1129 }
1130 else if (!IsValidAelOrder(_actives, ae))
1131 {
1132 ae.prevInAEL = null;
1133 ae.nextInAEL = _actives;
1134 _actives.prevInAEL = ae;
1135 _actives = ae;
1136 }
1137 else
1138 {
1139 Active ae2 = _actives;
1140 while (ae2.nextInAEL != null && IsValidAelOrder(ae2.nextInAEL, ae))
1141 ae2 = ae2.nextInAEL;
1142 //don't separate joined edges
1143 if (ae2.joinWith == JoinWith.Right) ae2 = ae2.nextInAEL!;
1144 ae.nextInAEL = ae2.nextInAEL;
1145 if (ae2.nextInAEL != null) ae2.nextInAEL.prevInAEL = ae;
1146 ae.prevInAEL = ae2;
1147 ae2.nextInAEL = ae;
1148 }
1149 }
1150
1151 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1152 private static void InsertRightEdge(Active ae, Active ae2)

Callers

nothing calls this directly

Calls 1

IsValidAelOrderFunction · 0.85

Tested by

no test coverage detected