5 #ifndef __pinocchio_python_fcl_transform_hpp__ 6 #define __pinocchio_python_fcl_transform_hpp__ 8 #include <boost/python.hpp> 10 #include "pinocchio/spatial/se3.hpp" 11 #include <hpp/fcl/math/transform.h> 13 namespace boost {
namespace python {
namespace converter {
15 template<
typename Scalar,
int Options>
18 typedef ::hpp::fcl::Transform3f
Source;
19 typedef ::pinocchio::SE3Tpl<Scalar,Options>
Target;
27 return implicit_rvalue_convertible_from_python(obj,
28 registered<Source>::converters)
32 static void construct(PyObject* obj, rvalue_from_python_stage1_data* data)
34 void* storage =
reinterpret_cast<rvalue_from_python_storage<Target>*
> 35 (
reinterpret_cast<void*
>(data))->storage.bytes;
37 arg_from_python<Source> get_source(obj);
38 bool convertible = get_source.convertible();
39 BOOST_VERIFY(convertible);
41 const Source &
t = get_source();
42 new (storage) Target(t.getRotation(),t.getTranslation());
45 data->convertible = storage;
49 template<
typename Scalar,
int Options>
52 typedef ::pinocchio::SE3Tpl<Scalar,Options>
Source;
53 typedef ::hpp::fcl::Transform3f
Target;
61 return implicit_rvalue_convertible_from_python(obj,
62 registered<Source>::converters)
66 static void construct(PyObject* obj, rvalue_from_python_stage1_data* data)
68 void* storage =
reinterpret_cast<rvalue_from_python_storage<Target>*
> 69 (
reinterpret_cast<void*
>(data))->storage.bytes;
71 arg_from_python<Source> get_source(obj);
72 bool convertible = get_source.convertible();
73 BOOST_VERIFY(convertible);
75 const Source &
M = get_source();
79 data->convertible = storage;
85 #endif // ifndef __pinocchio_python_fcl_transform_hpp__
static void construct(PyObject *obj, rvalue_from_python_stage1_data *data)
ConstLinearRef translation() const
::pinocchio::SE3Tpl< Scalar, Options > Source
static void * convertible(PyObject *obj)
ConstAngularRef rotation() const
::hpp::fcl::Transform3f Target