Browse Source

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.
pull/284/head
Vladimír Vondruš 8 years ago
parent
commit
89ab8c43e0
  1. 32
      src/Magnum/MeshTools/Transform.h

32
src/Magnum/MeshTools/Transform.h

@ -55,23 +55,23 @@ Example usage:
@ref Quaternion::transformVectorNormalized() @ref Quaternion::transformVectorNormalized()
@todo GPU transform feedback implementation (otherwise this is only bad joke) @todo GPU transform feedback implementation (otherwise this is only bad joke)
*/ */
template<class T, class U> void transformVectorsInPlace(const Math::Quaternion<T>& normalizedQuaternion, U& vectors) { template<class T, class U> void transformVectorsInPlace(const Math::Matrix4<T>& matrix, U& vectors) {
for(auto& vector: vectors) vector = normalizedQuaternion.transformVectorNormalized(vector); for(auto& vector: vectors) vector = matrix.transformVector(vector);
} }
/** @overload */ /** @overload */
template<class T, class U> void transformVectorsInPlace(const Math::Complex<T>& complex, U& vectors) { template<class T, class U> void transformVectorsInPlace(const Math::Matrix3<T>& matrix, U& vectors) {
for(auto& vector: vectors) vector = complex.transformVector(vector); for(auto& vector: vectors) vector = matrix.transformVector(vector);
} }
/** @overload */ /** @overload */
template<class T, class U> void transformVectorsInPlace(const Math::Matrix3<T>& matrix, U& vectors) { template<class T, class U> void transformVectorsInPlace(const Math::Complex<T>& complex, U& vectors) {
for(auto& vector: vectors) vector = matrix.transformVector(vector); for(auto& vector: vectors) vector = complex.transformVector(vector);
} }
/** @overload */ /** @overload */
template<class T, class U> void transformVectorsInPlace(const Math::Matrix4<T>& matrix, U& vectors) { template<class T, class U> void transformVectorsInPlace(const Math::Quaternion<T>& normalizedQuaternion, U& vectors) {
for(auto& vector: vectors) vector = matrix.transformVector(vector); for(auto& vector: vectors) vector = normalizedQuaternion.transformVectorNormalized(vector);
} }
/** /**
@ -106,23 +106,23 @@ Example usage:
@ref Matrix4::transformPoint(), @ref Matrix4::transformPoint(),
@ref DualQuaternion::transformPointNormalized() @ref DualQuaternion::transformPointNormalized()
*/ */
template<class T, class U> void transformPointsInPlace(const Math::DualQuaternion<T>& normalizedDualQuaternion, U& points) { template<class T, class U> void transformPointsInPlace(const Math::Matrix4<T>& matrix, U& points) {
for(auto& point: points) point = normalizedDualQuaternion.transformPointNormalized(point); for(auto& point: points) point = matrix.transformPoint(point);
} }
/** @overload */ /** @overload */
template<class T, class U> void transformPointsInPlace(const Math::DualComplex<T>& dualComplex, U& points) { template<class T, class U> void transformPointsInPlace(const Math::Matrix3<T>& matrix, U& points) {
for(auto& point: points) point = dualComplex.transformPoint(point); for(auto& point: points) point = matrix.transformPoint(point);
} }
/** @overload */ /** @overload */
template<class T, class U> void transformPointsInPlace(const Math::Matrix3<T>& matrix, U& points) { template<class T, class U> void transformPointsInPlace(const Math::DualComplex<T>& dualComplex, U& points) {
for(auto& point: points) point = matrix.transformPoint(point); for(auto& point: points) point = dualComplex.transformPoint(point);
} }
/** @overload */ /** @overload */
template<class T, class U> void transformPointsInPlace(const Math::Matrix4<T>& matrix, U& points) { template<class T, class U> void transformPointsInPlace(const Math::DualQuaternion<T>& normalizedDualQuaternion, U& points) {
for(auto& point: points) point = matrix.transformPoint(point); for(auto& point: points) point = normalizedDualQuaternion.transformPointNormalized(point);
} }
/** /**

Loading…
Cancel
Save