96 {
97 {
100 tp.verifySweepLine(0);
101 }
102 {
105
107 public:
109 SK_ABORT(
"There should be no crossings.");
110 }
111 } eventQueue;
114
115 insertions.insert(
s);
116
117 tp.verifySweepLine(-99);
118
120 Point{0, -100}, insertions, &eventQueue);
122
123 tp.verifySweepLine(-99);
124 }
125
126 {
129
130 Point p0 = {-100, -100},
131 p1 = { 100, 100},
132 p2 = { 100, -100},
133 p3 = {-100, 100},
134 p4 = { 0, -100},
135 p5 = { 0, -50};
137 s1 = {p2, p3},
138 s2 = {p4, p5};
139
141 public:
143 fCrossing.push_back({s0, s1, crossingPoint});
144 }
145 std::vector<Crossing> fCrossing;
146 } eventQueue;
147
148 {
150 insertions.insert(s0);
151 tp.verifySweepLine(-99);
153 p0, insertions, &eventQueue);
156 tp.verifySweepLine(-99);
157 }
158 {
160 insertions.insert(s2);
161 tp.verifySweepLine(-99);
163 p4, insertions, &eventQueue);
166 tp.verifySweepLine(-99);
167 }
168 {
170 insertions.insert(s1);
171 tp.verifySweepLine(-99);
173 p2, insertions, &eventQueue);
176 tp.verifySweepLine(-99);
177 }
178 {
181 tp.verifySweepLine(-51);
185 p5, insertions, &eventQueue);
187 tp.verifySweepLine(-51);
188 }
189 {
192 tp.verifySweepLine(-1);
195 {0,0}, insertions, &eventQueue);
198 tp.verifySweepLine(1);
199 }
200 {
203 tp.verifySweepLine(99);
206 p3, insertions, &eventQueue);
209 tp.verifySweepLine(99);
210 }
211 {
214 tp.verifySweepLine(99);
217 p1, insertions, &eventQueue);
220 tp.verifySweepLine(99);
221 }
222 }
223}
#define SK_ABORT(message,...)
#define REPORTER_ASSERT(r, cond,...)
virtual void addCrossing(Point crossingPoint, const Segment &s0, const Segment &s1)=0
void handleDeletions(Point eventPoint, const DeletionSegmentSet &removing) override
void handleInsertionsAndCheckForNewCrossings(Point eventPoint, const InsertionSegmentSet &inserting, EventQueueInterface *queue) override
std::set< Segment, OrderBySlope > InsertionSegmentSet
std::set< Segment > DeletionSegmentSet