| 24 | #include <iostream> |
| 25 | |
| 26 | inline double ComputeLength(vtkIdList* poly, vtkPoints* pts) |
| 27 | { |
| 28 | int n = poly->GetNumberOfIds(); |
| 29 | if (n == 0) |
| 30 | return 0; |
| 31 | |
| 32 | double s(0); |
| 33 | double p[3]; |
| 34 | pts->GetPoint(poly->GetId(0), p); |
| 35 | for (int j = 1; j < n; j++) |
| 36 | { |
| 37 | int pIndex = poly->GetId(j); |
| 38 | double q[3]; |
| 39 | pts->GetPoint(pIndex, q); |
| 40 | s += sqrt(vtkMath::Distance2BetweenPoints(p, q)); |
| 41 | memcpy(p, q, 3 * sizeof(double)); |
| 42 | } |
| 43 | return s; |
| 44 | } |
| 45 | |
| 46 | class TestAMRVectorSource : public vtkOverlappingAMRAlgorithm |
| 47 | { |
no test coverage detected