internal void Remove(BasicObstacleSide side, Point scanPos) { DevTraceInfo(1, "current linePos = {0}, removing side = {1}", this.linePositionAtLastInsertOrRemove, side.ToString()); Assert(null != Find(side), "side does not exist in the ScanLine"); this.linePositionAtLastInsertOrRemove = scanPos; SideTree.Remove(side); DevTraceDump(2); }
internal RBNode <BasicObstacleSide> Find(BasicObstacleSide side) { // Sides that start after the current position cannot be in the scanline. if (-1 == scanDirection.ComparePerpCoord(this.linePositionAtLastInsertOrRemove, side.Start)) { return(null); } return(SideTree.Find(side)); }
internal RBNode <BasicObstacleSide> NextHigh(RBNode <BasicObstacleSide> sideNode) { var succ = SideTree.Next(sideNode); return(succ); }
internal RBNode <BasicObstacleSide> NextLow(RBNode <BasicObstacleSide> sideNode) { var pred = SideTree.Previous(sideNode); return(pred); }
internal RBNode <BasicObstacleSide> Lowest() { return(SideTree.TreeMinimum()); }
internal RBNode <BasicObstacleSide> Next(Directions dir, RBNode <BasicObstacleSide> sideNode) { var succ = (StaticGraphUtility.IsAscending(dir)) ? SideTree.Next(sideNode) : SideTree.Previous(sideNode); return(succ); }