Magnum/EigenIntegration/GeometryIntegration.h file

Conversion of Eigen geometry types.

Contents

Provides conversion for the following types. See Magnum/EigenIntegration/Integration.h for conversion of basic matrix and vector 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>

Example usage:

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
Integration with Eigen.

Functions

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