| 848 | |
| 849 | #ifdef DEBUGTRACE |
| 850 | inline double ComputeLength(vtkIdList* poly, vtkPoints* pts) |
| 851 | { |
| 852 | int n = poly->GetNumberOfIds(); |
| 853 | if (n == 0) |
| 854 | return 0; |
| 855 | |
| 856 | double s(0); |
| 857 | double p[3]; |
| 858 | pts->GetPoint(poly->GetId(0), p); |
| 859 | for (int j = 1; j < n; j++) |
| 860 | { |
| 861 | int pIndex = poly->GetId(j); |
| 862 | double q[3]; |
| 863 | pts->GetPoint(pIndex, q); |
| 864 | s += sqrt(vtkMath::Distance2BetweenPoints(p, q)); |
| 865 | memcpy(p, q, 3 * sizeof(double)); |
| 866 | } |
| 867 | return s; |
| 868 | } |
| 869 | |
| 870 | inline void PrintNames(ostream& out, vtkPointData* a) |
| 871 | { |
no test coverage detected