5#ifndef __pinocchio_collision_pool_broadphase_manager_hpp__ 6#define __pinocchio_collision_pool_broadphase_manager_hpp__ 10#include "pinocchio/multibody/pool/geometry.hpp" 11#include "pinocchio/collision/broadphase-manager.hpp" 17 typename _BroadPhaseManagerDerived,
20 template<
typename,
int>
class JointCollectionTpl>
24 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
26 typedef _BroadPhaseManagerDerived BroadPhaseManager;
28 typedef _Scalar Scalar;
34 typedef typename Base::Model Model;
35 typedef typename Base::Data Data;
36 typedef typename Base::DataVector DataVector;
37 typedef typename Base::GeometryModel GeometryModel;
38 typedef typename Base::GeometryData GeometryData;
43 typedef std::vector<BroadPhaseManager> BroadPhaseManagerVector;
53 const GeometryModel & geometry_model,
54 const size_t pool_size = (
size_t)omp_get_max_threads())
55 : Base(model, geometry_model, pool_size)
73 PINOCCHIO_CHECK_INPUT_ARGUMENT(
74 index <
m_managers.size(),
"Index greater than the size of the manager vector.");
81 PINOCCHIO_CHECK_INPUT_ARGUMENT(
82 index <
m_managers.size(),
"Index greater than the size of the manager vector.");
114 virtual void update(
const GeometryData & geometry_data)
118 for (
size_t i = 0; i <
size(); ++i)
127 for (
size_t i = 0; i <
size(); ++i)
129 const BroadPhaseManager & manager =
m_managers[i];
135 res &= manager.
check();
151 for (
size_t i = 0; i <
size(); ++i)
165 if (
size() < new_size)
167 typename BroadPhaseManagerVector::iterator it =
m_managers.begin();
168 std::advance(it, (
long)(new_size -
size()));
const GeometryModel & getGeometryModel(const size_t index) const
Returns the geometry_model at given index.
virtual void update(const GeometryData &geometry_data)
BroadPhaseManagerVector & getBroadPhaseManagers()
virtual ~BroadPhaseManagerPoolBase()
const BroadPhaseManager & getBroadPhaseManager(const size_t index) const
BroadPhaseManager & getBroadPhaseManager(const size_t index)
BroadPhaseManagerPoolBase(const Model &model, const GeometryModel &geometry_model, const size_t pool_size=(size_t) omp_get_max_threads())
Default constructor from a model and a pool size.
BroadPhaseManagerVector m_managers
BroadPhaseManagerPoolBase(const BroadPhaseManagerPoolBase &other)
virtual void doResize(const size_t new_size)
const BroadPhaseManagerVector & getBroadPhaseManagers() const
const GeometryData & getGeometryData(const size_t index) const
Returns the geometry_data at given index.
const GeometryModel & getGeometryModel(const size_t index) const
Returns the geometry_model at given index.
size_t size() const
Returns the size of the pool.
virtual void update(const GeometryData &geometry_data_to_copy)
Update the geometry datas with the new value.
const GeometryModelVector & getGeometryModels() const
Returns the vector of Geometry Model.
GeometryPoolTpl(const Model &model, const GeometryModel &geometry_model, const size_t pool_size=(size_t) omp_get_max_threads())
Default constructor from a model and a pool size.
const GeometryDataVector & getGeometryDatas() const
Returns the vector of Geometry Data.
const GeometryData & getGeometryData(const size_t index) const
Returns the geometry_data at given index.
const Model & getModel(const size_t index) const
Return a specific model.
const DataVector & getDatas() const
Returns the data vector.
const ModelVector & getModels() const
Returns the vector of models.
const Data & getData(const size_t index) const
Return a specific data.
Main pinocchio namespace.
const GeometryData & getGeometryData() const
Returns the geometry data associated to the manager.
const Model & getModel() const
Returns the model associated to the manager.
bool check() const
Check whether the base broad phase manager is aligned with the current collision_objects.
const GeometryModel & getGeometryModel() const
Returns the geometry model associated to the manager.