public void Reset() { start_int = null; mid_int = null; end_int = null; midDegen = false; Up = null; Down = null; useStart = true; // TODO: Reset contPrev here too for (; contNext != null; contNext = contNext.contNext) { endPt = contNext.endPt; } }
public SingleLL(Segment i, SingleLL n) { item = i; next = n; }
private static void RecordEndIntersections(BundleTree oldEqTree, BundleTree newEqTree) { int intCount = -1; SingleLL intptr = null; Segment prev = null; for (Bundle bptr = oldEqTree.Top; bptr != null; bptr = bptr.PurpleDown) { for (Segment sptr = bptr.Top; sptr != null; sptr = sptr.Down) { intCount++; if (intptr == null) { intptr = new SingleLL(sptr, null); intptr.next = intptr; } else { intptr.next = new SingleLL(sptr, intptr.next); intptr = intptr.next; } } } for (Bundle bptr = newEqTree.Bottom; bptr != null; bptr = bptr.PurpleUp) { for (Segment sptr = bptr.Bottom; sptr != null; sptr = sptr.Up) { intCount++; if (intptr == null) { intptr = new SingleLL(sptr, null); intptr.next = intptr; } else { intptr.next = new SingleLL(sptr, intptr.next); intptr = intptr.next; } } } if (intCount <= 0) { return; } Debug.Assert(intptr != null); intptr = intptr.next; for (Bundle bptr = oldEqTree.Top; bptr != null; bptr = bptr.PurpleDown) { for (Segment sptr = bptr.Top; sptr != null; sptr = sptr.Down) { sptr.AddEndIntersections(intptr, intCount); if (prev != null && prev.IsSameSeg(sptr)) { prev.AddLIntersection(sptr); sptr.AddLIntersection(prev); } intptr = intptr.next; prev = sptr; } } for (Bundle bptr = newEqTree.Bottom; bptr != null; bptr = bptr.PurpleUp) { for (Segment sptr = bptr.Bottom; sptr != null; sptr = sptr.Up) { sptr.AddStartIntersections(intptr, intCount); intptr = intptr.next; } } }
public void AddLIntersection(Segment seg) { mid_int = new SingleLL(seg, mid_int); midDegen = true; }
public void AddStartIntersections(SingleLL intList, int numint) { start_int = intList; }
public void AddEndIntersections(SingleLL intList, int numint) { end_int = intList; }
public void AddNonDegenerateIntersection(Segment seg) { mid_int = new SingleLL(seg, mid_int); midDegen = false; }