Skip to content

Commit fbb3f75

Browse files
bakpaulalxbilger
andauthored
[all] Fix float compilation (#6115)
* Fix float compilation * Update Sofa/Component/Collision/Detection/Intersection/src/sofa/component/collision/detection/intersection/CCDTightInclusionIntersection.cpp Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com> * Update CudaRigidMapping.inl --------- Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>
1 parent 8c88951 commit fbb3f75

16 files changed

Lines changed: 70 additions & 153 deletions

File tree

Sofa/Component/Collision/Detection/Intersection/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ sofa_find_package(tight_inclusion QUIET)
4949

5050
if(NOT tight_inclusion_FOUND AND SOFA_ALLOW_FETCH_DEPENDENCIES)
5151

52+
if(${SOFA_FLOATING_POINT_TYPE} STREQUAL float)
53+
set(TIGHT_INCLUSION_WITH_DOUBLE_PRECISION OFF)
54+
endif ()
5255
sofa_fetch_dependency(tight_inclusion
5356
GIT_REPOSITORY https://github.com/sofa-framework/Tight-Inclusion
5457
GIT_TAG v1.0.6-export-target

Sofa/Component/Collision/Detection/Intersection/src/sofa/component/collision/detection/intersection/CCDTightInclusionIntersection.cpp

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ CCDTightInclusionIntersection::CCDTightInclusionIntersection()
6262
: BaseProximityIntersection()
6363
, d_continuousCollisionType(initData(&d_continuousCollisionType, helper::OptionsGroup({"None", "Inertia", "FreeMotion"}).setSelectedItem(0), "continuousCollisionType",
6464
"Data used for continuous collision detection taken into {'None','Inertia','FreeMotion'}. If 'None' then no CCD is used, if 'Inertia' then only inertia will be used to compute the collision detection and if 'FreeMotion' then the free motion will be used. Note that if 'FreeMotion' is selected, you cannot use the option 'parallelCollisionDetectionAndFreeMotion' in the FreeMotionAnimationLoop"))
65-
, d_tolerance(initData(&d_tolerance,1e-10,"tolerance","tolerance used by the tight inclusion CCD algorithm"))
65+
, d_tolerance(initData(&d_tolerance, 1e-10_sreal,"tolerance","tolerance used by the tight inclusion CCD algorithm"))
6666
, d_maxIterations(initData(&d_maxIterations,(long) 1000,"maxIterations","maxIterations used by the tight inclusion CCD algorithm"))
6767
{
6868

@@ -132,18 +132,18 @@ bool CCDTightInclusionIntersection::testIntersection(Line& e1, Line& e2, const c
132132
}
133133

134134

135-
const Eigen::Map<Eigen::Vector3<SReal>> Line1ABegin(const_cast<double*>(e1.p1().elems.data()));
136-
const Eigen::Map<Eigen::Vector3<SReal>> Line1AEnd(const_cast<double*>(e1.p1Free().elems.data()));
137-
const Eigen::Map<Eigen::Vector3<SReal>> Line1BBegin(const_cast<double*>(e1.p2().elems.data()));
138-
const Eigen::Map<Eigen::Vector3<SReal>> Line1BEnd(const_cast<double*>(e1.p2Free().elems.data()));
135+
const Eigen::Map<Eigen::Vector3<SReal>> Line1ABegin(const_cast<SReal*>(e1.p1().elems.data()));
136+
const Eigen::Map<Eigen::Vector3<SReal>> Line1AEnd(const_cast<SReal*>(e1.p1Free().elems.data()));
137+
const Eigen::Map<Eigen::Vector3<SReal>> Line1BBegin(const_cast<SReal*>(e1.p2().elems.data()));
138+
const Eigen::Map<Eigen::Vector3<SReal>> Line1BEnd(const_cast<SReal*>(e1.p2Free().elems.data()));
139139

140-
const Eigen::Map<Eigen::Vector3<SReal>> Line2ABegin(const_cast<double*>(e2.p1().elems.data()));
141-
const Eigen::Map<Eigen::Vector3<SReal>> Line2AEnd(const_cast<double*>(e2.p1Free().elems.data()));
142-
const Eigen::Map<Eigen::Vector3<SReal>> Line2BBegin(const_cast<double*>(e2.p2().elems.data()));
143-
const Eigen::Map<Eigen::Vector3<SReal>> Line2BEnd(const_cast<double*>(e2.p2Free().elems.data()));
140+
const Eigen::Map<Eigen::Vector3<SReal>> Line2ABegin(const_cast<SReal*>(e2.p1().elems.data()));
141+
const Eigen::Map<Eigen::Vector3<SReal>> Line2AEnd(const_cast<SReal*>(e2.p1Free().elems.data()));
142+
const Eigen::Map<Eigen::Vector3<SReal>> Line2BBegin(const_cast<SReal*>(e2.p2().elems.data()));
143+
const Eigen::Map<Eigen::Vector3<SReal>> Line2BEnd(const_cast<SReal*>(e2.p2Free().elems.data()));
144144

145145

146-
const Eigen::Vector3d err {-1.0, -1.0, -1.0};
146+
const Eigen::Vector3<SReal> err {-1.0_sreal, -1.0_sreal, -1.0_sreal};
147147
const double maxSeparation = currentIntersection->getContactDistance() + e1.getContactDistance() + e2.getContactDistance(); // 0.00001
148148
SReal toi = 2.0;
149149
const SReal tmax = 1.0;
@@ -166,18 +166,18 @@ int CCDTightInclusionIntersection::computeIntersection(Line& e1, Line& e2, Outpu
166166
return 0;
167167
}
168168

169-
const Eigen::Map<Eigen::Vector3<SReal>> Line1ABegin(const_cast<double*>(e1.p1().elems.data()));
170-
const Eigen::Map<Eigen::Vector3<SReal>> Line1AEnd(const_cast<double*>(e1.p1Free().elems.data()));
171-
const Eigen::Map<Eigen::Vector3<SReal>> Line1BBegin(const_cast<double*>(e1.p2().elems.data()));
172-
const Eigen::Map<Eigen::Vector3<SReal>> Line1BEnd(const_cast<double*>(e1.p2Free().elems.data()));
169+
const Eigen::Map<Eigen::Vector3<SReal>> Line1ABegin(const_cast<SReal*>(e1.p1().elems.data()));
170+
const Eigen::Map<Eigen::Vector3<SReal>> Line1AEnd(const_cast<SReal*>(e1.p1Free().elems.data()));
171+
const Eigen::Map<Eigen::Vector3<SReal>> Line1BBegin(const_cast<SReal*>(e1.p2().elems.data()));
172+
const Eigen::Map<Eigen::Vector3<SReal>> Line1BEnd(const_cast<SReal*>(e1.p2Free().elems.data()));
173173

174-
const Eigen::Map<Eigen::Vector3<SReal>> Line2ABegin(const_cast<double*>(e2.p1().elems.data()));
175-
const Eigen::Map<Eigen::Vector3<SReal>> Line2AEnd(const_cast<double*>(e2.p1Free().elems.data()));
176-
const Eigen::Map<Eigen::Vector3<SReal>> Line2BBegin(const_cast<double*>(e2.p2().elems.data()));
177-
const Eigen::Map<Eigen::Vector3<SReal>> Line2BEnd(const_cast<double*>(e2.p2Free().elems.data()));
174+
const Eigen::Map<Eigen::Vector3<SReal>> Line2ABegin(const_cast<SReal*>(e2.p1().elems.data()));
175+
const Eigen::Map<Eigen::Vector3<SReal>> Line2AEnd(const_cast<SReal*>(e2.p1Free().elems.data()));
176+
const Eigen::Map<Eigen::Vector3<SReal>> Line2BBegin(const_cast<SReal*>(e2.p2().elems.data()));
177+
const Eigen::Map<Eigen::Vector3<SReal>> Line2BEnd(const_cast<SReal*>(e2.p2Free().elems.data()));
178178

179179

180-
const Eigen::Vector3d err {-1.0, -1.0, -1.0};
180+
const Eigen::Vector3<SReal> err {-1.0, -1.0, -1.0};
181181
const auto maxSeparation = currentIntersection->getContactDistance() + e1.getContactDistance() + e2.getContactDistance(); // 0.00001
182182
SReal toi = 2.0;
183183
const SReal tmax = 1.0;
@@ -220,18 +220,18 @@ bool CCDTightInclusionIntersection::testIntersection(Triangle& triangle, Point&
220220
}
221221

222222

223-
const Eigen::Map<Eigen::Vector3<SReal>> TriangleABegin(const_cast<double*>(triangle.p1().elems.data()));
224-
const Eigen::Map<Eigen::Vector3<SReal>> TriangleAEnd(const_cast<double*>(triangle.p1Free().elems.data()));
225-
const Eigen::Map<Eigen::Vector3<SReal>> TriangleBBegin(const_cast<double*>(triangle.p2().elems.data()));
226-
const Eigen::Map<Eigen::Vector3<SReal>> TriangleBEnd(const_cast<double*>(triangle.p2Free().elems.data()));
227-
const Eigen::Map<Eigen::Vector3<SReal>> TriangleCBegin(const_cast<double*>(triangle.p3().elems.data()));
228-
const Eigen::Map<Eigen::Vector3<SReal>> TriangleCEnd(const_cast<double*>(triangle.p3Free().elems.data()));
223+
const Eigen::Map<Eigen::Vector3<SReal>> TriangleABegin(const_cast<SReal*>(triangle.p1().elems.data()));
224+
const Eigen::Map<Eigen::Vector3<SReal>> TriangleAEnd(const_cast<SReal*>(triangle.p1Free().elems.data()));
225+
const Eigen::Map<Eigen::Vector3<SReal>> TriangleBBegin(const_cast<SReal*>(triangle.p2().elems.data()));
226+
const Eigen::Map<Eigen::Vector3<SReal>> TriangleBEnd(const_cast<SReal*>(triangle.p2Free().elems.data()));
227+
const Eigen::Map<Eigen::Vector3<SReal>> TriangleCBegin(const_cast<SReal*>(triangle.p3().elems.data()));
228+
const Eigen::Map<Eigen::Vector3<SReal>> TriangleCEnd(const_cast<SReal*>(triangle.p3Free().elems.data()));
229229

230-
const Eigen::Map<Eigen::Vector3<SReal>> PointBegin(const_cast<double*>(point.p().elems.data()));
231-
const Eigen::Map<Eigen::Vector3<SReal>> PointEnd(const_cast<double*>(point.pFree().elems.data()));
230+
const Eigen::Map<Eigen::Vector3<SReal>> PointBegin(const_cast<SReal*>(point.p().elems.data()));
231+
const Eigen::Map<Eigen::Vector3<SReal>> PointEnd(const_cast<SReal*>(point.pFree().elems.data()));
232232

233233

234-
const Eigen::Vector3d err {-1.0, -1.0, -1.0};
234+
const Eigen::Vector3<SReal> err {-1.0, -1.0, -1.0};
235235
const double maxSeparation = currentIntersection->getContactDistance() + triangle.getContactDistance() + point.getContactDistance(); // 0.00001
236236
SReal toi = 2.0;
237237
const SReal tmax = 1.0;
@@ -254,17 +254,17 @@ int CCDTightInclusionIntersection::computeIntersection(Triangle& triangle, Point
254254
<<" not activated" ;
255255
return 0;
256256
}
257-
const Eigen::Map<Eigen::Vector3<SReal>> TriangleABegin(const_cast<double*>(triangle.p1().elems.data()));
258-
const Eigen::Map<Eigen::Vector3<SReal>> TriangleAEnd(const_cast<double*>(triangle.p1Free().elems.data()));
259-
const Eigen::Map<Eigen::Vector3<SReal>> TriangleBBegin(const_cast<double*>(triangle.p2().elems.data()));
260-
const Eigen::Map<Eigen::Vector3<SReal>> TriangleBEnd(const_cast<double*>(triangle.p2Free().elems.data()));
261-
const Eigen::Map<Eigen::Vector3<SReal>> TriangleCBegin(const_cast<double*>(triangle.p3().elems.data()));
262-
const Eigen::Map<Eigen::Vector3<SReal>> TriangleCEnd(const_cast<double*>(triangle.p3Free().elems.data()));
257+
const Eigen::Map<Eigen::Vector3<SReal>> TriangleABegin(const_cast<SReal*>(triangle.p1().elems.data()));
258+
const Eigen::Map<Eigen::Vector3<SReal>> TriangleAEnd(const_cast<SReal*>(triangle.p1Free().elems.data()));
259+
const Eigen::Map<Eigen::Vector3<SReal>> TriangleBBegin(const_cast<SReal*>(triangle.p2().elems.data()));
260+
const Eigen::Map<Eigen::Vector3<SReal>> TriangleBEnd(const_cast<SReal*>(triangle.p2Free().elems.data()));
261+
const Eigen::Map<Eigen::Vector3<SReal>> TriangleCBegin(const_cast<SReal*>(triangle.p3().elems.data()));
262+
const Eigen::Map<Eigen::Vector3<SReal>> TriangleCEnd(const_cast<SReal*>(triangle.p3Free().elems.data()));
263263

264-
const Eigen::Map<Eigen::Vector3<SReal>> PointBegin(const_cast<double*>(point.p().elems.data()));
265-
const Eigen::Map<Eigen::Vector3<SReal>> PointEnd(const_cast<double*>(point.pFree().elems.data()));
264+
const Eigen::Map<Eigen::Vector3<SReal>> PointBegin(const_cast<SReal*>(point.p().elems.data()));
265+
const Eigen::Map<Eigen::Vector3<SReal>> PointEnd(const_cast<SReal*>(point.pFree().elems.data()));
266266

267-
const Eigen::Vector3d err {-1.0, -1.0, -1.0};
267+
const Eigen::Vector3<SReal> err {-1.0, -1.0, -1.0};
268268
const double maxSeparation = currentIntersection->getContactDistance() + triangle.getContactDistance() + point.getContactDistance(); // 0.00001
269269
SReal toi = std::numeric_limits<SReal>::infinity();
270270
const SReal tmax = 1.0;

Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/BuiltConstraintSolver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ namespace sofa::component::constraint::lagrangian::solver
3333
BuiltConstraintSolver::BuiltConstraintSolver()
3434
: d_multithreading(initData(&d_multithreading, false, "multithreading", "Build compliances concurrently"))
3535
, d_useSVDForRegularization(initData(&d_useSVDForRegularization, false, "useSVDForRegularization", "Use SVD decomposiiton of the compliance matrix to project singular values smaller than regularization to the regularization term. Only works with built"))
36-
, d_svdSingularValueNullSpaceCriteriaFactor(initData(&d_svdSingularValueNullSpaceCriteriaFactor, 0.01, "svdSingularValueNullSpaceCriteriaFactor", "Fraction of the highest singular value bellow which a singular value will be supposed to belong to the nullspace"))
37-
, d_svdSingularVectorNullSpaceCriteriaFactor(initData(&d_svdSingularVectorNullSpaceCriteriaFactor, 0.001, "svdSingularVectorNullSpaceCriteriaFactor", "Absolute value bellow which a component of a normalized base vector will be considered null"))
36+
, d_svdSingularValueNullSpaceCriteriaFactor(initData(&d_svdSingularValueNullSpaceCriteriaFactor, 0.01_sreal, "svdSingularValueNullSpaceCriteriaFactor", "Fraction of the highest singular value bellow which a singular value will be supposed to belong to the nullspace"))
37+
, d_svdSingularVectorNullSpaceCriteriaFactor(initData(&d_svdSingularVectorNullSpaceCriteriaFactor, 0.001_sreal, "svdSingularVectorNullSpaceCriteriaFactor", "Absolute value bellow which a component of a normalized base vector will be considered null"))
3838
{}
3939

4040
void BuiltConstraintSolver::init()
@@ -62,7 +62,7 @@ void BuiltConstraintSolver::addRegularization(linearalgebra::BaseMatrix& W, cons
6262
const size_t problemSize = FullW->rowSize();
6363

6464
Eigen::Map<Eigen::MatrixX<SReal>> EigenW(FullW->ptr(),problemSize, problemSize) ;
65-
Eigen::JacobiSVD<Eigen::MatrixXd> svd( EigenW, Eigen::ComputeFullV | Eigen::ComputeFullU );
65+
Eigen::JacobiSVD<Eigen::MatrixX<SReal>> svd( EigenW, Eigen::ComputeFullV | Eigen::ComputeFullU );
6666

6767

6868

Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/ImprovedJacobiConstraintSolver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ namespace sofa::component::constraint::lagrangian::solver
3333
ImprovedJacobiConstraintSolver::ImprovedJacobiConstraintSolver()
3434
: BuiltConstraintSolver()
3535
, d_useSpectralCorrection(initData(&d_useSpectralCorrection,false,"useSpectralCorrection","If set to true, the solution found after each iteration will be multiplied by spectralCorrectionFactor*2/spr(W), with spr() denoting the spectral radius."))
36-
, d_spectralCorrectionFactor(initData(&d_spectralCorrectionFactor,1.0,"spectralCorrectionFactor","Factor used to modulate the spectral correction"))
36+
, d_spectralCorrectionFactor(initData(&d_spectralCorrectionFactor,1.0_sreal,"spectralCorrectionFactor","Factor used to modulate the spectral correction"))
3737
, d_useConjugateResidue(initData(&d_useConjugateResidue,false,"useConjugateResidue","If set to true, the solution found after each iteration will be corrected along the solution direction using `\\lambda^{i+1} -= beta^{i} * (\\lambda^{i} - \\lambda^{i-1})` with beta following the formula beta^{i} = min(1, (i/maxIterations)^{conjugateResidueSpeedFactor}) "))
38-
, d_conjugateResidueSpeedFactor(initData(&d_conjugateResidueSpeedFactor,10.0,"conjugateResidueSpeedFactor","Factor used to modulate the speed in which beta used in the conjugate residue part reaches 1.0. The higher the value, the slower the reach. "))
38+
, d_conjugateResidueSpeedFactor(initData(&d_conjugateResidueSpeedFactor,10.0_sreal,"conjugateResidueSpeedFactor","Factor used to modulate the speed in which beta used in the conjugate residue part reaches 1.0. The higher the value, the slower the reach. "))
3939
{
4040

4141
}

Sofa/Component/LinearSolver/Iterative/src/sofa/component/linearsolver/iterative/PCGLinearSolver.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace sofa::component::linearsolver::iterative
3737
template<class TMatrix, class TVector>
3838
PCGLinearSolver<TMatrix,TVector>::PCGLinearSolver()
3939
: d_maxIter(initData(&d_maxIter, 25u, "iterations", "Maximum number of iterations after which the iterative descent of the Conjugate Gradient must stop") )
40-
, d_tolerance(initData(&d_tolerance, 1e-5, "tolerance", "Desired accuracy of the Conjugate Gradient solution evaluating: |r|²/|b|² (ratio of current residual norm over initial residual norm)") )
40+
, d_tolerance(initData(&d_tolerance, 1e-5_sreal, "tolerance", "Desired accuracy of the Conjugate Gradient solution evaluating: |r|²/|b|² (ratio of current residual norm over initial residual norm)") )
4141
, d_use_precond(initData(&d_use_precond, true, "use_precond", "Use a preconditioner") )
4242
, l_preconditioner(initLink("preconditioner", "Link towards the linear solver used to precondition the conjugate gradient"))
4343
, d_update_step(this, "v25.12", "v26.06", "update_step", "Instead, use the Data 'assemblingRate' in the associated PreconditionedMatrixFreeSystem")

Sofa/Component/Mapping/Linear/src/sofa/component/mapping/linear/BarycentricMappers/BarycentricMapperTetrahedronSetTopology.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ using sofa::defaulttype::Vec3Types;
2929
using sofa::type::Mat3x3d;
3030
using sofa::type::Vec3;
3131
typedef typename sofa::core::topology::BaseMeshTopology::Tetrahedron Tetrahedron;
32+
using sofa::type::Mat3x3;
3233

3334
/// Class allowing barycentric mapping computation on a TetrahedronSetTopology
3435
template<class In, class Out>
@@ -52,7 +53,7 @@ class BarycentricMapperTetrahedronSetTopology : public BarycentricMapperTopology
5253

5354
virtual type::vector<Tetrahedron> getElements() override;
5455
virtual std::array<Real, Tetrahedron::NumberOfNodes>getBarycentricCoefficients(const std::array<Real, MappingData::NumberOfCoordinates>& barycentricCoordinates) override;
55-
void computeBase(Mat3x3d& base, const typename In::VecCoord& in, const Tetrahedron& element) override;
56+
void computeBase(Mat3x3& base, const typename In::VecCoord& in, const Tetrahedron& element) override;
5657
void computeCenter(Vec3& center, const typename In::VecCoord& in, const Tetrahedron& element) override;
5758
void computeDistance(SReal& d, const Vec3& v) override;
5859
void addPointInElement(const Index elementIndex, const SReal* baryCoords) override;

Sofa/Component/Mapping/Linear/src/sofa/component/mapping/linear/BarycentricMappers/BarycentricMapperTetrahedronSetTopology.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ auto BarycentricMapperTetrahedronSetTopology<In,Out>::getBarycentricCoefficients
6060
}
6161

6262
template <class In, class Out>
63-
void BarycentricMapperTetrahedronSetTopology<In,Out>::computeBase(Mat3x3d& base, const typename In::VecCoord& in, const Tetrahedron& element)
63+
void BarycentricMapperTetrahedronSetTopology<In,Out>::computeBase(Mat3x3& base, const typename In::VecCoord& in, const Tetrahedron& element)
6464
{
6565
Mat3x3d matrixTranspose;
6666
base[0] = in[element[1]]-in[element[0]];
@@ -166,7 +166,7 @@ void BarycentricMapperTetrahedronSetTopology<In, Out>::processAddPoint(const sof
166166
double distance = std::numeric_limits<double>::max();
167167
for (unsigned int t = 0; t < tetrahedra.size(); t++)
168168
{
169-
sofa::type::Mat3x3d base;
169+
sofa::type::Mat3x3 base;
170170
sofa::type::Vec3 center;
171171
computeBase(base, in, tetrahedra[t]);
172172
computeCenter(center, in, tetrahedra[t]);

Sofa/Component/Mapping/Linear/src/sofa/component/mapping/linear/DistanceToPlaneMapping.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ namespace sofa::component::mapping::linear
3535
{
3636

3737
template <class TIn>
38-
class DistanceToPlaneMapping : public LinearMapping<TIn, defaulttype::Vec1dTypes>
38+
class DistanceToPlaneMapping : public LinearMapping<TIn, defaulttype::Vec1Types>
3939
{
4040
public:
41-
SOFA_CLASS(SOFA_TEMPLATE(DistanceToPlaneMapping,TIn), SOFA_TEMPLATE2(LinearMapping,TIn, defaulttype::Vec1dTypes));
42-
typedef LinearMapping<TIn, defaulttype::Vec1dTypes> Inherit;
43-
typedef defaulttype::Vec1dTypes TOut;
41+
SOFA_CLASS(SOFA_TEMPLATE(DistanceToPlaneMapping,TIn), SOFA_TEMPLATE2(LinearMapping,TIn, defaulttype::Vec1Types));
42+
typedef LinearMapping<TIn, defaulttype::Vec1Types> Inherit;
43+
typedef defaulttype::Vec1Types TOut;
4444

4545
void init() override;
4646

Sofa/Component/Mapping/NonLinear/tests/DistanceMultiMapping_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct DistanceMultiMappingTest : public MultiMapping_test<_DistanceMultiMapping
6161
if (computeDistance)
6262
{
6363
const auto expectedDistance = (In::getCPos(incoords[1][0]) - In::getCPos(incoords[0][0])).norm();
64-
Out::set( outcoords[0], expectedDistance, 0.,0.);
64+
Out::set( outcoords[0], expectedDistance, 0._sreal,0._sreal);
6565
}
6666
else
6767
{

Sofa/Component/Setting/src/sofa/component/setting/ViewerSetting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ViewerSetting::ViewerSetting()
4747
, d_showSelectedObjectSurfaces(initData(&d_showSelectedObjectSurfaces, true, "showSelectedObjectSurfaces", "Show the surfaces when components with surface topology are selected"))
4848
, d_showSelectedObjectVolumes(initData(&d_showSelectedObjectVolumes, true, "showSelectedObjectVolumes", "Show the volumes when components with volume topology are selected"))
4949
, d_showSelectedObjectIndices(initData(&d_showSelectedObjectIndices, true, "showSelectedObjectIndices", "Show the position's indices for components with positions are selected"))
50-
, d_selectedVisualScaling(initData(&d_selectedVisualScaling, 0.02, "showSelectedVisualScaling", "Scale factor for the rendering of selected object"))
50+
, d_selectedVisualScaling(initData(&d_selectedVisualScaling, 0.02_sreal, "showSelectedVisualScaling", "Scale factor for the rendering of selected object"))
5151
{
5252
d_resolution.setGroup("Viewport");
5353
d_fullscreen.setGroup("Viewport");

0 commit comments

Comments
 (0)