@@ -12,7 +12,7 @@ public class BentleyOttmann
12
12
{
13
13
private readonly PointComparer pointComparer ;
14
14
15
- private HashSet < Event > verticalHorizontalLines ;
15
+ private HashSet < Event > verticalAndHorizontalLines ;
16
16
private HashSet < Event > otherLines ;
17
17
18
18
private BHeap < Event > eventQueue ;
@@ -41,7 +41,7 @@ private void initialize(IEnumerable<Line> lineSegments)
41
41
currentlyTrackedLines = new RedBlackTree < Event > ( true , pointComparer ) ;
42
42
intersectionEvents = new Dictionary < Point , HashSet < Tuple < Event , Event > > > ( pointComparer ) ;
43
43
44
- verticalHorizontalLines = new HashSet < Event > ( ) ;
44
+ verticalAndHorizontalLines = new HashSet < Event > ( ) ;
45
45
otherLines = new HashSet < Event > ( ) ;
46
46
47
47
rightLeftEventLookUp = lineSegments
@@ -82,9 +82,9 @@ public Dictionary<Point, List<Line>> FindIntersections(IEnumerable<Line> lineSeg
82
82
case EventType . Start :
83
83
84
84
//special case
85
- if ( verticalHorizontalLines . Count > 0 )
85
+ if ( verticalAndHorizontalLines . Count > 0 )
86
86
{
87
- foreach ( var line in verticalHorizontalLines )
87
+ foreach ( var line in verticalAndHorizontalLines )
88
88
{
89
89
var intersection = findIntersection ( currentEvent , line ) ;
90
90
recordIntersection ( currentEvent , line , intersection ) ;
@@ -94,7 +94,7 @@ public Dictionary<Point, List<Line>> FindIntersections(IEnumerable<Line> lineSeg
94
94
//special case
95
95
if ( currentEvent . Segment . IsVertical || currentEvent . Segment . IsHorizontal )
96
96
{
97
- verticalHorizontalLines . Add ( currentEvent ) ;
97
+ verticalAndHorizontalLines . Add ( currentEvent ) ;
98
98
99
99
foreach ( var line in otherLines )
100
100
{
@@ -129,7 +129,7 @@ public Dictionary<Point, List<Line>> FindIntersections(IEnumerable<Line> lineSeg
129
129
//special case
130
130
if ( currentEvent . Segment . IsVertical || currentEvent . Segment . IsHorizontal )
131
131
{
132
- verticalHorizontalLines . Remove ( currentEvent ) ;
132
+ verticalAndHorizontalLines . Remove ( currentEvent ) ;
133
133
break ;
134
134
}
135
135
0 commit comments