From 89ab8c43e0634f675cf535b9bbd2577e8fe197b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 6 Sep 2018 14:06:16 +0200 Subject: [PATCH] MeshTools: why put docs for transform() to an obscure dualquat overload? The type is not even usable for scaling. Putting the docs to the Matrix4 overload instead. Thanks to @uzername for pointing this out. --- src/Magnum/MeshTools/Transform.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Magnum/MeshTools/Transform.h b/src/Magnum/MeshTools/Transform.h index 9f748146e..aeaf06acf 100644 --- a/src/Magnum/MeshTools/Transform.h +++ b/src/Magnum/MeshTools/Transform.h @@ -55,23 +55,23 @@ Example usage: @ref Quaternion::transformVectorNormalized() @todo GPU transform feedback implementation (otherwise this is only bad joke) */ -template void transformVectorsInPlace(const Math::Quaternion& normalizedQuaternion, U& vectors) { - for(auto& vector: vectors) vector = normalizedQuaternion.transformVectorNormalized(vector); +template void transformVectorsInPlace(const Math::Matrix4& matrix, U& vectors) { + for(auto& vector: vectors) vector = matrix.transformVector(vector); } /** @overload */ -template void transformVectorsInPlace(const Math::Complex& complex, U& vectors) { - for(auto& vector: vectors) vector = complex.transformVector(vector); +template void transformVectorsInPlace(const Math::Matrix3& matrix, U& vectors) { + for(auto& vector: vectors) vector = matrix.transformVector(vector); } /** @overload */ -template void transformVectorsInPlace(const Math::Matrix3& matrix, U& vectors) { - for(auto& vector: vectors) vector = matrix.transformVector(vector); +template void transformVectorsInPlace(const Math::Complex& complex, U& vectors) { + for(auto& vector: vectors) vector = complex.transformVector(vector); } /** @overload */ -template void transformVectorsInPlace(const Math::Matrix4& matrix, U& vectors) { - for(auto& vector: vectors) vector = matrix.transformVector(vector); +template void transformVectorsInPlace(const Math::Quaternion& normalizedQuaternion, U& vectors) { + for(auto& vector: vectors) vector = normalizedQuaternion.transformVectorNormalized(vector); } /** @@ -106,23 +106,23 @@ Example usage: @ref Matrix4::transformPoint(), @ref DualQuaternion::transformPointNormalized() */ -template void transformPointsInPlace(const Math::DualQuaternion& normalizedDualQuaternion, U& points) { - for(auto& point: points) point = normalizedDualQuaternion.transformPointNormalized(point); +template void transformPointsInPlace(const Math::Matrix4& matrix, U& points) { + for(auto& point: points) point = matrix.transformPoint(point); } /** @overload */ -template void transformPointsInPlace(const Math::DualComplex& dualComplex, U& points) { - for(auto& point: points) point = dualComplex.transformPoint(point); +template void transformPointsInPlace(const Math::Matrix3& matrix, U& points) { + for(auto& point: points) point = matrix.transformPoint(point); } /** @overload */ -template void transformPointsInPlace(const Math::Matrix3& matrix, U& points) { - for(auto& point: points) point = matrix.transformPoint(point); +template void transformPointsInPlace(const Math::DualComplex& dualComplex, U& points) { + for(auto& point: points) point = dualComplex.transformPoint(point); } /** @overload */ -template void transformPointsInPlace(const Math::Matrix4& matrix, U& points) { - for(auto& point: points) point = matrix.transformPoint(point); +template void transformPointsInPlace(const Math::DualQuaternion& normalizedDualQuaternion, U& points) { + for(auto& point: points) point = normalizedDualQuaternion.transformPointNormalized(point); } /**