returns [start, end].
| 50 | |
| 51 | // returns [start, end]. |
| 52 | std::pair<int, int> GetRange(int rank, const std::vector<int>& counts) |
| 53 | { |
| 54 | std::pair<int, int> result(0, counts[0]); |
| 55 | if (rank == 0) |
| 56 | { |
| 57 | return result; |
| 58 | } |
| 59 | for (int cc = 1; cc <= rank; ++cc) |
| 60 | { |
| 61 | result.first = result.second; |
| 62 | result.second += counts[cc]; |
| 63 | } |
| 64 | return result; |
| 65 | } |
| 66 | |
| 67 | template <typename ArrayType> |
| 68 | void OffsetPoints(ArrayType* array, const vtkVector3d& delta) |