file new in 2019.10
Integration.hConversion of Eigen array and matrix types.
Math type conversion
Provides conversion for the following fixed-size types. See Magnum/
Magnum vector type | Equivalent Eigen type |
---|---|
Math:: | Eigen:: |
Math:: | Eigen:: |
Math:: | Eigen:: |
Magnum matrix type | Equivalent Eigen type |
---|---|
Math:: | Eigen:: |
Math:: | Eigen:: |
Eigen::Array
and Eigen::Matrix
classes provide a std::operator<<
overload, which means they're directly usable with Corrade::
#include <Magnum/EigenIntegration/Integration.h> … Eigen::Vector3f a{1.0f, 2.0f, 3.0f}; Vector3 b(a); auto c = Matrix3::rotation(35.0_degf); // It's not possible to convert using Eigen::Matrix3f(c) auto d = EigenIntegration::cast<Eigen::Matrix3f>(c); Debug{} << Eigen::Array3i{1, 42, -3}; // prints 1 // 42 // -3
Namespaces
- namespace Magnum
- Root namespace.
- namespace Magnum::Math
- Math library.
- namespace Magnum::EigenIntegration new in 2019.10
- Integration with Eigen.
Functions
-
template<class To, std::auto cast(const Math::RectangularMatrix<cols, rows, T>& from) -> To new in 2019.10
size_t cols, std:: size_t rows, class T> - Convert a Magnum type to Eigen type.
-
template<class To, std::auto cast(const Math::BitVector<size>& from) -> To new in 2019.10
size_t size> -
template<class To, std::auto cast(const Math::Vector<size, T>& from) -> To new in 2019.10
size_t size, class T>