Skip to content

Commit

Permalink
Follow SOFA Lifecycle v24.06 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugtalbot authored Feb 26, 2024
1 parent cad9d6d commit 198c730
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/CGALPlugin/CylinderMesh.inl
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ void CylinderMesh<DataTypes>::draw(const sofa::core::visual::VisualParams* vpara
vparams->drawTool()->disableLighting();

helper::ReadAccessor< Data< VecCoord > > coords = m_points;
std::vector<type::Vector3> points;
std::vector<type::Vec3> points;

// Vertices
points.resize(m_nbVertices);
Expand Down Expand Up @@ -531,7 +531,7 @@ void CylinderMesh<DataTypes>::draw(const sofa::core::visual::VisualParams* vpara
{
helper::ReadAccessor< Data< VecCoord > > coords = m_points;
helper::ReadAccessor< Data< SeqTetrahedra > > tetras = m_tetras;
std::vector<type::Vector3> points;
std::vector<type::Vec3> points;

vparams->drawTool()->disableLighting();

Expand Down
2 changes: 1 addition & 1 deletion src/CGALPlugin/MeshGenerationFromImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class MeshGenerationFromImage : public sofa::core::DataEngine
typedef typename sofa::defaulttype::Vec3dTypes::Coord Point;
typedef typename sofa::defaulttype::Vec3dTypes::Coord Coord;
typedef typename sofa::defaulttype::Vec3dTypes::VecCoord VecCoord;
typedef sofa::type::Vector3 Vector3;
typedef sofa::type::Vec3 Vec3;

typedef sofa::core::topology::BaseMeshTopology::Tetra Tetra;
typedef sofa::core::topology::BaseMeshTopology::SeqTetrahedra SeqTetrahedra;
Expand Down
8 changes: 4 additions & 4 deletions src/CGALPlugin/MeshGenerationFromImage.inl
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void MeshGenerationFromImage<DataTypes, _ImageTypes>::doUpdate()

size_t fi = 0;

Vector3 translation = Vector3(image3.image()->tx, image3.image()->ty, image3.image()->tz);
Vec3 translation = Vec3(image3.image()->tx, image3.image()->ty, image3.image()->tz);
for (Polylines::iterator l = polylines.begin(); l != polylines.end(); l++, fi++) {
Coord ft = fts[fi];

Expand Down Expand Up @@ -338,11 +338,11 @@ void MeshGenerationFromImage<DataTypes, _ImageTypes>::doUpdate()
for (unsigned int c=0; c<p.size(); c++)
if (p[c] < bbmin[c]) bbmin[c] = p[c]; else if (p[c] > bbmax[c]) bbmax[c] = p[c];

Vector3 rotation = Vector3(image3.image()->rx, image3.image()->ry, image3.image()->rz);
Vec3 rotation = Vec3(image3.image()->rx, image3.image()->ry, image3.image()->rz);
type::Quat<SReal> q = type::Quat<Real>::createQuaterFromEuler(rotation*M_PI/180.0);
p= q.rotate(p);

Vector3 translation = Vector3(image3.image()->tx, image3.image()->ty, image3.image()->tz);
Vec3 translation = Vec3(image3.image()->tx, image3.image()->ty, image3.image()->tz);
newPoints.push_back(p+translation);
}
}
Expand Down Expand Up @@ -445,7 +445,7 @@ void MeshGenerationFromImage<DataTypes, _ImageTypes>::draw(const sofa::core::vis
helper::ReadAccessor< Data< vector<int> > > tetraDomain = d_tetraDomain;

vparams->drawTool()->setLightingEnabled(false);
std::vector< std::vector<type::Vector3> > pointsDomains[4];
std::vector< std::vector<type::Vec3> > pointsDomains[4];
for(unsigned int i=0; i<4; ++i)
pointsDomains[i].resize(m_tetraDomainLabels.size());
int domainLabel = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/CGALPlugin/MeshGenerationFromPolyhedron.inl
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ void MeshGenerationFromPolyhedron<DataTypes>::draw(const sofa::core::visual::Vis
helper::ReadAccessor< Data<SeqTetrahedra> > tetrahedra = f_tetrahedra;

vparams->drawTool()->setLightingEnabled(false);
std::vector< type::Vector3 > points[4];
std::vector< type::Vec3 > points[4];
for(size_t i=0; i<tetrahedra.size(); ++i)
{
int a = tetrahedra[i][0];
Expand Down Expand Up @@ -464,7 +464,7 @@ void MeshGenerationFromPolyhedron<DataTypes>::draw(const sofa::core::visual::Vis
vparams->drawTool()->setPolygonMode(0,true);

vparams->drawTool()->setLightingEnabled(false);
std::vector< type::Vector3 > points;
std::vector< type::Vec3 > points;
for(size_t i=0; i<triangles.size(); ++i)
{
int a = triangles[i][0];
Expand Down

0 comments on commit 198c730

Please sign in to comment.