5 #ifndef __pinocchio_python_collision_geometry_functors_hpp__
6 #define __pinocchio_python_collision_geometry_functors_hpp__
18 template<
typename GeometryFunctor>
20 :
public boost::python::def_visitor<GeometryFunctorPythonVisitor<GeometryFunctor>>
23 template<
class PyClass>
26 const std::string class_name = bp::type_id<GeometryFunctor>().name();
28 cl.def(bp::init<const GeometryObject &, const GeometryObject &>(
29 bp::args(
"self",
"geometry_object1",
"geometry_object2"),
30 (std::string(
"Constructor of a ") + class_name).c_str()))
33 "Call the function and return the result")
36 "getGeometryObject1", &GeometryFunctor::getGeometryObject1,
37 bp::return_value_policy<bp::copy_const_reference>())
39 "getGeometryObject2", &GeometryFunctor::getGeometryObject2,
40 bp::return_value_policy<bp::copy_const_reference>())
42 .def(
"print", &
print);
45 static void print(
const GeometryFunctor &
self)
47 std::cout <<
"address #1: " << &
self.getGeometryObject1() << std::endl;
48 std::cout <<
"address #2: " << &
self.getGeometryObject2() << std::endl;
55 #endif // ifndef __pinocchio_python_collision_geometry_functors_hpp__