Verified Commit 821711e2 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: add dedicated EigenToPyConverter

parent f29fb6d2
...@@ -108,6 +108,7 @@ SET(${PROJECT_NAME}_HEADERS ...@@ -108,6 +108,7 @@ SET(${PROJECT_NAME}_HEADERS
include/eigenpy/fwd.hpp include/eigenpy/fwd.hpp
include/eigenpy/eigen-allocator.hpp include/eigenpy/eigen-allocator.hpp
include/eigenpy/eigen-to-python.hpp include/eigenpy/eigen-to-python.hpp
include/eigenpy/eigen-from-python.hpp
include/eigenpy/map.hpp include/eigenpy/map.hpp
include/eigenpy/geometry.hpp include/eigenpy/geometry.hpp
include/eigenpy/geometry-conversion.hpp include/eigenpy/geometry-conversion.hpp
......
...@@ -304,6 +304,7 @@ namespace eigenpy ...@@ -304,6 +304,7 @@ namespace eigenpy
} }
}; };
#endif
template<typename MatType,typename EigenEquivalentType> template<typename MatType,typename EigenEquivalentType>
EIGENPY_DEPRECATED EIGENPY_DEPRECATED
...@@ -317,7 +318,7 @@ namespace eigenpy ...@@ -317,7 +318,7 @@ namespace eigenpy
{ {
if(check_registration<MatType>()) return; if(check_registration<MatType>()) return;
bp::to_python_converter<MatType,EigenToPy<MatType> >(); EigenToPyConverter<MatType>::registration();
EigenFromPyConverter<MatType>::registration(); EigenFromPyConverter<MatType>::registration();
} }
......
...@@ -47,6 +47,24 @@ namespace eigenpy ...@@ -47,6 +47,24 @@ namespace eigenpy
} }
}; };
template<typename MatType>
struct EigenToPyConverter
{
static void registration()
{
bp::to_python_converter<MatType,EigenToPy<MatType> >();
}
};
#if EIGEN_VERSION_AT_LEAST(3,2,0)
template<typename MatType>
struct EigenToPyConverter< eigenpy::Ref<MatType> >
{
static void registration()
{
}
};
#endif
} }
#endif // __eigenpy_eigen_to_python_hpp__ #endif // __eigenpy_eigen_to_python_hpp__
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment