コード例 #1
0
ファイル: LineSweeperBase.cs プロジェクト: Caliper/MSAGL
 public LineSweeperBase(IEnumerable <Polyline> obstacles, Point sweepDirection)
 {
     Obstacles             = obstacles;
     SweepDirection        = sweepDirection;
     DirectionPerp         = sweepDirection.Rotate(-Math.PI / 2);
     EventQueue            = new BinaryHeapWithComparer <SweepEvent>(this);
     ObstacleSideComparer  = new ObstacleSideComparer(this);
     LeftObstacleSideTree  = new RbTree <SegmentBase>(ObstacleSideComparer);
     RightObstacleSideTree = new RbTree <SegmentBase>(ObstacleSideComparer);
 }
コード例 #2
0
ファイル: LineSweeperBase.cs プロジェクト: Caliper/MSAGL
 protected void RemoveLeftSide(LeftObstacleSide side)
 {
     ObstacleSideComparer.SetOperand(side);
     LeftObstacleSideTree.Remove(side);
 }
コード例 #3
0
ファイル: LineSweeperBase.cs プロジェクト: Caliper/MSAGL
 protected void InsertLeftSide(LeftObstacleSide side)
 {
     ObstacleSideComparer.SetOperand(side);
     LeftObstacleSideTree.Insert((side));
 }
コード例 #4
0
ファイル: LineSweeperBase.cs プロジェクト: Caliper/MSAGL
 protected void InsertRightSide(RightObstacleSide side)
 {
     ObstacleSideComparer.SetOperand(side);
     RightObstacleSideTree.Insert(side);
 }
コード例 #5
0
ファイル: LineSweeperBase.cs プロジェクト: Caliper/MSAGL
 protected void RemoveRightSide(RightObstacleSide side)
 {
     ObstacleSideComparer.SetOperand(side);
     RightObstacleSideTree.Remove(side);
 }