Skip to content

Commit 55cfb8c

Browse files
authored
apply change from SOFA v2506 lifecycle (SofaDefrost#7)
1 parent fc89d07 commit 55cfb8c

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/Shell/forcefield/TriangularBendingFEMForceField.inl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void TriangularBendingFEMForceField<DataTypes>::init()
141141
if (mStateTarget)
142142
{
143143
m_targetTriangles = _topologyTarget->getTriangles();
144-
m_targetVertices = mStateTarget->read(sofa::core::ConstVecCoordId::position())->getValue();
144+
m_targetVertices = mStateTarget->read(sofa::core::vec_id::read_access::position)->getValue();
145145
}
146146
else
147147
{
@@ -167,7 +167,7 @@ void TriangularBendingFEMForceField<DataTypes>::refineCoarseMeshToTarget(void)
167167
msg_info() << "Refining a mesh of " << _topology->getNbTriangles() << " triangles towards a target surface of " << m_targetTriangles.size() << " triangles.";
168168

169169
// List of vertices
170-
const VecCoord& x = this->mstate->read(sofa::core::ConstVecCoordId::position())->getValue();
170+
const VecCoord& x = this->mstate->read(sofa::core::vec_id::read_access::position)->getValue();
171171
// List of triangles
172172
const SeqTriangles triangles = _topology->getTriangles();
173173

@@ -362,7 +362,7 @@ template <class DataTypes>void TriangularBendingFEMForceField<DataTypes>::reinit
362362
// Check if there is same number of nodes
363363
if (!m_mapTopology) {
364364
if (l_restShape.get()->f_position.getValue().size() !=
365-
this->mstate->read(sofa::core::ConstVecCoordId::position())->getValue().size()) {
365+
this->mstate->read(sofa::core::vec_id::read_access::position)->getValue().size()) {
366366
msg_warning() << "Different number of nodes in rest shape and mechanical state." ;
367367
}
368368
} else if (l_restShape.get()->f_position.getValue().size() !=
@@ -490,9 +490,9 @@ void TriangularBendingFEMForceField<DataTypes>::initTriangle(const int i)
490490
// if rest shape is fixed but we have mapped topology use it
491491
? l_topologyMapper.get()->f_input_position.getValue()
492492
// otherwise just take rest shape in mechanical state
493-
: this->mstate->read(sofa::core::ConstVecCoordId::position())->getValue()
493+
: this->mstate->read(sofa::core::vec_id::read_access::position)->getValue()
494494
);
495-
const VecCoord& x = this->mstate->read(sofa::core::ConstVecCoordId::position())->getValue();
495+
const VecCoord& x = this->mstate->read(sofa::core::vec_id::read_access::position)->getValue();
496496

497497
// Rotation from triangle to world at rest and initial positions (respectively)
498498
Quat Qframe0, Qframe;
@@ -1192,7 +1192,7 @@ void TriangularBendingFEMForceField<DataTypes>::draw(const sofa::core::visual::V
11921192
std::vector<sofa::type::RGBAColor> colorVector;
11931193
std::vector<sofa::type::Vec3> vertices;
11941194

1195-
const VecCoord& x = this->mstate->read(sofa::core::ConstVecCoordId::position())->getValue();
1195+
const VecCoord& x = this->mstate->read(sofa::core::vec_id::read_access::position)->getValue();
11961196

11971197
const SeqTriangles triangles = _topology->getTriangles();
11981198
for (const Triangle& tri: triangles)
@@ -1218,9 +1218,9 @@ void TriangularBendingFEMForceField<DataTypes>::draw(const sofa::core::visual::V
12181218
// if rest shape is fixed but we have mapped topology use it
12191219
? l_topologyMapper.get()->f_input_position.getValue()
12201220
// otherwise just take rest shape in mechanical state
1221-
: this->mstate->read(sofa::core::ConstVecCoordId::position())->getValue()
1221+
: this->mstate->read(sofa::core::vec_id::read_access::position)->getValue()
12221222
);
1223-
const VecCoord& x = this->mstate->read(sofa::core::ConstVecCoordId::position())->getValue();
1223+
const VecCoord& x = this->mstate->read(sofa::core::vec_id::read_access::position)->getValue();
12241224

12251225
int nbTriangles=_topology->getNbTriangles();
12261226

0 commit comments

Comments
 (0)