| 1368 | namespace |
| 1369 | { |
| 1370 | void SubdivideForLength(const Spline2& s, vector<Spline2>* splines, float tolerance) |
| 1371 | { |
| 1372 | float error; |
| 1373 | float length = LengthEstimate(s, &error); |
| 1374 | |
| 1375 | if (error <= tolerance * length) |
| 1376 | splines->push_back(s); |
| 1377 | else |
| 1378 | { |
| 1379 | Spline2 s1, s2; |
| 1380 | Split(s, &s1, &s2); |
| 1381 | |
| 1382 | SubdivideForLength(s1, splines, tolerance); |
| 1383 | SubdivideForLength(s2, splines, tolerance); |
| 1384 | } |
| 1385 | } |
| 1386 | } |
| 1387 | |
| 1388 | void SL::SubdivideForLength(vector<Spline2>* splinesIn, float tolerance) |
no test coverage detected