5 #ifndef __pinocchio_multibody_pool_geometry_hpp__ 6 #define __pinocchio_multibody_pool_geometry_hpp__ 8 #include "pinocchio/multibody/geometry.hpp" 9 #include "pinocchio/multibody/pool/model.hpp" 11 #include "pinocchio/utils/openmp.hpp" 15 template<
typename _Scalar,
int _Options,
template<
typename,
int>
class JointCollectionTpl>
17 :
public ModelPoolTpl<_Scalar,_Options,JointCollectionTpl>
21 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
24 typedef _Scalar Scalar;
25 enum { Options = _Options };
29 typedef typename Base::DataVector DataVector;
33 typedef std::vector<GeometryModel,Eigen::aligned_allocator<GeometryModel> > GeometryModelVector;
34 typedef std::vector<GeometryData,Eigen::aligned_allocator<GeometryData> > GeometryDataVector;
43 const int pool_size = omp_get_max_threads())
44 : Base(model,pool_size)
69 "Index greater than the size of the geometry_datas vector.");
77 "Index greater than the size of the geometry_datas vector.");
108 void update(
const GeometryModel & geometry_model)
122 void update(
const GeometryModel & geometry_model,
143 m_geometry_datas.resize((
size_t)new_size);
144 if(
size() < new_size)
146 typename GeometryDataVector::iterator it = m_geometry_datas.begin();
147 std::advance(it, (
long)(new_size -
size()));
148 std::fill(it,m_geometry_datas.end(),m_geometry_datas[0]);
157 #endif // ifndef __pinocchio_multibody_pool_geometry_hpp__
GeometryDataVector m_geometry_datas
Vector of Geometry Data associated to the pool.
const GeometryDataVector & geometry_datas() const
Vector of Geometry Data.
GeometryModel & geometry_model()
Returns the geometry model.
const DataVector & datas() const
Returns the data vectors.
const GeometryModel & geometry_model() const
Returns the geometry model.
void update(const GeometryModel &geometry_model)
Update the geometry model with the new input value. In this case, all the geometry_datas will be repl...
void update(const GeometryData &geometry_data)
Update the geometry datas with the new value.
virtual void do_resize(const int new_size)
int size() const
Returns the size of the pool.
GeometryDataVector & geometry_datas()
Vector of Geometry Data.
Main pinocchio namespace.
GeometryPoolTpl(const GeometryPoolTpl &other)
Copy constructor from an other GeometryPoolTpl.
GeometryData & geometry_data(const size_t index)
Returns the geometry_data at index.
GeometryPoolTpl(const Model &model, const GeometryModel &geometry_model, const int pool_size=omp_get_max_threads())
Default constructor from a model and a pool size.
void update(const Model &model)
Update the model, meaning that all the datas will be refreshed accordingly.
virtual ~GeometryPoolTpl()
const GeometryData & geometry_data(const size_t index) const
Returns the geometry_data at index.
const Model & model() const
Returns the model stored within the pool.
void update(const GeometryModel &geometry_model, const GeometryData &geometry_data)
Update the geometry model and data with the new input values. In this case, all the geometry_datas wi...
GeometryModel m_geometry_model
Geometry Model associated to the pool.