5#ifndef __pinocchio_python_collision_geometry_functors_hpp__
6#define __pinocchio_python_collision_geometry_functors_hpp__
8#include "pinocchio/bindings/python/utils/registration.hpp"
10#include "pinocchio/multibody/geometry.hpp"
16 namespace bp = boost::python;
18 template<
typename GeometryFunctor>
19 struct GeometryFunctorPythonVisitor
20 :
public boost::python::def_visitor<GeometryFunctorPythonVisitor<GeometryFunctor>>
23 template<
class PyClass>
24 void visit(PyClass & cl)
const
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()))
32 "run", &GeometryFunctor::run, bp::args(
"self",
"tf1",
"tf2",
"request",
"result"),
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;
Main pinocchio namespace.