diff --git a/src/ShapeMatchingPlugin/ShapeMatchingForceField.inl b/src/ShapeMatchingPlugin/ShapeMatchingForceField.inl index 947db37..ef75632 100644 --- a/src/ShapeMatchingPlugin/ShapeMatchingForceField.inl +++ b/src/ShapeMatchingPlugin/ShapeMatchingForceField.inl @@ -77,7 +77,7 @@ void ShapeMatchingForceField::addForce(const core::MechanicalParams* const auto& vcm = l_rotationFinder->getCM(); const auto& vcm0 = l_rotationFinder->getCM0(); const auto& vNeighborhood = l_rotationFinder->getNeighborhood(); - const auto& x0 = this->mstate->read(sofa::core::ConstVecCoordId::restPosition())->getValue(); + const auto& x0 = this->mstate->read(sofa::core::vec_id::read_access::restPosition)->getValue(); Coord gi, xi; f1.resize(p1.size()); @@ -109,7 +109,7 @@ void ShapeMatchingForceField::addDForce(const core::MechanicalParams* const auto& vDR = l_rotationFinder->getDRotations(dx.getValue()); const auto& vcm0 = l_rotationFinder->getCM0(); const auto& vNeighborhood = l_rotationFinder->getNeighborhood(); - const auto& x0 = this->mstate->read(sofa::core::ConstVecCoordId::restPosition())->getValue(); + const auto& x0 = this->mstate->read(sofa::core::vec_id::read_access::restPosition)->getValue(); df1.resize(dp1.size()); const Real fact = d_stiffness.getValue()*mparams->kFactorIncludingRayleighDamping(this->rayleighStiffness.getValue()); diff --git a/src/ShapeMatchingPlugin/ShapeMatchingRotationFinder.inl b/src/ShapeMatchingPlugin/ShapeMatchingRotationFinder.inl index 718cb46..70c578b 100644 --- a/src/ShapeMatchingPlugin/ShapeMatchingRotationFinder.inl +++ b/src/ShapeMatchingPlugin/ShapeMatchingRotationFinder.inl @@ -143,7 +143,7 @@ void ShapeMatchingRotationFinder::computeNeighborhood() } else { - const VecCoord& X0 = l_mechanicalState->read(sofa::core::ConstVecCoordId::restPosition())->getValue(); + const VecCoord& X0 = l_mechanicalState->read(sofa::core::vec_id::read_access::restPosition)->getValue(); type::vector< unsigned int > clusterInPoint; clusterInPoint.resize(nbPoints); @@ -262,7 +262,7 @@ void ShapeMatchingRotationFinder::computeQT() m_Xcm.resize(m_pointNeighborhood.size()); m_Xcm0.resize(m_pointNeighborhood.size()); - const VecCoord& restPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::restPosition())->getValue(); + const VecCoord& restPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::restPosition)->getValue(); for (unsigned int i=0;i::flipAxis(typename ShapeMatchingRota template const type::vector::Mat3x3>& ShapeMatchingRotationFinder::getRotations() { - const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::position())->getValue(); - const VecCoord& restPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::restPosition())->getValue(); + const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::position)->getValue(); + const VecCoord& restPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::restPosition)->getValue(); if (currentPositions.size() < 3) { @@ -369,8 +369,8 @@ void ShapeMatchingRotationFinder::getRotations(linearalgebra::BaseMat { if (auto* diag = dynamic_cast *>(m)) { - const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::position())->getValue(); - const VecCoord& restPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::restPosition())->getValue(); + const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::position)->getValue(); + const VecCoord& restPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::restPosition)->getValue(); if (currentPositions.size() < 3) { @@ -492,7 +492,7 @@ const type::vector::Mat3x3>& Sha getDRotations(); } - const VecCoord& restPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::restPosition())->getValue(); + const VecCoord& restPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::restPosition)->getValue(); const auto nbShapes = m_pointNeighborhood.size(); @@ -552,7 +552,7 @@ void ShapeMatchingRotationFinder::draw(const core::visual::VisualPara if (d_showRotations.getValue()) { - const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::position())->getValue(); + const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::position)->getValue(); getRotations(); @@ -583,7 +583,7 @@ void ShapeMatchingRotationFinder::draw(const core::visual::VisualPara if (vparams->displayFlags().getShowForceFields()) { - const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::ConstVecCoordId::position())->getValue(); + const VecCoord& currentPositions = l_mechanicalState->read(sofa::core::vec_id::read_access::position)->getValue(); if (!d_showRotations.getValue()) getRotations();