5 #ifndef __pinocchio_python_multibody_pool_geometry_hpp__ 6 #define __pinocchio_python_multibody_pool_geometry_hpp__ 10 #include "pinocchio/multibody/pool/geometry.hpp" 12 #include <boost/python/overloads.hpp> 16 #include "pinocchio/algorithm/check.hpp" 28 template<
typename GeometryPool>
30 :
public bp::def_visitor< GeometryPoolPythonVisitor<GeometryPool> >
33 typedef typename GeometryPool::Base
Base;
40 template<
class PyClass>
44 .def(bp::init<Model,GeometryModel,bp::optional<int> >(
bp::args(
"self",
"model",
"geometry_model",
"size"),
45 "Default constructor."))
46 .def(bp::init<GeometryPool>(
bp::args(
"self",
"other"),
49 .def(
"geometry_model",(GeometryModel & (
GeometryPool::*)())&GeometryPool::geometry_model,
50 bp::arg(
"self"),
"Geometry model contained in the pool.",
51 bp::return_internal_reference<>())
52 .def(
"geometry_data",(GeometryData & (
GeometryPool::*)(
const size_t))&GeometryPool::geometry_data,
53 bp::args(
"self",
"index"),
"Return a specific geometry_data data.",
54 bp::return_internal_reference<>())
55 .def(
"geometry_datas",(GeometryDataVector & (
GeometryPool::*)())&GeometryPool::geometry_datas,
56 bp::arg(
"self"),
"Returns the geometry data vector.",
57 bp::return_internal_reference<>())
59 .def(
"update",(
void (
GeometryPool::*)(
const GeometryModel &))&GeometryPool::update,
61 "Update the geometry model, meaning that all the datas will be refreshed accordingly.")
62 .def(
"update",(
void (
GeometryPool::*)(
const GeometryData &))&GeometryPool::update,
63 bp::args(
"self",
"geometry_data"),
"Update all the geometry datas with the input geometry data value.")
64 .def(
"update",(
void (
GeometryPool::*)(
const GeometryModel &,
const GeometryData &))&GeometryPool::update,
65 bp::args(
"self",
"geometry_model",
"geometry_data"),
66 "Update the geometry model and data together.")
73 bp::class_<GeometryPool,bp::bases<Base> >(
"GeometryPool",
74 "Pool containing a model + a geometry_model and several datas for parallel computations",
86 #endif // ifnded __pinocchio_python_multibody_pool_geometry_hpp__ GeometryPool::GeometryModel GeometryModel
GeometryPool::GeometryData GeometryData
Expose an std::vector from a type given as template argument.
std::vector< GeometryData, Eigen::aligned_allocator< GeometryData > > GeometryDataVector
GeometryPool::Model Model
Add the Python method copy to allow a copy of this by calling the copy constructor.
Main pinocchio namespace.
GeometryPool::GeometryDataVector GeometryDataVector
void visit(PyClass &cl) const
#define EIGENPY_DEFINE_STRUCT_ALLOCATOR_SPECIALIZATION(...)