Magnum/EigenIntegration/GeometryIntegration.h file new in 2019.10

Conversion of Eigen geometry types.

Provides conversion for the following types. See Magnum/EigenIntegration/Integration.h for conversion of basic matrix and vector types and Magnum/EigenIntegration/DynamicMatrixIntegration.h for conversion of dynamically sized matrix types.

Magnum typeEquivalent Eigen type
Math::Vector<size, T>Eigen::Translation<T, size>
Math::Quaternion<T>Eigen::Quaternion<T>
Math::Matrix3x2<T>Eigen::Transform<T, 2, AffineCompact>
Math::Matrix3<T>Eigen::Transform<T, 2, Affine>,
Eigen::Transform<T, 2, Projective>,
Eigen::Transform<T, 2, Isometry>
Math::Matrix4x3<T>Eigen::Transform<T, 3, AffineCompact>
Math::Matrix4<T>Eigen::Transform<T, 3, Affine>,
Eigen::Transform<T, 3, Projective>,
Eigen::Transform<T, 3, Isometry>
Math::Range<dimensions,T>Eigen::AlignedBox<T, dimensions>

Example usage:

#include <Magnum/EigenIntegration/GeometryIntegration.h>



auto a = Matrix3::translation({-1.5f, 0.3f})*
         Matrix3::rotation(25.0_degf)*
         Matrix3::scaling({1.23f, 2.0f});
auto b = Eigen::Affine2f(a);

auto c = Matrix4d(Eigen::Isometry3d::Identity());

Namespaces

namespace Magnum
Root namespace.
namespace Magnum::Math
Math library.
namespace Magnum::EigenIntegration new in 2019.10
Integration with Eigen.

Functions

template<class To, class T>
auto cast(const Math::Quaternion<T>& from) -> To new in 2019.10
Convert a Magnum type to Eigen type.