23 std::vector<u64> keys;
24 keys.reserve(indices.size());
25 for (
usize t = 0; t + 2 < indices.size(); t += 3) {
26 for (
u32 k = 0; k < 3; ++k) {
27 const u32 a = indices[t + k], b = indices[t + (k + 1) % 3];
28 keys.push_back((
static_cast<u64>(std::min(a, b)) << 32) | std::max(a, b));
31 std::sort(keys.begin(), keys.end());
32 keys.erase(std::unique(keys.begin(), keys.end()), keys.end());
33 std::vector<u32> lines;
34 lines.reserve(keys.size() * 2);
35 for (
const u64 key : keys) {
36 lines.push_back(
static_cast<u32>(key >> 32));
37 lines.push_back(
static_cast<u32>(key & 0xFFFFFFFFu));
std::vector< u32 > distinctMeshEdges(ConstSpan< u32 > indices)
Index pairs, one per distinct edge, in ascending order of (low, high) vertex.