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>
21 class JointCollectionTpl>
25 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
27 typedef _BroadPhaseManagerDerived BroadPhaseManager;
29 typedef _Scalar Scalar;
37 typedef typename Base::DataVector DataVector;
44 typedef std::vector<BroadPhaseManager> BroadPhaseManagerVector;
55 const size_t pool_size = (
size_t)omp_get_max_threads())
56 :
Base(model, geometry_model, pool_size)
74 PINOCCHIO_CHECK_INPUT_ARGUMENT(
75 index <
m_managers.size(),
"Index greater than the size of the manager vector.");
82 PINOCCHIO_CHECK_INPUT_ARGUMENT(
83 index <
m_managers.size(),
"Index greater than the size of the manager vector.");
119 for (
size_t i = 0; i <
size(); ++i)
128 for (
size_t i = 0; i <
size(); ++i)
130 const BroadPhaseManager & manager =
m_managers[i];
132 res &= (&manager.getModel() == &
getModel(i));
136 res &= manager.check();
152 for (
size_t i = 0; i <
size(); ++i)
166 if (
size() < new_size)
168 typename BroadPhaseManagerVector::iterator it =
m_managers.begin();
169 std::advance(it, (
long)(new_size -
size()));
virtual void update(const GeometryData &geometry_data)
Update the geometry datas with the new value.
virtual ~BroadPhaseManagerPoolBase()
 
bool check() const
Check the validity of the current broadphase.
BroadPhaseManager & getBroadPhaseManager(const size_t index)
Returns the geometry_data at index.
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.
const BroadPhaseManagerVector & getBroadPhaseManagers() const
Access to the vector of broad phase managers.
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
Broad phase managers associated to the pool.
BroadPhaseManagerPoolBase(const BroadPhaseManagerPoolBase &other)
Copy constructor from an other BroadPhaseManagerPoolTpl.
virtual void doResize(const size_t new_size)
 
const BroadPhaseManager & getBroadPhaseManager(const size_t index) const
Returns the geometry_data at index.
BroadPhaseManagerVector & getBroadPhaseManagers()
Access to the vector of broad phase managers.
const GeometryDataVector & getGeometryDatas() const
Returns the vector of Geometry Data.
size_t size() const
Returns the size of the pool.
void update(const Data &data)
Update all the datas with the input data value.
const GeometryModelVector & getGeometryModels() const
Returns the vector of Geometry Model.
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.
const Data & getData(const size_t index) const
Return a specific data.
const DataVector & getDatas() const
Returns the data vector.
const ModelVector & getModels() const
Returns the vector of models.
const Model & getModel(const size_t index) const
Return a specific model.
Main pinocchio namespace.