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;
36 typedef typename Base::DataVector DataVector;
43 typedef std::vector<BroadPhaseManager> BroadPhaseManagerVector;
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.");
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];
131 res &= (&manager.getModel() == &
getModel(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()));
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.