示例#1
0
 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);
 }
示例#2
0
 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));
 }
示例#3
0
        internal RBNode <BasicObstacleSide> NextHigh(RBNode <BasicObstacleSide> sideNode)
        {
            var succ = SideTree.Next(sideNode);

            return(succ);
        }
示例#4
0
        internal RBNode <BasicObstacleSide> NextLow(RBNode <BasicObstacleSide> sideNode)
        {
            var pred = SideTree.Previous(sideNode);

            return(pred);
        }
示例#5
0
 internal RBNode <BasicObstacleSide> Lowest()
 {
     return(SideTree.TreeMinimum());
 }
示例#6
0
        internal RBNode <BasicObstacleSide> Next(Directions dir, RBNode <BasicObstacleSide> sideNode)
        {
            var succ = (StaticGraphUtility.IsAscending(dir)) ? SideTree.Next(sideNode) : SideTree.Previous(sideNode);

            return(succ);
        }