| 1097 | // VTK expects big endian |
| 1098 | template<typename T> |
| 1099 | inline void swapByteOrder(T* v) |
| 1100 | { |
| 1101 | constexpr size_t n = sizeof(T); |
| 1102 | uint8_t* bytes = reinterpret_cast<uint8_t*>(v); |
| 1103 | for (unsigned int c = 0u; c < n / 2; c++) |
| 1104 | std::swap(bytes[c], bytes[n - c - 1]); |
| 1105 | } |
| 1106 | |
| 1107 | void writeParticlesVTK(const std::string& fileName, const unsigned int numParticles, const Vector3r* particlePositions) |
| 1108 | { |
no test coverage detected