|
|
|
|
@ -60,6 +60,10 @@ std::pair<std::vector<UnsignedInt>, std::vector<UnsignedInt>> interleaveAndCombi
|
|
|
|
|
return {combinedIndices, interleavedArrays}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
namespace { |
|
|
|
|
|
|
|
|
|
std::vector<UnsignedInt> combineIndexArrays(const std::reference_wrapper<std::vector<UnsignedInt>>* const begin, const std::reference_wrapper<std::vector<UnsignedInt>>* const end) { |
|
|
|
|
/* Interleave and combine the arrays */ |
|
|
|
|
std::vector<UnsignedInt> combinedIndices; |
|
|
|
|
@ -83,10 +87,6 @@ std::vector<UnsignedInt> combineIndexArrays(const std::reference_wrapper<std::ve
|
|
|
|
|
return combinedIndices; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
namespace { |
|
|
|
|
|
|
|
|
|
class IndexHash { |
|
|
|
|
public: |
|
|
|
|
explicit IndexHash(const std::vector<UnsignedInt>& indices, UnsignedInt stride): indices(indices), stride(stride) {} |
|
|
|
|
@ -115,6 +115,14 @@ class IndexEqual {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
std::vector<UnsignedInt> combineIndexArrays(const std::vector<std::reference_wrapper<std::vector<UnsignedInt>>>& arrays) { |
|
|
|
|
return combineIndexArrays(&arrays[0], &arrays[0] + arrays.size()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
std::vector<UnsignedInt> combineIndexArrays(std::initializer_list<std::reference_wrapper<std::vector<UnsignedInt>>> arrays) { |
|
|
|
|
return combineIndexArrays(arrays.begin(), arrays.end()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
std::pair<std::vector<UnsignedInt>, std::vector<UnsignedInt>> combineIndexArrays(const std::vector<UnsignedInt>& interleavedArrays, const UnsignedInt stride) { |
|
|
|
|
CORRADE_ASSERT(stride != 0, "MeshTools::combineIndexArrays(): stride can't be zero", {}); |
|
|
|
|
CORRADE_ASSERT(interleavedArrays.size() % stride == 0, "MeshTools::combineIndexArrays(): array size is not divisible by stride", {}); |
|
|
|
|
|