Browse Source

SceneGraph: fix building of certain SceneGraph APIs with doubles.

pull/491/head
Vladimír Vondruš 5 years ago
parent
commit
699002cfd5
  1. 6
      doc/changelog.dox
  2. 4
      src/Magnum/SceneGraph/MatrixTransformation2D.hpp
  3. 4
      src/Magnum/SceneGraph/MatrixTransformation3D.hpp
  4. 4
      src/Magnum/SceneGraph/RigidMatrixTransformation2D.hpp
  5. 4
      src/Magnum/SceneGraph/RigidMatrixTransformation3D.hpp

6
doc/changelog.dox

@ -273,6 +273,12 @@ See also:
- Fixed canvas size setup in @ref Platform::EmscriptenApplication to be the - Fixed canvas size setup in @ref Platform::EmscriptenApplication to be the
same in the @ref Platform::EmscriptenApplication::Configuration::WindowFlag::Contextless "Contextless" same in the @ref Platform::EmscriptenApplication::Configuration::WindowFlag::Contextless "Contextless"
case as for a WebGL-enabled context case as for a WebGL-enabled context
- @ref SceneGraph::BasicMatrixTransformation2D,
@ref SceneGraph::BasicMatrixTransformation3D,
@ref SceneGraph::BasicRigidMatrixTransformation2D and
@ref SceneGraph::BasicRigidMatrixTransformation3D were broken in the
@ref Magnum::Double "Double" variant. To prevent such cases from happening
in the future, the whole library is now tested for both floats and doubles.
@subsection changelog-latest-deprecated Deprecated APIs @subsection changelog-latest-deprecated Deprecated APIs

4
src/Magnum/SceneGraph/MatrixTransformation2D.hpp

@ -39,11 +39,11 @@ namespace Magnum { namespace SceneGraph {
/* These are here to avoid including Complex in MatrixTransformation2D.h */ /* These are here to avoid including Complex in MatrixTransformation2D.h */
template<class T> Object<BasicMatrixTransformation2D<T>>& BasicMatrixTransformation2D<T>::rotate(const Math::Complex<T>& complex) { template<class T> Object<BasicMatrixTransformation2D<T>>& BasicMatrixTransformation2D<T>::rotate(const Math::Complex<T>& complex) {
return transform(Matrix3::from(complex.toMatrix(), {})); return transform(Math::Matrix3<T>::from(complex.toMatrix(), {}));
} }
template<class T> Object<BasicMatrixTransformation2D<T>>& BasicMatrixTransformation2D<T>::rotateLocal(const Math::Complex<T>& complex) { template<class T> Object<BasicMatrixTransformation2D<T>>& BasicMatrixTransformation2D<T>::rotateLocal(const Math::Complex<T>& complex) {
return transformLocal(Matrix3::from(complex.toMatrix(), {})); return transformLocal(Math::Matrix3<T>::from(complex.toMatrix(), {}));
} }
}} }}

4
src/Magnum/SceneGraph/MatrixTransformation3D.hpp

@ -39,11 +39,11 @@ namespace Magnum { namespace SceneGraph {
/* These are here to avoid including Quaternion in MatrixTransformation3D.h */ /* These are here to avoid including Quaternion in MatrixTransformation3D.h */
template<class T> Object<BasicMatrixTransformation3D<T>>& BasicMatrixTransformation3D<T>::rotate(const Math::Quaternion<T>& quaternion) { template<class T> Object<BasicMatrixTransformation3D<T>>& BasicMatrixTransformation3D<T>::rotate(const Math::Quaternion<T>& quaternion) {
return transform(Matrix4::from(quaternion.toMatrix(), {})); return transform(Math::Matrix4<T>::from(quaternion.toMatrix(), {}));
} }
template<class T> Object<BasicMatrixTransformation3D<T>>& BasicMatrixTransformation3D<T>::rotateLocal(const Math::Quaternion<T>& quaternion) { template<class T> Object<BasicMatrixTransformation3D<T>>& BasicMatrixTransformation3D<T>::rotateLocal(const Math::Quaternion<T>& quaternion) {
return transformLocal(Matrix4::from(quaternion.toMatrix(), {})); return transformLocal(Math::Matrix4<T>::from(quaternion.toMatrix(), {}));
} }
}} }}

4
src/Magnum/SceneGraph/RigidMatrixTransformation2D.hpp

@ -39,11 +39,11 @@ namespace Magnum { namespace SceneGraph {
/* These are here to avoid including Complex in RigidMatrixTransformation2D.h */ /* These are here to avoid including Complex in RigidMatrixTransformation2D.h */
template<class T> Object<BasicRigidMatrixTransformation2D<T>>& BasicRigidMatrixTransformation2D<T>::rotate(const Math::Complex<T>& complex) { template<class T> Object<BasicRigidMatrixTransformation2D<T>>& BasicRigidMatrixTransformation2D<T>::rotate(const Math::Complex<T>& complex) {
return transform(Matrix3::from(complex.toMatrix(), {})); return transform(Math::Matrix3<T>::from(complex.toMatrix(), {}));
} }
template<class T> Object<BasicRigidMatrixTransformation2D<T>>& BasicRigidMatrixTransformation2D<T>::rotateLocal(const Math::Complex<T>& complex) { template<class T> Object<BasicRigidMatrixTransformation2D<T>>& BasicRigidMatrixTransformation2D<T>::rotateLocal(const Math::Complex<T>& complex) {
return transformLocal(Matrix3::from(complex.toMatrix(), {})); return transformLocal(Math::Matrix3<T>::from(complex.toMatrix(), {}));
} }
}} }}

4
src/Magnum/SceneGraph/RigidMatrixTransformation3D.hpp

@ -39,11 +39,11 @@ namespace Magnum { namespace SceneGraph {
/* These are here to avoid including Quaternion in the header */ /* These are here to avoid including Quaternion in the header */
template<class T> Object<BasicRigidMatrixTransformation3D<T>>& BasicRigidMatrixTransformation3D<T>::rotate(const Math::Quaternion<T>& quaternion) { template<class T> Object<BasicRigidMatrixTransformation3D<T>>& BasicRigidMatrixTransformation3D<T>::rotate(const Math::Quaternion<T>& quaternion) {
return transform(Matrix4::from(quaternion.toMatrix(), {})); return transform(Math::Matrix4<T>::from(quaternion.toMatrix(), {}));
} }
template<class T> Object<BasicRigidMatrixTransformation3D<T>>& BasicRigidMatrixTransformation3D<T>::rotateLocal(const Math::Quaternion<T>& quaternion) { template<class T> Object<BasicRigidMatrixTransformation3D<T>>& BasicRigidMatrixTransformation3D<T>::rotateLocal(const Math::Quaternion<T>& quaternion) {
return transformLocal(Matrix4::from(quaternion.toMatrix(), {})); return transformLocal(Math::Matrix4<T>::from(quaternion.toMatrix(), {}));
} }
}} }}

Loading…
Cancel
Save