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
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__ 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...
::pinocchio::GeometryData GeometryData
const GeometryDataVector & geometry_datas() const
Vector of Geometry Data.
GeometryDataVector m_geometry_datas
Vector of Geometry Data associated to the pool.
GeometryDataVector & geometry_datas()
Vector of Geometry Data.
::pinocchio::GeometryModel GeometryModel
GeometryPoolTpl< double, 0, JointCollectionDefaultTpl > GeometryPool
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef ModelPoolTpl< _Scalar, _Options, JointCollectionTpl > Base
std::vector< GeometryData, Eigen::aligned_allocator< GeometryData > > GeometryDataVector
int size() const
Returns the size of the pool.
virtual ~GeometryPoolTpl()
.
GeometryData & geometry_data(const size_t index)
Returns the geometry_data at index.
virtual void do_resize(const int new_size)
.
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...
AABB & update(const Vec3f &a, const Vec3f &b)
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.
const Model & model() const
Returns the model stored within the pool.
std::vector< GeometryModel, Eigen::aligned_allocator< GeometryModel > > GeometryModelVector
Main pinocchio namespace.
Base::DataVector DataVector
GeometryModel & geometry_model()
Returns the geometry model.
const GeometryData & geometry_data(const size_t index) const
Returns the geometry_data at index.
void update(const GeometryData &geometry_data)
Update the geometry datas with the new value.
GeometryPoolTpl(const GeometryPoolTpl &other)
Copy constructor from an other GeometryPoolTpl.
const GeometryModel & geometry_model() const
Returns the geometry model.
GeometryModel m_geometry_model
Geometry Model associated to the pool.
#define PINOCCHIO_CHECK_INPUT_ARGUMENT(...)
Macro to check an assert-like condition and throw a std::invalid_argument exception (with a message) ...