diff --git a/src/MeshTools/CombineIndexedArrays.h b/src/MeshTools/CombineIndexedArrays.h index a5d229614..7e4299e60 100644 --- a/src/MeshTools/CombineIndexedArrays.h +++ b/src/MeshTools/CombineIndexedArrays.h @@ -92,7 +92,7 @@ class CombineIndexedArrays { /** @brief Combine indexed arrays @param[in,out] indexedArrays Index and attribute arrays -@return Array with resulting indices +@return %Array with resulting indices When you have e.g. vertex, normal and texture array, each indexed with different indices, you can use this function to combine them to use the same @@ -120,13 +120,11 @@ std::vector indices = MeshTools::combineIndexedArrays( `positions`, `normals` and `textureCoordinates` will then contain combined attributes indexed with `indices`. -@attention All index arrays should have the same size, otherwise zero-length - output is generated. - -@internal Implementation note: It's done using tuples because it is more clear - which parameter is index array and which is attribute array, mainly when - both are of the same type. +The function expects that all arrays have the same size. */ +/* Implementation note: It's done using tuples because it is more clear which + parameter is index array and which is attribute array, mainly when both are + of the same type. */ template std::vector combineIndexedArrays(const std::tuple&, std::vector&>&... indexedArrays) { return Implementation::CombineIndexedArrays()(indexedArrays...); } diff --git a/src/MeshTools/CompressIndices.h b/src/MeshTools/CompressIndices.h index 120e1bb04..6141465fb 100644 --- a/src/MeshTools/CompressIndices.h +++ b/src/MeshTools/CompressIndices.h @@ -41,15 +41,15 @@ sufficient. Size of the buffer can be computed from index count and type, as shown below. Example usage: @code std::size_t indexCount; -Type indexType; +IndexedMesh::IndexType indexType; char* data; std::tie(indexCount, indexType, data) = MeshTools::compressIndices(indices); -std::size_t dataSize = indexCount*TypeInfo::sizeOf(indexType); +std::size_t dataSize = indexCount*IndexedMesh::indexSize(indexType); // ... delete[] data; @endcode -See also compressIndices(IndexedMesh*, Buffer::Usage, const std::vector&), +See also compressIndices(IndexedMesh*, Buffer*, Buffer::Usage, const std::vector&), which writes the compressed data directly into index buffer of given mesh. */ std::tuple MAGNUM_MESHTOOLS_EXPORT compressIndices(const std::vector& indices);