diff --git a/src/Magnum/MeshTools/FlipNormals.h b/src/Magnum/MeshTools/FlipNormals.h index c54041c57..3a5ca49e2 100644 --- a/src/Magnum/MeshTools/FlipNormals.h +++ b/src/Magnum/MeshTools/FlipNormals.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::MeshTools::flipNormals() + * @brief Function @ref Magnum::MeshTools::flipFaceWinding(), @ref Magnum::MeshTools::flipNormals() */ #include @@ -38,16 +38,21 @@ namespace Magnum { namespace MeshTools { /** @brief Flip face winding +@param[in,out] indices Index array to operate on -The same as flipNormals(std::vector&, std::vector&), +The same as @ref flipNormals(std::vector&, std::vector&), but flips only face winding. + +@attention The function requires the mesh to have triangle faces, thus index + count must be divisible by 3. */ void MAGNUM_MESHTOOLS_EXPORT flipFaceWinding(std::vector& indices); /** @brief Flip mesh normals +@param[in,out] normals Normal array to operate on -The same as flipNormals(std::vector&, std::vector&), +The same as @ref flipNormals(std::vector&, std::vector&), but flips only normals, not face winding. */ void MAGNUM_MESHTOOLS_EXPORT flipNormals(std::vector& normals); @@ -58,8 +63,8 @@ void MAGNUM_MESHTOOLS_EXPORT flipNormals(std::vector& normals); @param[in,out] normals Normal array to operate on Flips normal vectors and face winding in index array for face culling to work -properly too. See also flipNormals(std::vector&) and -flipFaceWinding(), which flip normals or face winding only. +properly too. See also @ref flipNormals(std::vector&) and +@ref flipFaceWinding(), which flip normals or face winding only. @attention The function requires the mesh to have triangle faces, thus index count must be divisible by 3. diff --git a/src/Magnum/MeshTools/GenerateFlatNormals.h b/src/Magnum/MeshTools/GenerateFlatNormals.h index 0690d3ae2..32d89279c 100644 --- a/src/Magnum/MeshTools/GenerateFlatNormals.h +++ b/src/Magnum/MeshTools/GenerateFlatNormals.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::MeshTools::generateFlatNormals() + * @brief Function @ref Magnum::MeshTools::generateFlatNormals() */ #include @@ -53,11 +53,11 @@ std::vector normalIndices; std::vector normals; std::tie(normalIndices, normals) = MeshTools::generateFlatNormals(vertexIndices, positions); @endcode -You can then use combineIndexedArrays() to combine normal and vertex array to -use the same indices. +You can then use @ref combineIndexedArrays() to combine normal and vertex array +to use the same indices. -@attention Index count must be divisible by 3, otherwise zero length result - is generated. +@attention The function requires the mesh to have triangle faces, thus index + count must be divisible by 3. */ std::tuple, std::vector> MAGNUM_MESHTOOLS_EXPORT generateFlatNormals(const std::vector& indices, const std::vector& positions); diff --git a/src/Magnum/MeshTools/Subdivide.h b/src/Magnum/MeshTools/Subdivide.h index 49f1a690a..2f19c09b3 100644 --- a/src/Magnum/MeshTools/Subdivide.h +++ b/src/Magnum/MeshTools/Subdivide.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::MeshTools::subdivide() + * @brief Function @ref Magnum::MeshTools::subdivide() */ #include diff --git a/src/Magnum/MeshTools/Tipsify.h b/src/Magnum/MeshTools/Tipsify.h index e66d3b2d3..84476b9b1 100644 --- a/src/Magnum/MeshTools/Tipsify.h +++ b/src/Magnum/MeshTools/Tipsify.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::MeshTools::tipsify() + * @brief Function @ref Magnum::MeshTools::tipsify() */ #include diff --git a/src/Magnum/MeshTools/Transform.h b/src/Magnum/MeshTools/Transform.h index 5c124825c..89a4929a7 100644 --- a/src/Magnum/MeshTools/Transform.h +++ b/src/Magnum/MeshTools/Transform.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::MeshTools::transformVectorsInPlace(), Magnum::MeshTools::transformVectors(), Magnum::MeshTools::transformPointsInPlace(), Magnum::MeshTools::transformPoints() + * @brief Function @ref Magnum::MeshTools::transformVectorsInPlace(), @ref Magnum::MeshTools::transformVectors(), @ref Magnum::MeshTools::transformPointsInPlace(), @ref Magnum::MeshTools::transformPoints() */ #include "Magnum/Math/DualQuaternion.h" @@ -43,7 +43,7 @@ with compatible vector type as @p vectors. Expects that @ref Math::Quaternion "Q is normalized, no further requirements are for other transformation representations. -Unlike in transformPointsInPlace(), the transformation does not involve +Unlike in @ref transformPointsInPlace(), the transformation does not involve translation. Example usage: @@ -53,8 +53,9 @@ auto transformation = Quaternion::rotation(35.0_degf, Vector3::yAxis()); MeshTools::transformVectorsInPlace(rotation, vectors); @endcode -@see transformVectors(), Matrix3::transformVector(), Matrix4::transformVector(), - Complex::transformVectorNormalized(), Quaternion::transformVectorNormalized() +@see @ref transformVectors(), @ref Matrix3::transformVector(), + @ref Matrix4::transformVector(), @ref Complex::transformVector(), + @ref Quaternion::transformVectorNormalized() @todo GPU transform feedback implementation (otherwise this is only bad joke) */ template void transformVectorsInPlace(const Math::Quaternion& normalizedQuaternion, U& vectors) { @@ -80,7 +81,7 @@ template void transformVectorsInPlace(const Math::Matrix4& @brief Transform vectors using given transformation Returns transformed vectors instead of modifying them in-place. See -transformVectorsInPlace() for more information. +@ref transformVectorsInPlace() for more information. */ template U transformVectors(const T& transformation, U vectors) { U result(std::move(vectors)); @@ -97,7 +98,7 @@ with compatible vector type as @p vectors. Expects that @ref Math::DualQuaternion "DualQuaternion" is normalized, no further requirements are for other transformation representations. -Unlike in transformVectorsInPlace(), the transformation also involves +Unlike in @ref transformVectorsInPlace(), the transformation also involves translation. Example usage: @@ -108,8 +109,9 @@ auto transformation = DualQuaternion::rotation(35.0_degf, Vector3::yAxis())* MeshTools::transformPointsInPlace(rotation, points); @endcode -@see transformPoints(), Matrix3::transformPoint(), Matrix4::transformPoint(), - DualQuaternion::transformPointNormalized() +@see @ref transformPoints(), @ref Matrix3::transformPoint(), + @ref Matrix4::transformPoint(), + @ref DualQuaternion::transformPointNormalized() */ template void transformPointsInPlace(const Math::DualQuaternion& normalizedDualQuaternion, U& points) { for(auto& point: points) point = normalizedDualQuaternion.transformPointNormalized(point); @@ -134,7 +136,7 @@ template void transformPointsInPlace(const Math::Matrix4& m @brief Transform points using given transformation Returns transformed points instead of modifying them in-place. See -transformPointsInPlace() for more information. +@ref transformPointsInPlace() for more information. */ template U transformPoints(const T& transformation, U vectors) { U result(std::move(vectors));