OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #include "PathOpsCubicIntersectionTestData.h" | 7 #include "PathOpsCubicIntersectionTestData.h" |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 static const double D = FLT_EPSILON / 2; | 10 static const double D = FLT_EPSILON / 2; |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 {{{0, D}, {0, 0}, {0, 0}, {1, 0}}}, // horizontal | 204 {{{0, D}, {0, 0}, {0, 0}, {1, 0}}}, // horizontal |
205 {{{1, 0}, {0, 0}, {0, 0}, {0, D}}}, | 205 {{{1, 0}, {0, 0}, {0, 0}, {0, D}}}, |
206 {{{1, D}, {2, 0}, {3, 0}, {4, 0}}}, | 206 {{{1, D}, {2, 0}, {3, 0}, {4, 0}}}, |
207 {{{D, 0}, {0, 0}, {0, 0}, {0, 1}}}, // vertical | 207 {{{D, 0}, {0, 0}, {0, 0}, {0, 1}}}, // vertical |
208 {{{0, 1}, {0, 0}, {0, 0}, {D, 0}}}, | 208 {{{0, 1}, {0, 0}, {0, 0}, {D, 0}}}, |
209 {{{D, 1}, {0, 2}, {0, 3}, {0, 4}}}, | 209 {{{D, 1}, {0, 2}, {0, 3}, {0, 4}}}, |
210 {{{D, 0}, {0, 0}, {0, 0}, {1, 1}}}, // 3 coincident | 210 {{{D, 0}, {0, 0}, {0, 0}, {1, 1}}}, // 3 coincident |
211 {{{1, 1}, {0, 0}, {0, 0}, {D, 0}}}, | 211 {{{1, 1}, {0, 0}, {0, 0}, {D, 0}}}, |
212 {{{0, D}, {0, 0}, {1, 1}, {2, 2}}}, // 2 coincident | 212 {{{0, D}, {0, 0}, {1, 1}, {2, 2}}}, // 2 coincident |
213 {{{0, 0}, {1, 1}, {0, D}, {2, 2}}}, | 213 {{{0, 0}, {1, 1}, {0, D}, {2, 2}}}, |
214 {{{0, 0}, {1, 1}, {2, 2}, {0, D}}}, | 214 {{{0, 0}, {1, 1}, {2, 2}, {1, 1+D}}}, |
215 {{{1, 1}, {0, D}, {0, 0}, {2, 2}}}, | 215 {{{1, 1}, {0, D}, {0, 0}, {2, 2}}}, |
216 {{{1, 1}, {0, D}, {2, 2}, {0, 0}}}, | 216 {{{1, 1}, {0, D}, {2, 2}, {0, 0}}}, |
217 {{{1, 1}, {2, 2}, {D, 0}, {0, 0}}}, | 217 {{{1, 1}, {2, 2}, {D, 0}, {0, 0}}}, |
218 {{{1, 1}, {2, 2+D}, {3, 3}, {2, 2}}}, // middle-last coincident | 218 {{{1, 1}, {2, 2+D}, {3, 3}, {2, 2}}}, // middle-last coincident |
219 {{{1, 1}, {2+D, 2}, {3, 3}, {3, 3}}}, // middle-last coincident | 219 {{{1, 1}, {2+D, 2}, {3, 3}, {3, 3}}}, // middle-last coincident |
220 {{{1, 1}, {1, 1}, {2, 2}, {2+D, 2}}}, // 2 pairs coincident | 220 {{{1, 1}, {1, 1}, {2, 2}, {2+D, 2}}}, // 2 pairs coincident |
221 {{{1, 1}, {2, 2}, {1, 1}, {2+D, 2}}}, | 221 {{{1, 1}, {2, 2}, {1, 1}, {2+D, 2}}}, |
222 {{{1, 1}, {1, 1+D}, {3, 3}, {3, 3}}}, // first-middle middle-last coinciden
t | 222 {{{1, 1}, {1, 1+D}, {3, 3}, {3, 3}}}, // first-middle middle-last coinciden
t |
223 {{{1, 1}, {2+D/2, 2}, {3, 3}, {4, 4}}}, // no coincident (FIXME: N as oppos
ed to N/2 failed) | 223 {{{1, 1}, {2+D/2, 2}, {3, 3}, {4, 4}}}, // no coincident (FIXME: N as oppos
ed to N/2 failed) |
224 {{{1, 1}, {3, 3}, {2, 2}, {4, 4+D}}}, | 224 {{{1, 1}, {3, 3}, {2, 2}, {4, 4+D}}}, |
(...skipping 15 matching lines...) Expand all Loading... |
240 {{{0, N}, {0, 0}, {0, 0}, {1, 0}}}, // horizontal | 240 {{{0, N}, {0, 0}, {0, 0}, {1, 0}}}, // horizontal |
241 {{{1, 0}, {0, 0}, {0, 0}, {0, N}}}, | 241 {{{1, 0}, {0, 0}, {0, 0}, {0, N}}}, |
242 {{{1, N}, {2, 0}, {3, 0}, {4, 0}}}, | 242 {{{1, N}, {2, 0}, {3, 0}, {4, 0}}}, |
243 {{{N, 0}, {0, 0}, {0, 0}, {0, 1}}}, // vertical | 243 {{{N, 0}, {0, 0}, {0, 0}, {0, 1}}}, // vertical |
244 {{{0, 1}, {0, 0}, {0, 0}, {N, 0}}}, | 244 {{{0, 1}, {0, 0}, {0, 0}, {N, 0}}}, |
245 {{{N, 1}, {0, 2}, {0, 3}, {0, 4}}}, | 245 {{{N, 1}, {0, 2}, {0, 3}, {0, 4}}}, |
246 {{{N, 0}, {0, 0}, {0, 0}, {1, 1}}}, // 3 coincident | 246 {{{N, 0}, {0, 0}, {0, 0}, {1, 1}}}, // 3 coincident |
247 {{{1, 1}, {0, 0}, {0, 0}, {N, 0}}}, | 247 {{{1, 1}, {0, 0}, {0, 0}, {N, 0}}}, |
248 {{{0, N}, {0, 0}, {1, 1}, {2, 2}}}, // 2 coincident | 248 {{{0, N}, {0, 0}, {1, 1}, {2, 2}}}, // 2 coincident |
249 {{{0, 0}, {1, 1}, {0, N}, {2, 2}}}, | 249 {{{0, 0}, {1, 1}, {0, N}, {2, 2}}}, |
250 {{{0, 0}, {1, 1}, {2, 2}, {0, N}}}, | 250 {{{0, 0}, {1, 1}, {2, 2}, {1, 1+N}}}, |
251 {{{1, 1}, {0, N}, {0, 0}, {2, 2}}}, | 251 {{{1, 1}, {0, N}, {0, 0}, {2, 2}}}, |
252 {{{1, 1}, {0, N}, {2, 2}, {0, 0}}}, | 252 {{{1, 1}, {0, N}, {2, 2}, {0, 0}}}, |
253 {{{1, 1}, {2, 2}, {N, 0}, {0, 0}}}, | 253 {{{1, 1}, {2, 2}, {N, 0}, {0, 0}}}, |
254 {{{1, 1}, {2, 2+N}, {3, 3}, {2, 2}}}, // middle-last coincident | 254 {{{1, 1}, {2, 2+N}, {3, 3}, {2, 2}}}, // middle-last coincident |
255 {{{1, 1}, {2+N, 2}, {3, 3}, {3, 3}}}, // middle-last coincident | 255 {{{1, 1}, {2+N, 2}, {3, 3}, {3, 3}}}, // middle-last coincident |
256 {{{1, 1}, {1, 1}, {2, 2}, {2+N, 2}}}, // 2 pairs coincident | 256 {{{1, 1}, {1, 1}, {2, 2}, {2+N, 2}}}, // 2 pairs coincident |
257 {{{1, 1}, {2, 2}, {1, 1}, {2+N, 2}}}, | 257 {{{1, 1}, {2, 2}, {1, 1}, {2+N, 2}}}, |
258 {{{1, 1}, {1, 1+N}, {3, 3}, {3, 3}}}, // first-middle middle-last coinciden
t | 258 {{{1, 1}, {1, 1+N}, {3, 3}, {3, 3}}}, // first-middle middle-last coinciden
t |
259 {{{1, 1}, {2+N/2, 2}, {3, 3}, {4, 4}}}, // no coincident (FIXME: N as oppos
ed to N/2 failed) | 259 {{{1, 1}, {2+N/2, 2}, {3, 3}, {4, 4}}}, // no coincident (FIXME: N as oppos
ed to N/2 failed) |
260 {{{1, 1}, {3, 3}, {2, 2}, {4, 4+N}}}, | 260 {{{1, 1}, {3, 3}, {2, 2}, {4, 4+N}}}, |
261 {{{1, 1+N}, {2, 2}, {4, 4}, {3, 3}}}, | 261 {{{1, 1+N}, {2, 2}, {4, 4}, {3, 3}}}, |
262 {{{1, 1}, {3, 3}, {4, 4+N}, {2, 2}}}, | 262 {{{1, 1}, {3, 3}, {4, 4+N}, {2, 2}}}, |
263 {{{1, 1}, {4, 4}, {2, 2}, {3, 3+N}}}, | 263 {{{1, 1}, {4, 4}, {2, 2}, {3, 3+N}}}, |
264 {{{1, 1}, {4, 4}, {3, 3}, {2+M, 2}}}, // INVESTIGATE: why the epsilon is sm
aller | 264 {{{1, 1}, {4, 4}, {3, 3}, {2+M, 2}}}, // INVESTIGATE: why the epsilon is sm
aller |
265 {{{2, 2}, {1, 1}, {3+N, 3}, {4, 4}}}, | 265 {{{2, 2}, {1, 1}, {3+N, 3}, {4, 4}}}, |
266 {{{2, 2}, {1+N, 1}, {4, 4}, {3, 3}}}, | 266 {{{2, 2}, {1+N, 1}, {4, 4}, {3, 3}}}, |
267 {{{2, 2+N}, {3, 3}, {1, 1}, {4, 4}}}, | 267 {{{2, 2+N}, {3, 3}, {1, 1}, {4, 4}}}, |
268 {{{2+M, 2}, {3, 3}, {4, 4}, {1, 1}}}, // INVESTIGATE: why the epsilon is sm
aller | 268 {{{2+M, 2}, {3, 3}, {4, 4}, {1, 1}}}, // INVESTIGATE: why the epsilon is sm
aller |
269 {{{2, 2}, {4+N, 4}, {1, 1}, {3, 3}}}, | 269 {{{2, 2}, {4+N, 4}, {1, 1}, {3, 3}}}, |
270 {{{2, 2}, {4, 4}, {3, 3}, {1, 1+N}}}, | 270 {{{2, 2}, {4, 4}, {3, 3}, {1, 1+N}}}, |
271 }; | 271 }; |
272 | 272 |
273 const size_t negEpsilonLines_count = SK_ARRAY_COUNT(negEpsilonLines); | 273 const size_t negEpsilonLines_count = SK_ARRAY_COUNT(negEpsilonLines); |
OLD | NEW |