7#include "pinocchio/spatial.hpp" 8#include <coal/math/transform.h> 17 template<
typename Scalar,
int Options>
18 struct implicit<::coal::Transform3s, ::pinocchio::SE3Tpl<Scalar, Options>>
20 typedef ::coal::Transform3s Source;
21 typedef ::pinocchio::SE3Tpl<Scalar, Options> Target;
23 static void * convertible(PyObject * obj)
29 return implicit_rvalue_convertible_from_python(obj, registered<Source>::converters) ? obj
33 static void construct(PyObject * obj, rvalue_from_python_stage1_data * data)
36 reinterpret_cast<rvalue_from_python_storage<Target> *
>(
reinterpret_cast<void *
>(data))
39 arg_from_python<Source> get_source(obj);
40 bool convertible = get_source.convertible();
41 BOOST_VERIFY(convertible);
43 const Source & t = get_source();
44 new (storage) Target(t.getRotation(), t.getTranslation());
47 data->convertible = storage;
51 template<
typename Scalar,
int Options>
52 struct implicit<::pinocchio::SE3Tpl<Scalar, Options>, ::coal::Transform3s>
54 typedef ::pinocchio::SE3Tpl<Scalar, Options> Source;
55 typedef ::coal::Transform3s Target;
57 static void * convertible(PyObject * obj)
63 return implicit_rvalue_convertible_from_python(obj, registered<Source>::converters) ? obj
67 static void construct(PyObject * obj, rvalue_from_python_stage1_data * data)
70 reinterpret_cast<rvalue_from_python_storage<Target> *
>(
reinterpret_cast<void *
>(data))
73 arg_from_python<Source> get_source(obj);
74 bool convertible = get_source.convertible();
75 BOOST_VERIFY(convertible);
77 const Source & M = get_source();
78 new (storage) Target(M.rotation(), M.translation());
81 data->convertible = storage;