21 :
public bp::def_visitor<BroadPhaseManagerPythonVisitor<Derived>>
24 typedef BroadPhaseManagerTpl<Derived> Self;
25 typedef typename Self::CollisionObjectVector CollisionObjectVector;
28 template<
class PyClass>
29 void visit(PyClass & cl)
const 32 bp::init<const Model *, const GeometryModel *, GeometryData *>(
33 bp::args(
"self",
"model",
"geometry_model",
"geometry_data"),
"Default constructor")
34 [bp::with_custodian_and_ward<1, 2>(), bp::with_custodian_and_ward<1, 3>(),
35 bp::with_custodian_and_ward<1, 4>()])
37 bp::init<const Self &>(
38 bp::args(
"self",
"other"),
"Copy constructor")[bp::with_custodian_and_ward<1, 2>()])
41 "getCollisionObjectInflation", &Self::getCollisionObjectInflation, bp::arg(
"self"),
42 "Returns the inflation value related to each collision object.",
43 bp::return_internal_reference<>())
45 "getCollisionObjects",
46 (CollisionObjectVector & (Self::*)()) & Self::getCollisionObjects, bp::arg(
"self"),
47 bp::return_internal_reference<>())
50 "getManager", (Derived & (Self::*)()) & Self::getManager, bp::arg(
"self"),
51 "Returns the internal coal manager", bp::return_internal_reference<>())
54 "getCollisionObjectStatus", &Self::getCollisionObjectStatus, bp::arg(
"self"),
55 "Returns the status of the collision object.",
56 bp::return_value_policy<bp::copy_const_reference>())
64 std::string derived_name = boost::typeindex::type_id<Derived>().pretty_name();
65 boost::algorithm::replace_all(derived_name,
"coal::",
"");
66 const std::string class_name =
"BroadPhaseManager_" + derived_name;
68 const std::string class_doc =
"Broad phase manager associated to coal::" + derived_name;
69 bp::class_<Self> registered_class(class_name.c_str(), class_doc.c_str(), bp::no_init);
73 bp::objects::register_dynamic_id<Base>();
74 bp::objects::register_conversion<Self, Base>(
false);