@@ -143,7 +143,7 @@ void ShapeMatchingRotationFinder<DataTypes>::computeNeighborhood()
143143 }
144144 else
145145 {
146- const VecCoord& X0 = l_mechanicalState->read (sofa::core::ConstVecCoordId:: restPosition () )->getValue ();
146+ const VecCoord& X0 = l_mechanicalState->read (sofa::core::vec_id::read_access:: restPosition)->getValue ();
147147 type::vector< unsigned int > clusterInPoint;
148148
149149 clusterInPoint.resize (nbPoints);
@@ -262,7 +262,7 @@ void ShapeMatchingRotationFinder<DataTypes>::computeQT()
262262 m_Xcm.resize (m_pointNeighborhood.size ());
263263 m_Xcm0.resize (m_pointNeighborhood.size ());
264264
265- const VecCoord& restPositions = l_mechanicalState->read (sofa::core::ConstVecCoordId:: restPosition () )->getValue ();
265+ const VecCoord& restPositions = l_mechanicalState->read (sofa::core::vec_id::read_access:: restPosition)->getValue ();
266266
267267 for (unsigned int i=0 ;i<m_pointNeighborhood.size ();++i)
268268 {
@@ -295,8 +295,8 @@ void ShapeMatchingRotationFinder<DataTypes>::flipAxis(typename ShapeMatchingRota
295295template <class DataTypes >
296296const type::vector<typename ShapeMatchingRotationFinder<DataTypes>::Mat3x3>& ShapeMatchingRotationFinder<DataTypes>::getRotations()
297297{
298- const VecCoord& currentPositions = l_mechanicalState->read (sofa::core::ConstVecCoordId:: position () )->getValue ();
299- const VecCoord& restPositions = l_mechanicalState->read (sofa::core::ConstVecCoordId:: restPosition () )->getValue ();
298+ const VecCoord& currentPositions = l_mechanicalState->read (sofa::core::vec_id::read_access:: position)->getValue ();
299+ const VecCoord& restPositions = l_mechanicalState->read (sofa::core::vec_id::read_access:: restPosition)->getValue ();
300300
301301 if (currentPositions.size () < 3 )
302302 {
@@ -369,8 +369,8 @@ void ShapeMatchingRotationFinder<DataTypes>::getRotations(linearalgebra::BaseMat
369369{
370370 if (auto * diag = dynamic_cast <linearalgebra::RotationMatrix<Real> *>(m))
371371 {
372- const VecCoord& currentPositions = l_mechanicalState->read (sofa::core::ConstVecCoordId:: position () )->getValue ();
373- const VecCoord& restPositions = l_mechanicalState->read (sofa::core::ConstVecCoordId:: restPosition () )->getValue ();
372+ const VecCoord& currentPositions = l_mechanicalState->read (sofa::core::vec_id::read_access:: position)->getValue ();
373+ const VecCoord& restPositions = l_mechanicalState->read (sofa::core::vec_id::read_access:: restPosition)->getValue ();
374374
375375 if (currentPositions.size () < 3 )
376376 {
@@ -492,7 +492,7 @@ const type::vector<typename ShapeMatchingRotationFinder<DataTypes>::Mat3x3>& Sha
492492 getDRotations ();
493493 }
494494
495- const VecCoord& restPositions = l_mechanicalState->read (sofa::core::ConstVecCoordId:: restPosition () )->getValue ();
495+ const VecCoord& restPositions = l_mechanicalState->read (sofa::core::vec_id::read_access:: restPosition)->getValue ();
496496
497497 const auto nbShapes = m_pointNeighborhood.size ();
498498
@@ -552,7 +552,7 @@ void ShapeMatchingRotationFinder<DataTypes>::draw(const core::visual::VisualPara
552552 if (d_showRotations.getValue ())
553553 {
554554
555- const VecCoord& currentPositions = l_mechanicalState->read (sofa::core::ConstVecCoordId:: position () )->getValue ();
555+ const VecCoord& currentPositions = l_mechanicalState->read (sofa::core::vec_id::read_access:: position)->getValue ();
556556
557557 getRotations ();
558558
@@ -583,7 +583,7 @@ void ShapeMatchingRotationFinder<DataTypes>::draw(const core::visual::VisualPara
583583
584584 if (vparams->displayFlags ().getShowForceFields ())
585585 {
586- const VecCoord& currentPositions = l_mechanicalState->read (sofa::core::ConstVecCoordId:: position () )->getValue ();
586+ const VecCoord& currentPositions = l_mechanicalState->read (sofa::core::vec_id::read_access:: position)->getValue ();
587587
588588 if (!d_showRotations.getValue ())
589589 getRotations ();
0 commit comments