Skip to content

Commit cdde44d

Browse files
authored
Merge pull request #7 from hugtalbot/202501_fix_compilation
Fix compilation further to lifecycle v25.06
2 parents 7b59adc + 43275ff commit cdde44d

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/ShapeMatchingPlugin/ShapeMatchingForceField.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void ShapeMatchingForceField<DataTypes>::addForce(const core::MechanicalParams*
7777
const auto& vcm = l_rotationFinder->getCM();
7878
const auto& vcm0 = l_rotationFinder->getCM0();
7979
const auto& vNeighborhood = l_rotationFinder->getNeighborhood();
80-
const auto& x0 = this->mstate->read(sofa::core::ConstVecCoordId::restPosition())->getValue();
80+
const auto& x0 = this->mstate->read(sofa::core::vec_id::read_access::restPosition)->getValue();
8181
Coord gi, xi;
8282

8383
f1.resize(p1.size());
@@ -109,7 +109,7 @@ void ShapeMatchingForceField<DataTypes>::addDForce(const core::MechanicalParams*
109109
const auto& vDR = l_rotationFinder->getDRotations(dx.getValue());
110110
const auto& vcm0 = l_rotationFinder->getCM0();
111111
const auto& vNeighborhood = l_rotationFinder->getNeighborhood();
112-
const auto& x0 = this->mstate->read(sofa::core::ConstVecCoordId::restPosition())->getValue();
112+
const auto& x0 = this->mstate->read(sofa::core::vec_id::read_access::restPosition)->getValue();
113113

114114
df1.resize(dp1.size());
115115
const Real fact = d_stiffness.getValue()*mparams->kFactorIncludingRayleighDamping(this->rayleighStiffness.getValue());

src/ShapeMatchingPlugin/ShapeMatchingRotationFinder.inl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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
295295
template <class DataTypes>
296296
const 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

Comments
 (0)