Go to the documentation of this file.
5 #ifndef __pinocchio_python_multibody_pool_model_hpp__
6 #define __pinocchio_python_multibody_pool_model_hpp__
12 #include <boost/python/overloads.hpp>
20 #if EIGENPY_VERSION_AT_MOST(2, 8, 1)
30 template<
typename ModelPool>
40 template<
class PyClass>
44 bp::args(
"self",
"model",
"size"),
"Default constructor."))
45 .def(bp::init<const ModelPool &>(bp::args(
"self",
"other"),
"Copy constructor."))
49 bp::args(
"self",
"index"),
"Return a specific model.",
50 bp::return_internal_reference<>())
53 "Returns the model vectors.", bp::return_internal_reference<>())
57 bp::args(
"self",
"index"),
"Return a specific data.", bp::return_internal_reference<>())
60 "Returns the data vectors.", bp::return_internal_reference<>())
62 .def(
"size", &
ModelPool::size, bp::arg(
"self"),
"Returns the size of the pool.")
63 .def(
"resize", &
ModelPool::resize, bp::args(
"self",
"new_size"),
"Resize the pool.")
67 bp::args(
"self",
"data"),
"Update all the datas with the input data value.");
73 bp::class_<ModelPool>(
74 "ModelPool",
"Pool containing a model and several datas for parallel computations",
86 #endif // ifnded __pinocchio_python_multibody_pool_model_hpp__
void resize(const size_t new_size)
Set the size of the pool and perform the appropriate resize.
void visit(PyClass &cl) const
void init(bool compute_local_aabb=true)
ModelPool::ModelVector ModelVector
ModelPool::DataVector DataVector
const ModelVector & getModels() const
Returns the vector of models.
const Model & getModel(const size_t index) const
Return a specific model.
const Data & getData(const size_t index) const
Return a specific data.
#define EIGENPY_DEFINE_STRUCT_ALLOCATOR_SPECIALIZATION(...)
Add the Python method copy to allow a copy of this by calling the copy constructor.
void update(const Data &data)
Update all the datas with the input data value.
const DataVector & getDatas() const
Returns the data vector.
static void expose(const std::string &class_name, const bp::def_visitor< DerivedVisitor > &visitor)
std::vector< Data, Eigen::aligned_allocator< Data > > DataVector
std::vector< Model, Eigen::aligned_allocator< Model > > ModelVector
size_t size() const
Returns the size of the pool.
Main pinocchio namespace.
pinocchio
Author(s):
autogenerated on Sun Dec 22 2024 03:41:11