5#ifndef __pinocchio_python_collision_broadphase_manager_base_hpp__ 6#define __pinocchio_python_collision_broadphase_manager_base_hpp__ 8#include "pinocchio/collision/broadphase-manager-base.hpp" 10#include <eigenpy/eigen-to-python.hpp> 16 namespace bp = boost::python;
18 template<
typename Derived>
19 struct BroadPhaseManagerBasePythonVisitor
20 :
public bp::def_visitor<BroadPhaseManagerBasePythonVisitor<Derived>>
24 typedef typename Derived::GeometryModel GeometryModel;
25 typedef typename Derived::Model Model;
27 static Model & getModel(
const Self & self)
29 return const_cast<Model &
>(self.getModel());
32 static GeometryModel & getGeometryModel(
const Self & self)
34 return const_cast<GeometryModel &
>(self.getGeometryModel());
38 template<
class PyClass>
39 void visit(PyClass & cl)
const 43 "getModel", getModel, bp::arg(
"self"),
"Returns the related model.",
44 bp::return_internal_reference<>())
46 "getGeometryModel", getGeometryModel, bp::arg(
"self"),
47 "Returns the related geometry model.", bp::return_internal_reference<>())
49 "getGeometryData", (GeometryData & (Self::*)()) & Self::getGeometryData,
50 bp::arg(
"self"),
"Returns the related geometry data.",
51 bp::return_internal_reference<>())
54 "check", (
bool(Self::*)()
const) & Self::check, bp::arg(
"self"),
55 "Check whether the base broad phase manager is aligned with the current " 58 "check", (
bool(Self::*)(CollisionCallBackBase *)
const) & Self::check,
59 bp::args(
"self",
"callback"),
"Check whether the callback is inline with *this.")
62 "update", (
void(Self::*)(
const bool)) & Self::update,
63 (bp::arg(
"self"), bp::arg(
"compute_local_aabb") =
false),
64 "Update the manager from the current geometry positions and update the underlying " 65 "FCL broad phase manager.")
67 "update", (
void(Self::*)(GeometryData * geom_data_new)) & Self::update,
68 (bp::arg(
"self"), bp::arg(
"geom_data_new")),
69 "Update the manager with a new geometry data.", bp::with_custodian_and_ward<1, 2>())
73 (
bool(Self::*)(CollisionObject &, CollisionCallBackBase *)
const) & Self::collide,
74 bp::args(
"self",
"collision_object",
"callback"),
75 "Performs collision test between one object and all the objects belonging to the " 78 "collide", (
bool(Self::*)(CollisionCallBackBase *)
const) & Self::collide,
79 bp::args(
"self",
"callback"),
80 "Performs collision test for the objects belonging to the manager.")
82 "collide", (
bool(Self::*)(Self &, CollisionCallBackBase *)
const) & Self::collide,
83 bp::args(
"self",
"other_manager",
"callback"),
84 "Performs collision test with objects belonging to another manager.");
Main pinocchio namespace.