/// <summary> /// /// </summary> /// <param name="x"></param> /// <param name="insertEvent"></param> /// <param name="sweepInt"></param> public SweepLineEvent(double x, SweepLineEvent insertEvent, SweepLineInterval sweepInt) { xValue = x; this.insertEvent = insertEvent; if (insertEvent != null) eventType = SweepLineEvents.Delete; else eventType = SweepLineEvents.Insert; this.sweepInt = sweepInt; }
/// <summary> /// /// </summary> /// <param name="sweepInt"></param> public virtual void Add(SweepLineInterval sweepInt) { SweepLineEvent insertEvent = new SweepLineEvent(sweepInt.Min, null, sweepInt); events.Add(insertEvent); events.Add(new SweepLineEvent(sweepInt.Max, insertEvent, sweepInt)); }