| 1010 | // VTK expects big endian |
| 1011 | template<typename T> |
| 1012 | inline void swapByteOrder(T* v) |
| 1013 | { |
| 1014 | constexpr size_t n = sizeof(T); |
| 1015 | uint8_t* bytes = reinterpret_cast<uint8_t*>(v); |
| 1016 | for (unsigned int c = 0u; c < n / 2; c++) |
| 1017 | std::swap(bytes[c], bytes[n - c - 1]); |
| 1018 | } |
| 1019 | |
| 1020 | void exportVTK() |
| 1021 | { |