5 #ifndef __pinocchio_python_collision_pool_broadphase_manager_hpp__
6 #define __pinocchio_python_collision_pool_broadphase_manager_hpp__
12 #include <boost/python/overloads.hpp>
13 #include <boost/algorithm/string/replace.hpp>
29 template<
typename BroadPhaseManager>
32 static std::string
get();
35 template<
typename Manager>
38 static std::string
get()
40 return "BroadPhaseManager";
44 template<
typename Manager>
47 static std::string
get()
49 return "TreeBroadPhaseManager";
54 template<
typename BroadPhaseManagerPool>
56 :
public bp::def_visitor<BroadPhaseManagerPoolPythonVisitor<BroadPhaseManagerPool>>
65 typedef typename BroadPhaseManager::Manager
Manager;
68 template<
class PyClass>
72 bp::args(
"self",
"model",
"geometry_model",
"size"),
"Default constructor."))
74 bp::init<const BroadPhaseManagerPool &>(bp::args(
"self",
"other"),
"Copy constructor."))
77 "getBroadPhaseManager",
80 bp::args(
"self",
"index"),
"Return a specific broadphase manager.",
81 bp::return_internal_reference<>())
83 "getBroadPhaseManagers",
86 bp::arg(
"self"),
"Returns the vector of broadphase managers.",
87 bp::return_internal_reference<>())
92 bp::args(
"self",
"geometry_data"),
93 "Update all the geometry datas with the input geometry data value.")
97 "Check whether the current pool is valid.")
100 "asGeometryPool",
downcast, bp::arg(
"self"),
101 "Cast the object as GeometryPool (equivalent to a C++ static_cast).",
102 bp::return_self<>());
107 bp::type_info
type = bp::type_id<Base>();
108 const bp::converter::registration * registration = bp::converter::registry::query(
type);
110 return registration->to_python(
static_cast<Base *
>(&
self));
115 std::string manager_name = boost::typeindex::type_id<Manager>().pretty_name();
116 boost::algorithm::replace_all(manager_name,
"hpp::fcl::",
"");
118 const std::string class_name = broadphase_prefix +
"Pool" +
"_" + manager_name;
120 const std::string doc =
"Pool containing a bunch of " + broadphase_prefix +
".";
122 bp::class_<BroadPhaseManagerPool, bp::bases<Base>>(
123 class_name.c_str(), doc.c_str(), bp::no_init)
127 const std::string vector_name =
"StdVec_" + broadphase_prefix +
"_" + manager_name;
134 #endif // ifnded __pinocchio_python_collision_pool_broadphase_manager_hpp__